How to access variant title in abandoned email template?

I’m needing to access the variant title of a line item in the abandoned checkout email template, have tried the following (neither work):

{% assign line_title = line.product.title | append: ’ - ’ | append: line.variant.title %}

{% assign line_title = line.product.title | append: ’ - ’ | append: line.product.variant.title %}

Can i please have some advice on how to access variant properties on line items?

Thanks

Hi @lb15941

To access the variant title in an abandoned checkout email template, use the following syntax:

{% assign line_title = line.title %}

The line.title property automatically includes the product title and the variant title (e.g., “Product Name - Variant Name”) in checkout and order line items. There’s no need to separately append the variant title.

If you need additional variant properties, you can use:

{{ line.variant.title }}

This specifically retrieves the variant title only. Use it wherever required in your template.

If you have other questions, feel free to ask me.

Best regards,
Daisy