You can modify the format of the pickup/delivery/shipping date and time in your email notifications by adding code to your templates.
Create a backup of your current email templates before making any changes.
Requirements
You need to edit the templates in order to include Zapiet - Pickup + Delivery order details.
For more information, you can take a look at our Email notifications guide.
You may wish to edit:
Change the date format
By default, your date will be in the format "Day, date month year"—for example,
"Sunday, 1 January 2023". The day and month cannot be translated into other languages, but you can change the format to only include numbers.
In your Shopify Settings go to Notifications. Open the email template you would like to modify, like the Order Confirmation template.
Click Edit code.
Find the following liquid variable that shows the customer's pickup date:
{{ attributes.Pickup-Date
Replace the above code with the following line:
{{ attributes.Pickup-Date | date: "%A, %-d %B %Y" }}
Use strftime.net to get your preferred date format
Example: %d/%m/%Y will display the date in DD/MM/YYYY format.
Replace the code between the quote marks " " with your preferred date format.
Example: "%A, %d/%m/%Y"
Repeat these steps on the liquid variables for the local delivery and shipping dates as required. A full list of available liquid variables for Zapiet - Pickup + Delivery can be found in our Liquid variable reference guide.
Use the attributes below to find the local delivery and shipping date formats.
Local Delivery date
{{ attributes.Delivery-Date
Shipping date
{{ attributes.Shipping-Date
Change the time format
The pickup time by default shows as 24-hour times, whereas delivery will show as the setting chosen in Zapiet - Pickup + Delivery > Settings > Standards and formats.
In your Shopify Settings go to Notifications. Open the email template you would like to modify, like the Order Confirmation template.
Click Edit code.
Find the following liquid variable that shows the customer's pickup time:
{{ attributes.Pickup-Time
Replace this code with the following line:
{{ attributes.Pickup-Time | date: "%r" }}
The small letter 'r' will format the time to appear in the 12-hour format. To make it appear in the 24-hour format the capital 'R' is used instead.
Repeat these steps on the liquid variables for the local delivery time as required. A full list of available liquid variables for Zapiet - Pickup + Delivery can be found in our Liquid variable reference guide.
Use the attributes below to find the local delivery and shipping date formats.
Local Delivery date
{{ attributes.Delivery-Date
Shipping date
{{ attributes.Shipping-Date
Note
The delivery time will show in the same format as is set in your standards and formats setting. If you'd like to modify it, you can use this code to convert the standard.
{% assign deliveryTime = attributes.Delivery-Time | split: "- " %}
{% assign start = deliveryTime.first | date: "%r" %}
{% assign end = deliveryTime.last | date: "%r" %}
Delivery Time: {{ start }} - {{ end }}
The small letter 'r' will format the time to appear in the 12-hour format. To make it appear in the 24-hour format the capital 'R' is used instead.