Changing Order Confirmation Message based on Tags

Highlighted
New Member
2 0 0

Hi,

We're trying to edit our order confirmation so that any products tagged with the tag 'preorder' get a different message from all other order confirmations. The code I have written so far is as follows but this doesn't seem to work. Can you assist? 

{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
{% case delivery_method %}
{% when tags contains 'preorder' %}
Hi {{ customer.first_name }}, Thank you for making a pre-order purchase - in doing this you have secured your selection for when stock arrives. We will notify you when it is on its way to you. In the meantime please do contact us if you have any questions.
{% 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> {{ delivery_instructions }}</p>
{% endif %}
{% endif %}
{% endcapture %}

 

Many thanks,

Dan

 

0 Likes