Developer forum

Forum » Ecommerce - Standard features » Query configuration for products with variants

Query configuration for products with variants

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation that made me scratch my head for a solution but I could not find one. I am not sure if it the way I have configured the index/query or it is how the current querying of the index works.

I have a lot opf products with variants. Most products have at least 2 Variant groups.

For the sake of example, let's define Product1 with VariantGroup1 and the options 1.1,2.1,3.1 and VariantGroup2 with options 2.1,2.2,2.3. THis product will not have all combinations of the options. It will have 1.1-2.1, 1.2-2.2 and 1.3-3.3

Assuming I have created 2 query rules, one for VariantGroup1 and one for VariantGroup2, I will get the facet for VariantGroup1 with 3 values (1.1,1.2 and 1.3) and the facet for VariantGroup2 with 3 values (2.1,2.2 and 2.3).

When I apply the filter and say choose 1.1 as values, the VariantGroup2 facet will still show 3 values even if the only valid combination for this product is 2.1.

I there any way I can define the index or the query or the facet to get only the available combinations? Not all possible values of each facet?

I understand that VariantGroup2 facet will read the possible values from the VariantGroup2 that is defined on the product but the ideal outcome would be to only select those that are valid for an actual variant.

I hope my description makes sense.

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

Hi Adrian

That is not possible. Only by looking at a combinations field in the lucene index and use that for facets. But I think that the way it works now is right (logically).

Only other option is to use database for that specific facet group... Because you have relations.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you for the confirmation.

I was afraid I might miss something in the configuration.

Thank you,

Adrian

 

You must be logged in to post in the forum