Searching in a Particular Catalog/Store

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Searching in a Particular Catalog/Store

Gaurav kalia
Hi All

In Ofbiz we have keyword search functionality, right now when I search
using any keyword it search in all the Catalogs/Stores and return the
result.

I would like to know how can I configure it to search in a particular
Catalog/Store.

Please suggest

TIA

Regards

Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

Deepak Dixit-2
Hi Gaurav,

You have to pass prodCatalogId to configured search to particular
Catalog/Store.
Please refer keywordsearch.groovy for more reference.

Thanks & Regards
--
Deepak Dixit



Gaurav Kalia wrote:

> Hi All
>
> In Ofbiz we have keyword search functionality, right now when I search
> using any keyword it search in all the Catalogs/Stores and return the
> result.
>
> I would like to know how can I configure it to search in a particular
> Catalog/Store.
>
> Please suggest
>
> TIA
>
> Regards
>
> Gaurav


Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

Gaurav kalia
Hi Deepak

Is there any configuration file for this or can I configure this from Admin area.

Please suggest

Regards

Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

David-DiSiD Technologies
No Gaurav, there isn't a config. file or admin area for this.

If you check the "Advanced Search" form, the result of the search is only for the current catalog. Test it here: http://demo-trunk.ofbiz.apache.org/ecommerce/control/advancedsearch
That's because this form has a hidden input named SEARCH_CATALOG_ID with the current catalog as value.

You can solve the problem in the "Default search" form adding the same hidden input (modifying the FTL)

Also, it would be good share this improvement creating an issue in Jira and adding the patch.

Cheers,
David
DiSiD Technologies, S.L. - http://www.disid.com
Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

Gaurav kalia
Hi David

Thanks for the help.

I have tried using the hidden parameter "SEARCH_CATALOG_ID" in keyworksearchbox.ftl and it worked very well.

I will create an issue and will add this as a patch.

But would like to clear my one more doubt if I can have more than one catalog for a web application does that means it will still look into the currently selected catalog or preciously we can not search in more than one catalog.

Please suggest

Regards

Gaurav

On Monday 26 July 2010 04:15 PM, David-DiSiD Technologies [via OFBiz] wrote:
No Gaurav, there isn't a config. file or admin are for this.

If you check the "Advanced Search" form, the result of the search is only for the current catalog. Test it here: http://demo-trunk.ofbiz.apache.org/ecommerce/control/advancedsearch
That's because this form has a hidden input named SEARCH_CATALOG_ID with the current catalog as value.

You can solve the problem in the "Default search" form adding the same hidden input (modifying the FTL)

Also, it would be good share this improvement creating an issue in Jira and adding the patch.

Cheers,
David Cervera - dcervera at disid dot com
DiSiD Technologies, S.L. - http://www.disid.com



View message @ http://ofbiz.135035.n4.nabble.com/Searching-in-a-Particular-Catalog-Store-tp2301996p2302171.html
To unsubscribe from Re: Searching in a Particular Catalog/Store, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

BJ Freeman
In reply to this post by Gaurav kalia
this is setup in the catalog section. See the demo data
/specialpurpose/ecommerce/data
you add other searches to the catalog and then there is a drop down box
that list the catalogs to search, on the search page.
see where it says choose catalog.
http://demo-trunk.ofbiz.apache.org/ecommerce/

kaliagaurav sent the following on 7/26/2010 3:34 AM:

>
> Hi Deepak
>
> Is there any configuration file for this or can I configure this from Admin
> area.
>
> Please suggest
>
> Regards
>
> Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

Gaurav kalia
In reply to this post by David-DiSiD Technologies
Now when I click on find in simple search it is not returning any results back but earlier its is showing all the demo products.

Please suggest

Thanks

Gaurav

On Monday 26 July 2010 04:15 PM, David-DiSiD Technologies [via OFBiz] wrote:
No Gaurav, there isn't a config. file or admin are for this.

If you check the "Advanced Search" form, the result of the search is only for the current catalog. Test it here: http://demo-trunk.ofbiz.apache.org/ecommerce/control/advancedsearch
That's because this form has a hidden input named SEARCH_CATALOG_ID with the current catalog as value.

You can solve the problem in the "Default search" form adding the same hidden input (modifying the FTL)

Also, it would be good share this improvement creating an issue in Jira and adding the patch.

Cheers,
David Cervera - dcervera at disid dot com
DiSiD Technologies, S.L. - http://www.disid.com



View message @ http://ofbiz.135035.n4.nabble.com/Searching-in-a-Particular-Catalog-Store-tp2301996p2302171.html
To unsubscribe from Re: Searching in a Particular Catalog/Store, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

