I have setup variant metafield that I would like to change depending on the variant selected. I am running Dawn 2.0 and can get the dynamic PRODUCT metafields to show - but I can’t get it to dynamically change when a product has multiple variants.
Any posts I have found regarding this topic is very confusing and I even have coding experience. However, I don’t know JS or liquid that well. Can someone help me with telling me exactly what code to copy and paste into what area in the Dawn 2.0 theme?
Here is the code I want to work and dynamically update when a certain variant is selected:
{%- if product.metafields.my_fields.case_size.value >0 -%}
Case Size: {{ product.metafields.my_fields.case_size.value }} x {{product.metafields.my_fields.container_volume | metafield_text }}/
{{product.metafields.my_fields.container_type.value }}
{%- else -%}
Product not sold in cases
{%- endif -%}
Any help you can provide would be greatly appreciated!