Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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 %}
Solved! Go to the solution
This is an accepted solution.
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 %}
really? no one can help?
This is an accepted solution.
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!
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025