Solved

Different fulfillment emails template

danny010385
Tourist
5 1 1

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 %}

Accepted Solution (1)

JoesIdeas
Shopify Expert
2227 203 593

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 %}

 

 

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Deal with Fraud / Chargebacks

View solution in original post

Replies 3 (3)

danny010385
Tourist
5 1 1

really? no one can help?

JoesIdeas
Shopify Expert
2227 203 593

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 %}

 

 

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Deal with Fraud / Chargebacks
danny010385
Tourist
5 1 1

Many many many many thanks!
it works!
again tyvm sir!