Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi there I'd like to add the metafield entries to the emails for customer and staff notifications. They're displayed on the order landing page, just not the emill. I'd like to learn how to call/display these on the email if anyone can help please? The metafield content is in Grey in the screenshot
@Gary_Shop thanks for good post can you something try this code
{% assign order_items = order.line_items %}
{% for item in order_items %}
{% assign product = all_products[item.product_id] %}
<h4>{{ product.title }}</h4>
<p>Quantity: {{ item.quantity }}</p>
<p>Price: {{ item.price | money }}</p>
{% if product.metafields.namespace.key %} <!-- Replace 'namespace' and 'key' with your actual metafield namespace and key -->
<p>Additional Info: {{ product.metafields.namespace.key }}</p>
{% endif %}
{% endfor %}
Thank you very much I'll give this a go tomorrow. Thanks for the fast response!
@Gary_Shop
Glad I could help
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025