For the complete documentation index, see llms.txt. This page is also available as Markdown.

Including Rental Dates in your Shopify Order Confirmation Emails

Make sure customers can see the dates they booked in their confirmation

A customer's rental dates come through on an order as line item properties. By default, Shopify does not include line item properties in it's Order Confirmation email template.

To modify the template, go to Shopify Settings > Notifications > Customer Notifications > Order confirmation, then click Edit Code at the top right.

Based on the current default template, we recommend including the line item properties anywhere that the variant.title is output within the template.

Unfortunately, the code of the email template is quite complex and outputs slightly different formats for different types of products, so there will usually be quite a few parts of the template that need new code added to cover all scenarios.

We recommend searching the template for all outputs of variant.title . For Example:

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and is_parent == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.nested_line_parent? %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and false == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}          

          {% if false %}
            {% for child_line in line.bundle_components %}

In this code, variant.title is being displayed, with some conditions that determine how it should be displayed.

Beneath this, we want to output the item's line item properties, which includes the rental dates, delivery method and any custom field data you may have attached.

The code to output all properties, excluding hidden properties (anything that starts with an underscore) is:

If you only want to output specific properties by name, you could use something like this:

This would only output the Delivery Date and Return Date properties, if that's how they've been named in your Rental Settings.

Coming back to the example earlier, I would paste in the code after the block that outputs the variant.title, like so:

If you're finding it's just too difficult, or it's not working as expected, please just feel free to contact us and we can do it for you. We'll need collaborator access to your store and we can make the request for your approval once your support enquiry comes in.

Last updated