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?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025