English

How to Display the Preferred Delivery Date and Time in Order Confirmation Emails?

Answer

You can display the preferred delivery date and time in order confirmation emails by adding a dedicated Liquid snippet to your Shopify notification template. Follow the steps below to set it up.

What This Setup Does

Once configured, the Preferred Delivery Date and Preferred Delivery Time selected by customers during checkout will be automatically displayed in the order confirmation email.

❗️ The delivery information will not be displayed for orders where a delivery date or time was not selected.

Setup Instructions

❗️ If you have already customized your order confirmation email template, you can ignore Steps 1 and 2 and paste the code wherever you'd like it to appear.

Step 1: Open the Notification Template

  1. Log in to your Shopify admin and click Settings in the lower-left corner.
  2. Select Notifications.
  3. Under the Customer notifications section, click Order confirmation.

Step 2: Add the Code

Click the Edit code button in the upper-right corner.

The HTML source for the email template will be displayed. Copy and paste the following code into the template.

Where to paste the code: Inside the <table> element that contains the customer's shipping address and contact information. (If you've customized your order confirmation email, you may paste the code wherever you'd like the delivery information to appear.)

💡 On Mac, press ⌘ + F. On Windows, press Ctrl + F, then search for "Shipping address" to quickly locate the appropriate section.

Code to Paste


{% if attributes != blank %}
  <tr>
    <td class="customer-info__item" colspan="2">
      <h4>配送日時</h4>
      <table>
        {% for attribute in attributes %}
          {% if attribute[1] != blank %}
            {% if attribute[0] == 'お届け希望日' or attribute[0] == 'お届け希望時間帯' %}
              <tr>
                <td>{{ attribute[0] }}</td>
                <td>{{ attribute[1] }}</td>
              </tr>
            {% endif %}
          {% endif %}
        {% endfor %}
      </table>
    </td>
  </tr>
{% endif %}

Step 3: Save the Template

Click the Save button in the upper-right corner to complete the setup.

Example Output

For orders with a selected delivery date and time, the information will appear in the email as shown below.

The display location depends on where you inserted the code in Step 2.

Testing the Setup

❗️ Although Shopify provides preview and test email options, the delivery information will not appear when using those methods. To verify that the setup works correctly, place a real order through your storefront and confirm the contents of the order confirmation email.

Troubleshooting

Issue What to Check
Delivery information does not appear in the email. Make sure the app is installed correctly in your Shopify store.
The email layout is broken. Make sure the code was pasted inside the appropriate <table> element.
Delivery information is missing for some orders. The customer may not have selected a preferred delivery date or time for those orders. This is expected behavior.

Related apps