Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
how can i update variant metafield value when variant change. right now I am using this code.
{% for variant in product.variants %} {% if product.selected_or_first_available_variant.id == variant.id %} <strong>{{ variant.metafields.custom.customprice }} </strong> {% endif %} {% endfor %}
but it only render the meta field value one time if I visit variant 1 URL then it shows variant 1 meta field value but on same page when I change to variant 2 then metafield value is not updating. but when I visit variant 2 via URL then it show variant 2 metafield value.
I need the same.
Have you found a solution?
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025