All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi everyone,
I’m working on customizing my product page and I’m trying to display a product metafield inside a custom text block in a different section (not in the “Product Information” section).
When I use the dynamic source tool, I can select the metafield in the text block settings. However, the value doesn't appear, even though the exact same metafield shows correctly when added in the “Product Information” section.
My question is:
Are product metafields only usable in the Product Information section? Or is there a way to use them in other sections on the product page?
Thanks in advance for any help!
Hello @duyentran_ ,
You can use the with custom liquid block.
e.g.
{{ product.metafields.namespace.key }}
replace namespace.key with your actual value
Regards
Guleria
Hi @Guleria,
Thanks so much for your reply!
I tried using a custom liquid block, but unfortunately the value still doesn't show up on the page.
Is there anything else I might be missing?
The metafield displays correctly in the Product information section, but when I use the exact same code in a Custom Liquid or Text block in another section, nothing appears.
Really appreciate any further suggestions!
Best regards,
Duyen
Can you please share your code and the meatfields screenshot you created ?
Hello @duyentran_
Yes, you can use product metafields outside the "Product Information" section — but only if the section has access to the product object.
Hi @devcoders,
Thank you for your reply!
How can I check if the section or block has access to the product object? And if it doesn’t have access, how can I give it access?
Appreciate your help.
Br,
Duyen
Hello @duyentran_
Please send me the collaborator code. I will send you a store access request and give you a proper update.