Add Supertime details to my email templates
Do you want to include Supertime details in your email templates? Supertime supports that!
You can show Supertime's selected date, time and delivery method in any of your email notifications using Shopify's order attribute tags. Paste the following snippets into your notification templates in your Notifications settings:
- Date (using localized date formats) :
{{ attributes["Supertime Delivery Date"] | date: format: "basic" }}
- Date (DD/MM/YY, using custom date formats):
{{ attributes["Supertime Delivery Date"] | date: '%d/%m/%Y' }}
- Date (MM/DD/YY, using custom date formats):
{{ attributes["Supertime Delivery Date"] | date: '%m/%d/%Y' }}
- Time (default - 24 hour time):
{{ attributes["Supertime Timeslot"] }}
- Time (12 hour time or custom time formats):
{{ attributes["Supertime Timeslot"] | slice: 0,4 | time_tag: '%-I:%M %p' }} - {{ attributes["Supertime Timeslot"] | slice: 8,12 | time_tag: '%-I:%M %p' }}
- Delivery Method:
{{ attributes["Supertime Delivery Method"] }}
Here is a sample that you can copy and paste directly into your template:
<p>Date: {{ attributes["Supertime Delivery Date"] | date: '%m/%d/%y' }}</p> <p>Time: {{ attributes["Supertime Timeslot"] | slice: 0,5 | time_tag: '%-I:%M %p' }}-{{ attributes["Supertime Timeslot"] | slice: 8,12 | time_tag: '%-I:%M %p' }}</p> <p>Method: {{ attributes["Supertime Delivery Method"] }}</p>
For example, in your order confirmation email, you'll want this code just within your capture_body block:
Steps:
- Visit your Notification Settings.
- Click on the email template you wish to edit.
- Located the section of code where you would like to insert your Supertime details.
- Paste in the relevant code snippets above.
- Click the save button.
- Need to customize the date format for your "basic" filter? refer to this document