I want to send 2 different fulfillment emails.
If a customer purchases jewelry, ONLY THEN, I want to send them a certificate as well.
All the jewelry titles contain the word “Colier”
So, in the email template, I set up this condition but it doesn’t work.
Any ideas? Have I missed something? Or do you know another workaround?! Like a weight condition or idk
{% if line.title contains ‘Colier’ %}
text here
{% endif %}
The variable looks right according to the documentation: https://help.shopify.com/en/manual/orders/notifications/email-variables#line-item
Check to make sure that piece of code you shared is inside the line items loop.
Example:
{% for line in line_items %}
your code here
{% endfor %}
If you don’t want to add the certificate for every jewelry item, or you want to add in a place other than inside the line items loop, you could do something like this:
{% assign certificate = false %}
{% for line in line_items %}
{% if line.title contains "Colier" %}
{% assign certificate = true %}
{% endif %}
{% endfor %}
{% if certificate %}
show the certificate info here
{% endif %}
Many many many many thanks!
it works!
again tyvm sir!
1 Like