Show the chosen date/time on the packing slip using the new Shopify Order Printer app

This documentation page explains how to make the chosen date/time visible in the packing slip provided by Shopify when using the new Shopify Order Printer app. If you are still using Shopify's old Order Printer app, you can click here.


If the date picker (widget) is placed on the CART page

If your widget is set to the PRODUCT page, click here.

When the date picker is placed on the cart page, we can display the chosen date/time slot. This is the expected outcome:

We need to modify the packing slip templates to display the line item properties to obtain that result. To do so, on the Shopify Order Printer app, go to Templates then click on the Packing slip template.

The code snippet can be placed anywhere within the Packing slip template.

{% assign tag_names = "Method,Delivery Date,Delivery Time,Pickup Date,Pickup Time" | split: "," %}
{% for tag_name in tag_names %}
{% if order.attributes[tag_name] %}
<div><b>{{ tag_name }}:</b> {{ order.attributes[tag_name] }}</div>
{% endif %}
{% endfor %}

For this example, we are going to put the snippet around line 96:

Important: make sure to modify the first line to list all the possible attribute names you want to display. They need to be the exact same values that you've set in the app's Settings > Texts and Languages.

The values are defined in "Messages":

  • Method tag label - Default value: Method
  • Order tag date label (if applicable, check the value for both "Local delivery" and "Store pickup") - Default value: Delivery Date / Pickup Date
  • Order tag time slot label (if applicable, check the value for both "Local delivery" and "Store pickup") - Default value: Delivery Time / Pickup Time

If you have multiple languages set up, include the tag for each one. Make sure each tag label is separated with a comma, without any extra spaces. For example:

{% assign tag_names = "Method,Local Delivery Date,Time Slot,Store Pickup Date,Time Slot" | split: "," %}

If these values are not exactly the same as those set in the admin, the dates will not appear in the Packing slip.


If the date picker (widget) is placed on the PRODUCT page


When the date picker is placed on the product page, the chosen date and time slot are stored as a property on the order line items. That means we can display each order item's chosen date/time slot. This is the expected outcome:

We need to modify the packing slip templates to display the line item properties to obtain that result. To do so, on the Shopify Order Printer app, go to Templates then click on the Packing slip template.

The code snippet will be inserted in the line item loop alongside the product title:

{% assign tag_names = "Method,Delivery Date,Delivery Time,Pickup Date,Pickup Time" | split: "," %}
{% for tag_name in tag_names %}
  {% if line_item.properties[tag_name] %}
      <div><b>{{ tag_name }}:</b> {{ line_item.properties[tag_name] }}</div>
  {% endif %}
{% endfor %}

This is how it would look like:

Important: make sure to modify the first line to list all the possible attribute names you want to display. They need to be the exact same values that you've set in the app's Settings > Texts and Languages.

The values are defined in "Messages":

  • Method tag label - Default value: Method
  • Order tag date label (if applicable, check the value for both "Local delivery" and "Store pickup") - Default value: Delivery Date / Pickup Date
  • Order tag time slot label (if applicable, check the value for both "Local delivery" and "Store pickup") - Default value: Delivery Time / Pickup Time

If you have multiple languages set up, include the tag for each one. Make sure each tag label is separated with a comma, without any extra spaces. For example:

{% assign tag_names = "Method,Local Delivery Date,Time Slot,Store Pickup Date,Time Slot" | split: "," %}

If these values are not exactly the same as those set in the admin, the dates will not appear in the Packing slip.


If you need any assistance setting up this app, feel free to contact us using the Beacon inside the app.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.