Custom Order Confirmation Email based on fulfillment location

Solved

Custom Order Confirmation Email based on fulfillment location

MelTurtle
Visitor
2 0 0

Context: Our company is moving towards a print-on-demand fulfillment model. We currently have a warehouse that we're using to fulfill orders. We will eventually transition to a 100% print-on-demand model, which will be done towards the end of 2024. This means we would have orders with warehouse fulfillment items and some of which would be fulfilled by our print-on-demand partner. 

 

Need:  We want to send an order confirmation email to match the order type. For example: 

1. Regular notification if the order only contains items we will fulfill from our warehouse 

2. Customized email if the order has a print-on-demand item and a warehouse item. We would like to let the customer know that the warehouse item will be fulfilled immediately, and they will receive a separate email about the print-on-demand item. 

 

Any with any experience with this or suggestions? 

Accepted Solution (1)

JoesIdeas
Shopify Partner
2386 219 632

This is an accepted solution.

You can do this by editing your order notification template.

 

This will help: https://help.shopify.com/en/manual/orders/notifications/email-variables

 

You could do something like this:

{% assign has_pod = false %}
{% assign has_warehouse = false %}

{% for item in line_items %}
  {% if item.product.vendor == "Warehouse Vendor 1" or item.product.vendor == "Warehouse Vendor 2" %}
    {% assign has_warehouse = true %}
  {% endif %}

  {% if item.product.vendor == "POD Vendor" %}
    {% assign has_pod = true %}
  {% endif %}
{% endfor %}

{% if has_pod and has_warehouse %}
  <p>This is the message that will show if there is a warehouse and a POD item</p>
{% endif %}

 

I used the product vendor in this example, but you might want to use something like item.product.title contains "T-Shirt" or whatever certain titles have for the different products.

 

I'm not sure if location is accessible in the way you are wanting, but check that document I linked to above, it shows all the available options.

• Creator of Shopify automation apps Order Automator + Product Automator [apps that save you time + money]
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Figure Out Why You're Not Getting Sales

View solution in original post

Reply 1 (1)

JoesIdeas
Shopify Partner
2386 219 632

This is an accepted solution.

You can do this by editing your order notification template.

 

This will help: https://help.shopify.com/en/manual/orders/notifications/email-variables

 

You could do something like this:

{% assign has_pod = false %}
{% assign has_warehouse = false %}

{% for item in line_items %}
  {% if item.product.vendor == "Warehouse Vendor 1" or item.product.vendor == "Warehouse Vendor 2" %}
    {% assign has_warehouse = true %}
  {% endif %}

  {% if item.product.vendor == "POD Vendor" %}
    {% assign has_pod = true %}
  {% endif %}
{% endfor %}

{% if has_pod and has_warehouse %}
  <p>This is the message that will show if there is a warehouse and a POD item</p>
{% endif %}

 

I used the product vendor in this example, but you might want to use something like item.product.title contains "T-Shirt" or whatever certain titles have for the different products.

 

I'm not sure if location is accessible in the way you are wanting, but check that document I linked to above, it shows all the available options.

• Creator of Shopify automation apps Order Automator + Product Automator [apps that save you time + money]
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Figure Out Why You're Not Getting Sales