How do I show different delivery dates based on the product tags for in-stock and pre-order items?

I have in-stock items and sold-out ones that automatically become pre-order items using an app. The app generates a pre-order tag on each order.

Currently, customers who buy pre-order items receive order notifications that display the delivery date of my in-stock items, causing confusion.

I only do weekly deliveries every Saturday, anytime between 12 pm and 4:30 pm.

So, I was hoping to set up the following:

  • Product Tag “in-stock” - customers will see the order confirmation delivery date of 23rd Dec, between 12 pm and 4:30 pm.
  • Product Tag “pre-order” - customers will see the order confirmation delivery date of 30th Dec, between 12 pm and 4:30 pm.

Can I do this manually, or do I need an app? I’ve been searching for a few days but can’t seem to find a solution for this. I would appreciate it if anyone could help me. Thank you in advance.

Hello @kuehlapisbymom ,

Try this

{% if order.tags contains 'in-stock' %}
  // Do your message and logic for 23rd Dec
{% else %}
  // Do your mesage and  logic for 30th Dec
{% endif %}

Hi Guleria.., Thank you! But where do I type this or copy and paste?

  • Go to your Shopify admin.
  • Navigate to Settings > Notifications.
  • Click on “Order confirmation” to edit the email template.

Hi I think I made a mistake it’s not actually order tags but product tags.

the two product tags are ‘in-stock product’ and ‘pre-order product’

If both are in the order, it should show 2 delivery dates. I tried modify the codes, you gave just now but it didn’t work.

Can you check what I did wrong?

{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
{% case delivery_method %}
{% when ‘pick-up’ %}
You’ll receive an email when your order is ready for pickup.
{% when ‘local’ %}
Hi {{ customer.first_name }}, we’re getting your order ready for delivery.
{% else %}

{% if product.tags contains ‘in-stock product’ %}
// The delivery is scheduled for Saturday, December 24th, 2023, between 12 pm and 4:30 pm.
{% elsif product.tags contains ‘pre-order product’ %}
// The pre-order delivery is scheduled for Saturday, December 30th, 2023, between 12 pm and 4:30 pm.
{% endif %}

{% if product.tags contains ‘in-stock product’ and product.tags contains ‘pre-order product’ %}
// The delivery is scheduled for Saturday, December 24th, 2023, between 12 pm and 4:30 pm.
// The pre-order delivery is scheduled for Saturday, December 30th, 2023, between 12 pm and 4:30 pm.
{% endif %}



Thank you for your patience, 2 out of 3 conditions worked. So we are almost there.

{% if order.tags contains 'in-stock product' and 'pre-order product'%}
**The next delivery is scheduled for Saturday, January 6th, 2024, between 12 pm and 4:30 pm.** <small>(Our last pre-order will be available on January 13th, 2024. You will receive a separate confirmation email. For more information, please contact support@kuehlapisbymom.com.)</small>
{% elsif order.tags contains 'in-stock product'%}
**The next delivery is scheduled for Saturday, January 6th, 2024, between 12 pm and 4:30 pm.**
{% else %}
**Our last pre-order will be available on January 13th, 2024. You will receive a separate confirmation email.**
{% endif %}
{% if order.tags contains 'in-stock product' and 'pre-order product'%}
**The next delivery is scheduled for Saturday, January 6th, 2024, between 12 pm and 4:30 pm.** <small>(Our last pre-order will be available on January 13th, 2024. You will receive a separate confirmation email. For more information, please contact support@kuehlapisbymom.com.)</small>

Hi Guleria and everyone,

I’m seeking some assistance with a potential issue related to Shopify Flow conditions and product tags. I’d be grateful if someone could take a look at my setup and offer guidance.

Here’s a summary of the challenges I’m encountering:

  1. Delivery Dates Not Displaying Correctly: When a cart contains a mix of in-stock and pre-order products, the order confirmation should display two separate delivery dates. However, this isn’t currently happening. This is likely my coding problems.

  2. Inventory Quantity Affecting Tag Recognition: If an in-stock product has a quantity of 1, it seems to be reclassified as a pre-order product after the credit card transaction, even though it was initially tagged as in-stock. This prevents the second delivery date from being shown.

I’m wondering if there’s a way to address these issues and ensure accurate delivery date display, even for in-stock products with low quantities. Any insights or suggestions would be greatly appreciated!

Thank you in advance for your expertise and support.