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!
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024