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 %}
Delivery information: We can not deliver
{% endif %} {% if star_swag == true %} Hi {{ customer.first_name }} {{ star_swag_email }} {% endif %} {% endif %} {% endcapture %}