Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Goal with this code is to suppress orders that have a particular tag. When I add the below to the top of the default Ship Notification code, it suppresses all orders, not just the ones with referenced order tag. I am not a coder (obviously), but can someone assist? Code I added on top is the first 5 lines. Partial default code follows:
{% if order.tags contains 'DONOTSEND' %}
{% comment %} Do not send email notification {% endcomment %}
{% else %}
{% comment %} Send email notification {% endcomment %}
{% endif %}
{% if fulfillment.item_count == item_count %}
{% capture email_title %}Your order is on the way{% endcapture %}
{% capture email_body %}Your order is on the way. You can track your shipment to see the delivery status. If your item is a digital download product you will receive a separate email with your download product instructions. {% 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 %}
That would be great. How soon can he help? Thanks.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025