What is the rule for what variant data that is used on the product card in the lists (ex. stock and price)

What is the rule for what variant data that is used on the product card in the lists (ex. stock and price).
And how do I change that?

Litium version: 6.2.2

Not sure i understand what you want to change, could you post an image?

This products has several variants. So if you go to the product page you can choose a variant and see different stock status. But in the list it displays one price and stock (for one of the variants). So what variant is in display and what makes it to take that variant.

In control panel > accelerator you can configure by which field to group variants in listings per template.

This grouping is then implemented in VariantIndexDocumentMerger which you can modify if you need to select a specific variant.

So nothing happens out of the box when adding a field there? I need to program to make use of it?
We have two or more combinations of versions.

I am still not sure what it is you want to do, as example the accelerator groups by color in default setup, so if you add 10 items in the same color then only the first variant of that color is returned, which variant that gets returned to search result can be adjusted in VariantIndexDocumentMerger.

For now I’m just wondering what it is that makes a specific variant to become the one in the listning of many. So when you add to cart you get that variant.

That would be the variant returned from VariantIndexDocumentMerger, if you want to add to cart from the list view then you might need to have variant selection avaliable in the list also?

1 Like

Yes, That’s the next issue :slight_smile:
Was curious about the logic. Thanks!