Variant Metafields displayed on the product page

Felix_vie
New Member
3 0 0

Hi folks

I am pretty new to Shopify and recently started with Prestige 2.0 Theme.

I will be selling jewelry with different variants as colors and sizes will change within the same product.

I would like to show Bulletpoints on the product page other than in the product description, is there a way to use content stored in a variant metafield to show up on the product field? I was only able to use dynamic content from metafields from the product metafields, not from the variant metafields.. if not, is there an app for that?

 

Thank you!

Felix

0 Likes
Guleria
Shopify Partner
1781 377 532

Hello @Felix_vie ,

You can fetch content from variant metafields using this code

{% for variant in product.variants %}
  {{ variant.metafields.my_fields.YOUR_FIELD_NAME }}
{% endfor %}

 Note: It will return you all variant specific metafields content at same time. Further you have to customize it a/to your need.
Thanks 

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
Buy me a coffee ☕ My PayPal
0 Likes
Felix_vie
New Member
3 0 0

Thank you @Guleria I will try to do this. Is there also a way to include them in the available source options of the theme?

Thanks!

Felix

0 Likes
Chammond101
Tourist
4 0 0

Curious how to not display all the variant specific metafields content at the same time, only when that variant is selected?

0 Likes
Guleria
Shopify Partner
1781 377 532

Hello @Chammond101 ,

You need to use JS to extend it so metafield will visible on selection. 
And this JS code depends on the theme you are using.

Thanks

Want to modify or custom changes on store hire me.
Email: guleriathakur43@gmail.com, Skype: navrocks1
If helpful then please Like and Accept Solution.
Buy me a coffee ☕ My PayPal
0 Likes