I want to inject some custom liquid in my abandoned cart email on Shopify. Shopify has docs here saying the product_title
can be found under line_items
under abandoned_cart
.
I naturally assume you can get the product_title
with something akin to…
<p>You left {{ abandoned_checkout.line_items[0].product_title }} in your cart.</p>
But this doesn’t work. What’s the proper way to get the product name of the first item?
2
Answers
If you are working with email template for "Abandoned checkout" in notification settings, this should work:
Loop code:
And here is some useful documentation here:
https://help.shopify.com/en/manual/orders/notifications/email-variables#line-item
All products for the abandoned cart will keep here:
subtotal_line_items
and you should operate with the Product object. So in the your case it should be: