Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi guys,
Can anyone please help me with variant metafiled?
I created a metafield, and wrote on each variant the info I want to put there (i just need a few words description for some of my variants) but I can't make it visible on my product page. I use dawn 2.0
Hi @VukVuckovic
You can add the code to show up in your product page by using custom liquid block.
1. From you Admin page, go to Online store > Themes > Customize
2. Go to product page
3. Under the Product Information in your right hand, add a block called Custom liquid.
4. Inside the text box of custom liquid, place the code below
NOTE: This will show the first or selected variant description.
{{ product.selected_or_first_available_variant.metafields.custom.description.value }}
To show all descriptions:
{% for variant in product.variants %}
{{ variant.metafields.custom.description.value }}
{% endfor %}
To hide and show the description base on customer's input, you need a javascript included. You need to have a developer write that for you
many tnx for your reply. i did it and this is what shows up:
{"type"=>"root", "children"=>[{"type"=>"paragraph", "children"=>[{"type"=>"text", "value"=>"You can buy this print framed. Click "}, {"url"=>"https://excitingcities.shop/products/washington-print", "target"=>"_blank", "type"=>"link", "children"=>[{"type"=>"text", "value"=>"HERE"}]}, {"type"=>"text", "value"=>""}]}]}
🙂 i have no idea what does that mean - I just need a part:
"You can buy this print framed. Click....
and then I put HERE which is a link to new product 🙂
Hey @VukVuckovic , I saw you were able to receive some help. Were you able to figure out the issue?
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