Gaurav kalia
In reply to this post by BJ Freeman
Hi All

After adding

<input type="hidden" name="SEARCH_CATALOG_ID" value="${currentCatalogId}">

in keywordsearchbox.ftl the search is not working properly,  now i am not able to see any product after click on find button and i can see an exception in logs as well but if i remove this then search works with no exception, may be i have done something wrong.

Please suggest

Thanks

Gaurav
On Monday 26 July 2010 05:36 PM, BJ Freeman [via OFBiz] wrote:
this is setup in the catalog section. See the demo data
/specialpurpose/ecommerce/data
you add other searches to the catalog and then there is a drop down box
that list the catalogs to search, on the search page.
see where it says choose catalog.
http://demo-trunk.ofbiz.apache.org/ecommerce/

kaliagaurav sent the following on 7/26/2010 3:34 AM:

>
> Hi Deepak
>
> Is there any configuration file for this or can I configure this from Admin
> area.
>
> Please suggest
>
> Regards
>
> Gaurav



View message @ http://ofbiz.135035.n4.nabble.com/Searching-in-a-Particular-Catalog-Store-tp2301996p2302247.html
To unsubscribe from Re: Searching in a Particular Catalog/Store, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

BJ Freeman
my guess is your  added line is overriding the catalog selection which
has a default.

kaliagaurav sent the following on 7/26/2010 7:41 AM:

>
> Hi All
>
> After adding
>
> <input type="hidden" name="SEARCH_CATALOG_ID" value="${currentCatalogId}">
>
> in keywordsearchbox.ftl the search is not working properly,  now i am
> not able to see any product after click on find button and i can see an
> exception in logs as well but if i remove this then search works with no
> exception, may be i have done something wrong.
>
> Please suggest
>
> Thanks
>
> Gaurav
> On Monday 26 July 2010 05:36 PM, BJ Freeman [via OFBiz] wrote:
>> this is setup in the catalog section. See the demo data
>> /specialpurpose/ecommerce/data
>> you add other searches to the catalog and then there is a drop down box
>> that list the catalogs to search, on the search page.
>> see where it says choose catalog.
>> http://demo-trunk.ofbiz.apache.org/ecommerce/
>>
>> kaliagaurav sent the following on 7/26/2010 3:34 AM:
>>
>>>
>>> Hi Deepak
>>>
>>> Is there any configuration file for this or can I configure this
>> from Admin
>>> area.
>>>
>>> Please suggest
>>>
>>> Regards
>>>
>>> Gaurav
>>
>>
>> ------------------------------------------------------------------------
>> View message @
>> http://ofbiz.135035.n4.nabble.com/Searching-in-a-Particular-Catalog-Store-tp2301996p2302247.html
>>
>> To unsubscribe from Re: Searching in a Particular Catalog/Store, click
>> here
>> <  (link removed) =>.
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Searching in a Particular Catalog/Store

Deepak Dixit-2
In reply to this post by Gaurav kalia

Can you please post the exception?

Thanks & Regards
--
Deepak Dixit


kaliagaurav wrote:

> Hi All
>
> After adding
>
> <input type="hidden" name="SEARCH_CATALOG_ID" value="${currentCatalogId}">
>
> in keywordsearchbox.ftl the search is not working properly,  now i am
> not able to see any product after click on find button and i can see an
> exception in logs as well but if i remove this then search works with no
> exception, may be i have done something wrong.
>
> Please suggest
>
> Thanks
>
> Gaurav
> On Monday 26 July 2010 05:36 PM, BJ Freeman [via OFBiz] wrote:
>  
>> this is setup in the catalog section. See the demo data
>> /specialpurpose/ecommerce/data
>> you add other searches to the catalog and then there is a drop down box
>> that list the catalogs to search, on the search page.
>> see where it says choose catalog.
>> http://demo-trunk.ofbiz.apache.org/ecommerce/
>>
>> kaliagaurav sent the following on 7/26/2010 3:34 AM:
>>
>>    
>>> Hi Deepak
>>>
>>> Is there any configuration file for this or can I configure this
>>>      
>> from Admin
>>    
>>> area.
>>>
>>> Please suggest
>>>
>>> Regards
>>>
>>> Gaurav
>>>      
>> ------------------------------------------------------------------------
>> View message @
>> http://ofbiz.135035.n4.nabble.com/Searching-in-a-Particular-Catalog-Store-tp2301996p2302247.html 
>>
>> To unsubscribe from Re: Searching in a Particular Catalog/Store, click
>> here
>> < (link removed) =>.
>>
>>
>>    
>
>
>