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
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024