Hi,
I've set up a free-text product search and tried a couple of different things, but it seams that it will only search match products if the containing group is specified on the paragraph? I would like it to search all products in the database. Am I doing something wrong?
BR.
Lars
Developer forum
E-mail notifications
Search all products
Lars Hejgaard Sørensen
Posted on 05/07/2011 14:57:20
Replies
Pavel Volgarev
Posted on 05/07/2011 15:07:07
Hi Lars,
This is by design. The default query constraint consists not only of groups that you select on a paragraph settings. It also includes the current eCommerce language, "In stock" configuration (Management Center) and some other things.
The "groups" criterion can represent only the current group if the corresponding "GroupID" query-string parameter is not empty.
-- Pavel
This is by design. The default query constraint consists not only of groups that you select on a paragraph settings. It also includes the current eCommerce language, "In stock" configuration (Management Center) and some other things.
The "groups" criterion can represent only the current group if the corresponding "GroupID" query-string parameter is not empty.
-- Pavel
Lars Hejgaard Sørensen
Posted on 07/07/2011 13:12:25
So if I want to search all products regardless og group relationships, how would I accomplish this?
BR.
Lars
BR.
Lars
Pavel Volgarev
Posted on 07/07/2011 13:48:23
Hi Lars,
Here's what you can do:
Filters setup:
-- Pavel
Here's what you can do:
Filters setup:
- Create new filter group (Management Center -> eCommerce settings -> Product catalog -> Search filters).
- Add new delimit filter with the following setup:
- Name: "Default groups"
- Field: "GroupHierarchy"
- Values: [Group IDs that you want to show the products from]
- Applied: "Only without other filters"
- Add new free text search filter.
- Create new paragraph with eCom catalog module.
- Make sure that no product groups are selected ("Product groups" selector displays "No groups added!"). Note that clearing previously selected groups probably won't work (seems like a bug in this control).
- Disable the "Groups" view ("Groups" checkbox under the "Templates" section must be cleared).
- Select the filter group that you've created earlier.
- View the page (delimit filter is applied so you will see some products even if you didn't select any target groups). Test your free text search filter (delimit filter won't be applied because of its "Apply mode" and you should be able to search within the entire eCommerce products database).
-- Pavel
Mikkel Høst
Posted on 13/07/2011 16:44:36
If u don't add any groups at all i pretty sure it searches all products :)
Pavel Volgarev
Posted on 13/07/2011 16:58:00
Hi Mikkel,
Yes, but then you won't see any products until you actually start searching for something. The trick with Delimit filter is made in order to have some default view instead of seeing "No products found" message.
-- Pavel
Yes, but then you won't see any products until you actually start searching for something. The trick with Delimit filter is made in order to have some default view instead of seeing "No products found" message.
-- Pavel
Mikkel Høst
Posted on 15/07/2011 13:12:13
Hi Pavel
Oh yes, good point. But in most cases you have a search field where u search and after searching you reach a "search" page where the results are displayed. But good to know if u want a search page with some default products displayed.
Oh yes, good point. But in most cases you have a search field where u search and after searching you reach a "search" page where the results are displayed. But good to know if u want a search page with some default products displayed.
You must be logged in to post in the forum