product specific order confirmation

TSCOHIO
New Member
2 0 0

I would like to send emails with specific additional information based on which product a customer buys. I have the following code in my email notifications setting but nothing is showing up either in the preview emails for when I go in as a customer and purchase one of the items in question. Do I have the code wrong or in the wrong location? Each of these products have variants and long titles so I opted for contains instead of == but even when I did a SKU or the full product name it didn't work.

{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}
{% if line.title contains 'Yearbook' %}
custom text
{% endif %}
{% if line.title contains 'Group' %}
custom text
{% endif %}
{% if line.title contains 'Club Ice Time' %}
custom text
{% endif %}

0 Likes