How to show a dynamic shipping message on the Order Confirmation
emails.
Reasons to us this script
This technique was used during the Christmas holiday season to notify customers the estimated time they should recive their order based on the shipping method they chose.
- Open Order confirmation Emails. Settings > Notifications > Order confirmation
- Find a location to place your script.
- Add the following code, but replace the values in the if statment with the names of the shipping methods.
You have chosen to receive {{ shipping_method.title }} shipping.
{% if shipping_method.title == 'Generic Shipping' %}
Generic Shipping will take 3-5 days to process.
{% elsif shipping_method.title == 'USPS' %}
USPS Shipping will take 5-6 days to process.
{% elsif shipping_method.title == 'Economy Ground' %}
Economy Ground Shipping will take 3-5 days to process.
{% elsif shipping_method.title == 'FedEx 2Day' %}
FedEx 2Day Shipping will take 3-5 days to process.
{% else %}
Shipping is undefined
{% endif %}
Important Notes:
The name used for the Shipping methods must be written exactly like they are in the shipping settings. Settings > Shipping > Zones and Rates > Edit
Use left/right arrows to navigate the slideshow or swipe left/right if using a mobile device