Developer forum

Forum » Development » option to show master product on product list if any variant contains facet selection

option to show master product on product list if any variant contains facet selection

Mikkel Hammer
Mikkel Hammer
Reply

Hi,
EDIT: i've attached the same pictures below aswell, since they show up quite big in the post.

We're looking for a way to show the master product on the product list if any variant contains the selected facet option.
As far as i know, it only takes the master product information into account.

Is it possible to get a feature into the query to take variant information into account,
or does anyone have experience with this, and can point us into the right direction for making it outselves?

For context:
We've extended the sticker functionality to check if the master product or any variant contains a specific value in a text product field, depending on which one it is - we show a "NEW PRODUCT" or "NEW VARIANT" sticker.

Our problem is that when it's only a variant that contains the value, it's not showing when you select the facet option.

Here is the product list without the facet with the specific value is selected. Now it shows the 3 master products with the correct stickers. (all 3 products image below)


Here is the product list WITH the facet with the specific value is selected. Now it shows the 2 master products where only the master product has the value. (only 2 products image below)