Email Order Confirmation & Shipping Confirmation Not Working as Expected

MattDwyerDev
New Member
2 0 0

When a customer selects the Shipping method, and the title contains "Click & Collect" I want it to capture a different email title and body, however, the if statement doesn't seem to be working. 

Any suggestions as too why this maybe the case?

 

{% if shipping_method.title contains 'Click & Collect' %}
	{% capture email_title %} Your order is ready to be collected {%endcapture%}
	{% capture email_body %} Your order has been packed and is ready for collection. You selected {{ shipping_method.title }}. {%endcapture%}
{% else %}
	{% if fulfillment.item_count == item_count %} 
		{% capture email_title %}Your order is reading{% endcapture %}
		{% capture email_body %}Your order is on the way. Track your shipment to see the delivery status.{% endcapture %}
	{% elsif fulfillment.item_count > 1 %} 
	{% if fulfillment_status == 'fulfilled' %}
		{% capture email_title %}The last items in your order are on the way{% endcapture %}
		{% capture email_body %}The last items in your order are on the way. Track your shipment to see the delivery status.{% endcapture %}
	{% else %}
		{% capture email_title %}Some items in your order are on the way{% endcapture %}
		{% capture email_body %}Some items in your order are on the way. Track your shipment to see the delivery status.{% endcapture %}
	{% endif %}
	{% else %} 
	{% if fulfillment_status == 'fulfilled' %}
		{% capture email_title %}The last item in your order is on the way{% endcapture %}
		{% capture email_body %}The last item in your order is on the way. Track your shipment to see the delivery status.{% endcapture %}
	{% else %}
		{% capture email_title %}One item in your order is on the way{% endcapture %}
		{% capture email_body %}One item in your order is on the way. Track your shipment to see the delivery status.{% endcapture %}
	{% endif %}
	{% endif %}
{%endif%}​

 

0 Likes