Order Tag as liquid variable

jakob123
Visitor
1 0 0

Hello, 

Is it possible to get the order tag as a liquid variable?

 

I want to customize my order confirmation mail for pre-orders, which we are currently tagging with "pre-order" in shopify. 


Kind regards,

Jakob

Reply 1 (1)

JoesIdeas
Shopify Expert
2120 191 564

Yes use {{ tags }}. Reference: https://help.shopify.com/en/manual/orders/notifications/email-variables

 

Example:

{% for tag in tags %}
  {% if tag == "pre-order" %}
    <p>Something to show specifically for pre orders
  {% elsif tag == "some other tag" %}
    <p>Show something for another tag</p>
  {% endif %}
{% endfor %}
    

 

• 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