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.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024