Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
<b>ORDER DETAILS</b>
Order ID: {{order.id}}
Order Number: {{order.name}}
Customer name: {{order.customer.displayName}}
Shopify customer id: {{order.customer.id}}
Customer company:
Customer email: {{order.email}}
<b>ITEM DETAILS</b>
{% for lineItems_item in order.lineItems %} {{lineItems_item.name}}{% endfor %}
{% for lineItems_item in order.lineItems %}
{% for metafields_item in lineItems_item.product.metafields %}
{{metafields_item.value}}
{% endfor %}
{% endfor %}
<b>ITEM DETAILS TESTING</b>
{% for metafields_item in lineitems_item.product.metafields %}
{% if metafields_item.key == "custom_fields.template" %}
{{ metafields_item.value }}
{% endif %}
{% endfor %}
Hi
It looks like you're missing a loop around the last block of code. It should look like:
{% for lineItems_item in order.lineItems %}
{% for metafields_item in lineItems_item.product.metafields %}
{% if metafields_item.key == "custom_fields.template" %}
{{ metafields_item.value }}
{% endif %}
{% endfor %}
{% endfor %}
Also of note, the initial snippet you posted used the variable `lineitems_item` instead of `lineItems_item` (capitalization on the second `i` is mismatched) so that is fixed too.
Hope that helps!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey 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, 2024