Skip to main content
Solved

How can I add the product name to a cart abandon email subject line?


Forum|alt.badge.img+1

Hi community!

I’m creating a cart abandonment sequence, and I’d like to add the product name to one of my subject lines. I’ve tried a lot of tags like:

 

{{ item.product.name }}

{{ item.product.title }}

{{ event.product.name}}

 

But none of those tags have worked.

 

How can I add the product name to my subject line?

Best answer by Bobi N.

@Angel05234 

They are not working because they are iterated versions of the code made for the in email product block to show multiple products.. you need to use the exact code for it which can vary depending on what integration you are on but {{ event.extra.line_items.0.presentment_title|default:'' }} should be working.. this will show the product name for the first product in the cart

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

Bobi N.
Partner - Platinum
Forum|alt.badge.img+45
  • Champion & Partner
  • 453 replies
  • Answer
  • August 23, 2023

@Angel05234 

They are not working because they are iterated versions of the code made for the in email product block to show multiple products.. you need to use the exact code for it which can vary depending on what integration you are on but {{ event.extra.line_items.0.presentment_title|default:'' }} should be working.. this will show the product name for the first product in the cart


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • August 30, 2023
Bobi N. wrote:

@Angel05234

They are not working because they are iterated versions of the code made for the in email product block to show multiple products.. you need to use the exact code for it which can vary depending on what integration you are on but {{ event.extra.line_items.0.presentment_title|default:'' }} should be working.. this will show the product name for the first product in the cart

Thaks bobi! That’s very useful.

I finally solved my problem using the code: {{ event.extra.line_items.0.product.title }}. The integration I’m using is Shopify, and that code allowed me to show the first product in the cart.


Forum|alt.badge.img
  • Contributor I
  • 1 reply
  • February 19, 2024

Where can I find the exact code?  I would also like to do something like this.  I am using Shopify and have tried a few things from my built-in templates:

{{ line.variant.title }}

It doesn’t seem to work in the subject line of my email.

 

Sorry, this is probably pretty basic, but I really don’t understand how this all works.

 

Thanks in advance for any help on this!


Forum|alt.badge.img
  • Contributor II
  • 3 replies
  • March 1, 2025

i am also using shopify and useed this link {{ event.extra.line_items.0.presentment_title|default:'' }} 

and i just get a blank space in my email?