So I added one metafield for every variant of an example product with different integer values assigned to them.
I want to display these values depending on the variant the user has currently chosen on the product page. How do I do that?
At the moment this is what I do:
{{ variant.metafields.test.something }}
This gets the correct variable. The problem is that the variable doesn't change when the user selects a different variant of the product. How can I make this interactive?
Thanks a lot!
Try variant.selected.metafields... https://help.shopify.com/en/themes/liquid/objects/variant#variant-selected