Custom Confirmation Email based on title tag.

Custom Confirmation Email based on title tag.

Shubz
Shopify Partner
12 0 1

The idea is to send different emails based on the title tag being identified and it won't work. A little help please. 

 

{% assign star_swag = false %}
{% for line in line_title %}
{% if line.title contains 'Port' %}
{% assign star_swag = true %}
{% endif %}
{% endfor %}
{% capture star_swag_email %} Thanks for purchasing this product. There is currently a small delay in shipping. We expect orders to be sent out by 21st February {% endcapture %}
{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
{% case delivery_method %}
{% when 'pick-up' %}
You’ll receive an email when your order is ready for pickup.
{% when 'local' %}
Hi {{ customer.first_name }}, we're getting your order ready for delivery.
{% else %}
Hi {{ customer.first_name }}, we're getting your order ready to be shipped. We will notify you when it has been sent.
{% endcase %}
{% if delivery_instructions != blank %}
<p><b>Delivery information:</b> We can not deliver</p>
{% endif %}
{% if star_swag == true %}
Hi {{ customer.first_name }} {{ star_swag_email }}
{% endif %}
{% endif %}
{% endcapture %}

Replies 3 (3)

kaiyaa
Explorer
292 22 28

@Shubz 

In which notification template have you added this code?

Was I helpful? Buy me a coffee
For fast response Message me
Need Help Message me
Shubz
Shopify Partner
12 0 1

Order confirmation

 
 
Shubz
Shopify Partner
12 0 1

From what I read you make these changes in the notification email area. I have tried a bunch of different ways with no success at all. Not sure why the code seems current, the idea is to send to a collection group that I title with the same word and if that word is not there use he default one.