Liquid Variables for tags not working properly.

sehenley
New Member
5 0 0

Hello. 

 

I have three types of orders that come into my store, I've set things up so the orders get specific tags depending on the type of order. I have also set up email Order Confirmation notification using liquid so that different email body text is sent depending on the tags applied to the order. The problem I am having is that Shopify seems to send confirmation emails out before the tags are applied to the order, thus all emails are getting sent out with blank bodies. If I go to an individual order and click resend confirmation email, the correct email is text is applied and sent to the customers. Obviously I can't manually go through every order and resend confirmation emails to get this to work, my liquid is pasted below. Any help is much appreciated. 

{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}
{% if tags contains "bridgewater" %}
Hi {{ customer.first_name }}, we're getting your order ready, it will be available to pick up on {{ attributes.Pickup-Date | date: "%A %d %b" }}, anytime between 10am and 3pm, from 46 Bridgewater Street, L1 0AY.
{% endif %}
{% if tags contains "Allerton" %}
Hi {{ customer.first_name }}, we're getting your order ready, it will be available to pick up on {{ attributes.Pickup-Date | date: "%A %d %b" }}, anytime between 10am and 3pm, from 97 Allerton Road, L18 2DD.
{% endif %}
{% if tags contains "Pickupfood" %}
Hi {{ customer.first_name }}, our chefs are preparing your order, it will be ready today to collect at {{ attributes.Pickup-Time }}, you can take it away or eat in if there is space.
{% endif %}
{% endcapture %}

 

0 Likes
Jivan_Suhagiya
Shopify Partner
486 64 102

Hi,
Actually when customer place order, there will no any tag for order. And confirmation email sent instant on order place. 
May be you can set logic in email template as how you're assigning tag to order.

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
First kind of Checkout Reminder APP: https://apps.shopify.com/checkout-reminder
0 Likes