Hi,
I’m working on email templates and trying to get product info with “Line items” in deals.
Like:- Product title, Image, SKU, and product URL.
Now, I’m using this code. Screenshot by Lightshot
Nothing is visible in the email. Screenshot by Lightshot
Could you please find the issue?
Thanks!
Hi @AIsmail12 ,
Line items are a little weird in that you actually have to use this email_each loop to loop through them:
{% email_each list="deal.line_items" item="line_item" %}
{{ line_item.name }}
{% endemail_each %}
I am checking it’s not working. and also I need these details: Product title, Image, SKU, and product URL.
Please check the video: https://www.loom.com/share/47a5474ec0564d19971f619d1cf151b1?sid=9c2b487c-7208-4a04-8205-8a2a5df70923
Sending a test email to yourself won’t work as it has to go through a workflow set up in a way for it to know what deal to process (since users can have more than one deal).
The way to test line item emails is to go to Actions > Preview:
And then in the preview window there’ll be a dropdown where you can select products to preview in the email (the email_each loop is what informs the preview to add this dropdown):

