Hi hope somebody here can help me out.
I am new to shopify, and I am trying to create metafields for my product variation. More specific, trying to get it to show a description for each product variation.
I have spend a long time and now it finally shows up on the page with the following liquid code:
{%assign current_variant = product.selected_or_first_available_variant%}
{{current_variant.metafields.custom.varient_description}}
But the problem now is:
-
I do not know how to get the code to reloade and change the text for the variant, when you click to select a new variant. The only time the code above reloads is when you refresh the browser. How do I do it?
-
How do I get it to not show text, if the metafield data is not filled out on a product variation?
Thanks in advance!