All things Shopify and commerce
<div class="product_additional_information mb-30 mt-10">
<p><span class="font-body-bold">Voltage:</span>
{{ variant.metafields.custom.product_voltage }}</p>
</div>
I am trying to retrieve the product variant metafield value with the above code, but I don't get any value its empty.
Hi @praveen995
The variant variable needs to be assigned before you can retrieve the value. You then loop the variants and the information will show.
Check in your product template where the for loop is that goes through product variants, then add the code for the metafield inside of it, it'll work directly.
Let us know if you require additional assistance!
Hi @JHKCreate , can you send or attach any reference, so that I can understand it more clear. That would be helpful.
Here's the link for the product object: https://shopify.dev/docs/api/liquid/objects/product
The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024