Product variant metafields not updating correctly

gjulio96
Shopify Partner
4 0 0

Hi!

I'm trying to show some information from metafields of product variant on the product page. But when I change the current variant the metafields data is not updating, it shows always the metafields of the first variant.

Can someone help us on solving this issue please?

Thank you!

Replies 2 (2)

Guleria
Shopify Partner
3095 608 866

Hello @gjulio96 ,

 

Follow the theme existing function which change the price or other product info. on change of the variant.

Once you find it then extend it so product metafields will also change on change of the variant.


or if you are good with JS then you can write your own code to change it a/to the variant.
 
Thanks
 

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter

LuffyOnePiece
Shopify Partner
597 86 102

Hi @gjulio96 ,

 

We do need to use JS for this.

 

We need to loop the variant and its metafield and make the changes accordingly.

 

Let me know if you need any assistance.

 

Thank you

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184