CMS Development

AIsmail12
Member

Get product details from deal

SOLVE

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. https://prnt.sc/Z6zXFIiY9RSv

Nothing is visible in the email. https://prnt.sc/pxywPzN4P7Eg

Could you please find the issue?

Thanks!


0 Upvotes
1 Accepted solution
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Get product details from deal

SOLVE

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:

actions-preview-email.png

 

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):

preview-products.png

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

0 Upvotes
3 Replies 3
AIsmail12
Member

Get product details from deal

SOLVE

I am checking it's not working. and also I need these details: Product title, Image, SKU, and product URL. 
https://prnt.sc/MgfkkYYIkJjQ
https://prnt.sc/q3KZQwKeNd5f

Please check the video: https://www.loom.com/share/47a5474ec0564d19971f619d1cf151b1?sid=9c2b487c-7208-4a04-8205-8a2a5df70923

0 Upvotes
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Get product details from deal

SOLVE

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:

actions-preview-email.png

 

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):

preview-products.png

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
0 Upvotes
alyssamwilie
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Get product details from deal

SOLVE

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 %}

 

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.