shopify - Liquid: How to get product title in `abandoned_cart` email?
Solution:
If you are working with email template for "Abandoned checkout" in notification settings, this should work:
{{ subtotal_line_items[0].product.title }}
Loop code:
{% for line in subtotal_line_items %}
{{ line.product.title }}
{% endfor %}
And here is some useful documentation here: https://help.shopify.com/en/manual/orders/notifications/email-variables#line-item (https://help.shopify.com/en/manual/orders/notifications/email-variables#line-item)
Answer
Solution:
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:
<p>You left {{ subtotal_line_items[0].product.title }} in your cart.</p>
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.