Is it currently possible to have search suggestions filtered on group?
This was not possible when implementing a site for a customer.
We have enabled search suggestion on the global search box.
On the product group pages there is also a box for quick search within a group.
What we like to have on this field is to show search suggestions but which are only relevant for the current group.
Is this possible and where should i look?
Developer forum
E-mail notifications
Search suggestions filtered on group
Remi Muller
Posted on 09/01/2012 10:15:11
Replies
Remi Muller
Posted on 12/01/2012 15:05:20
Excuse me for bumping. FYI topics with 0 replies dropped to the bottom.
Pavel Volgarev
Posted on 16/01/2012 14:43:40
This post has been marked as an answer
Hi Remi,
Yes, it's possible.
If you don't use customized URLs that it should work "out of the box" (if it doesn't then it's most definitely a bug). If you do use customized URLs then you need to make a small changes in the template that contains the initialization JavaScript for you suggested search. Find the line where the suggested search gets bound to the text box and add custom request parameter "GroupID" with the value set to the ID of the current eCommerce group (use "Server:Request" tag to get this value). Here is an example:
-- Pavel
Yes, it's possible.
If you don't use customized URLs that it should work "out of the box" (if it doesn't then it's most definitely a bug). If you do use customized URLs then you need to make a small changes in the template that contains the initialization JavaScript for you suggested search. Find the line where the suggested search gets bound to the text box and add custom request parameter "GroupID" with the value set to the ID of the current eCommerce group (use "Server:Request" tag to get this value). Here is an example:
Dynamicweb.Frontend.InstantSearch.setEnableSuggestions('txFreeTextQuery', true, { boxID: 'divSuggestions', request: { GroupID: '<!--@Server:Request.groupid-->' } });
Votes for this answer: 0
Remi Muller
Posted on 16/01/2012 15:23:12
Thank you very much. So simple but i could not find anything about it.
It also works with other filters i noticed.
It also works with other filters i noticed.
You must be logged in to post in the forum