Hi Shopify Community,
I am currently trying to figure out a way to put the expected arrival date of the order fulfillment email notification.
Because we use only one courier service, we know what our expected arrival date of the fulfilled orders will be based on the province code.
So if the province code is (JP-01 and JP-47), the arrival date of item will be 3 days adding onto the day of the fulfillment.
Next province zone will be 2 days adding onto the day of the fulfillment and the last province zone will be 1 day.
My question is:
a. will this work? I’m not sure if I’m using the “or” element correctly and the fulfillment.updated_at code is done correctly.
b. is there a more cleaner way to make this code?
I’m self teaching myself how to use liquid, and have limited knowledge, so any type of insight would greatly be appreciated!
Because my shop is live and running, I wanted to check my work before i plug it into my notifications.
Thanks everyone for taking a look at this thread.
{% if shipping_address.province_code = ‘JP-01’ or ‘JP-47’ %}
Delivery Expected Date:
{% assign seconds = 3 | times: 24 | times: 60 | times: 60 %}
{{ ‘fullfilment.updated_at’ | date: "%s" | plus: seconds | date: "%Y-%m-%d" }}
{% endif %}
{% if shipping_address.province_code = ‘JP-02’ or ‘JP-03’ or ‘JP-04’ or ‘JP-05’ or ‘JP-06’ or ‘JP-07’ or ‘JP-08’ or ‘JP-09’ or ‘JP-40’ or ‘JP-41’ or ‘JP-42’ or ‘JP-43’ or ‘JP-44’ or ‘JP-45’ or ‘JP-46’ %}
Delivery Expected Date:
{% assign seconds = 2 | times: 24 | times: 60 | times: 60 %}
{{ ‘fullfilment.updated_at’ | date: "%s" | plus: seconds | date: "%Y-%m-%d" }}
{% endif %}
{% if shipping_address.province_code = ‘JP-10’ or ‘JP-11’ or ‘JP-12’ or ‘JP-13’ or ‘JP-14’ or ‘JP-15’ or ‘JP-16’ or ‘JP-17’ or ‘JP-18’ or ‘JP-19’ or ‘JP-20’ or ‘JP-21’ or ‘JP-22’ or ‘JP-23’ or ‘JP-24’ or ‘JP-25’ or ‘JP-26’ or ‘JP-27’ or ‘JP-28’ or ‘JP-29’ or ‘JP-30’ or ‘JP-31’ or ‘JP-32’ or ‘JP-33’ or ‘JP-34’ or ‘JP-35’ or ‘JP-36’ or ‘JP-37’ or ‘JP-38’ or ‘JP-39’ %}
Delivery Expected Date:
{% assign seconds = 1 | times: 24 | times: 60 | times: 60 %}
{{ ‘fullfilment.updated_at’ | date: "%s" | plus: seconds | date: "%Y-%m-%d" }}
{% endif %}