Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I'm trying to have an order summary: Order name, number, line items with variant purchased, quantity and image for said variant.
{{order.customer.email}}
{{order.name}}
{% for li in order.lineItems %}
{% for li in line_item.variant %}
{{ line_item.image | img_url: 'small' | img_tag }}
{{ li.title }}
{% endfor %}
Your code is missing another {% endfor %} at the end
- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
It's also using {% for li in line_item.variant %} when line_item is not defined as a variable
So something like this?
{{order.customer.email}}
{{order.name}}
{% for li in order.lineItems %}
{item.variant}
{{ line_item.image | img_url: 'small' | img_tag }}
{{ li.title }}
{% endfor %}
{% endfor %}
No. When you loop over a list, that "li" part is the single item for that iteration of the loop. So if you want to access line item info, you need to use that li. You also have a second closing {% endfor %} for no reason. To learn the basics, I definitely recommend you read up on liquid more here
I'll add that I'm guessing you copy/pasted this code... Flow does not support the exact same liquid as themes, so when you use tags like "img_url" and "img_tag" make sure to confirm they work, because I don't think they are supported in the variant of liquid that Flow uses. I substituted the "URL" field for those tags. This at least passes validation:
{{order.customer.email}}
{{order.name}}
{% for li in order.lineItems %}
{li.variant}
{{ li.image.url }}
{{ li.title }}
{% endfor %}
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025