
Shopify: Show messages on Order Confirmation & Shipping Confirmation Emails based on Product Tags in the order
On a recent project our client needed to show additional Shipping Information for each product in both the Order Confirmation & Shipping Confirmation Emails. Each Product in the store has a Product Tag relating to Shipping.
Order confirmation
Insert the code below after the code the renders the Product Title.
{% if line.product.tags contains 'DROPSHIP-SHIPPING' %}
Delivered within 7-14 working days (UK Mainland Only)
{% elsif line.product.tags contains 'SAMPLE-SHIPPING' %}
Delivered within 1-3 working days (UK Mainland Only)
{% elsif line.product.tags contains 'MWV-SHIPPING' %}
Delivered within 4 weeks (UK Mainland Only)
{% else %}
Delivered within 1-3 working days (UK Mainland Only)
{% endif %}
Shipping confirmation
Insert the code below after the code the renders the Product Title.
{% if line.line_item.product.tags contains 'DROPSHIP-SHIPPING' %}
Delivered within 7-14 working days (UK Mainland Only)
{% elsif line.line_item.product.tags contains 'SAMPLE-SHIPPING' %}
Delivered within 1-3 working days (UK Mainland Only)
{% elsif line.line_item.product.tags contains 'MWV-SHIPPING' %}
Delivered within 4 weeks (UK Mainland Only)
{% else %}
Delivered within 1-3 working days (UK Mainland Only)
{% endif %}
The result is as below:
