Update metafields value by change variant

New Member
3 0 0

Hello Everyone,

I am working on a store, where i am using Metafields Guru App.
I successfully created metafields and values are showing in the product page as shown below screenshot. I used the following code to display values of metafields:

<div class="product_description2">
            {% if product.metafields.details.construction != blank %}
              <td> Color:</td>
              <td> {{product.metafields.details.construction}} </td>
            {% endif %}



Now, i want to change the values of metafields when i select a particular variant or switch between variants of this product. [I want this functionality because every variant has different values like SKU, UPC, other product specifications etc..and i want to show all these values according to variant]

How can i do this, please guide me in this matter. 


Reply 1 (1)
New Member
3 0 0


I have applied code to show metafields values of variants, below screenshot showing code:


After apply this code, all "key_values" of "individual namespace" of "all variants" showing at same time. 
I want to show one key_value at a time of particular variant.(I have a unique value of all variants i.e. SKU for all variants)