Developer forum

Forum » Ecommerce - Standard features » Creating a Facet with product's second level groups

Creating a Facet with product's second level groups

Nay Chi Phyo Dynamicweb Employee
Nay Chi Phyo
Reply

Hi all,

I want to create a facet with the product second-level groups under the E-commerce shop. For example, when a user in Bike page, the facet must show the second sub-groups, Mountain bikes, Road bikes, etc..  

So, I was tried to use the Generate field (GroupNames) in the Index, and query. But it shows all of the subgroups of Bike under the PIM warehouse instead of showing the sub-group of bike under the eCommerce shop.
I attached some images to be clear on my issue. Kindly see and suggest to me if I was on the wrong way or any needed things. 

Thanks!

Best Regards,

Nay

BikeSeclevelGp.png Facet.PNG FacetFE.png Index.PNG Query.PNG

Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Nay

I think your configuration is accurate. But you have run into how the indexing is working. All products are indexed with all the groups they belong to across all shops.

In your setup you have 2 shops (at least) - one warehouse for PIM and one shop for Ecommerce.

You can limit which of the shops are indexed using the configuration of the product index builder - see my dump. When you limit the indexing to the Ecommerce shop (or shops) you will avoid the group relations that exist in the PIM. In this way the PIM groups will no longer show up in your facet.

Products that are not published to the shops you choose to configure, will of course no longer be indexed. Probably also what you want. 

If the index is used for other things (i.e. in the PIM backend) you also need to create one more index for use in PIM. Usually you would already have 2 indexes in such a setup.

BR Nicolai

Screenshot_2021-01-19_180056.JPG
Votes for this answer: 1

 

You must be logged in to post in the forum