All things Shopify and commerce
Hi, I am using an app (IzyRent) for booking dates, and I want to add the order details from the fulfillment page to the email confirmation that is automatically sent out when a customer places an order. Like on this example in the order details.
How do I make the order confirmation email have the dates that show in the order, when it's sent out to the customer. Here's what it looks like now. Any help would be greatly appreciated.
@Layne2Kim , From the screenshot that you have shared, it looks like the shipping information is stored in the order line item properties. If yes, then it can be added to the order confirmation email. By default the line item attributes are present in the order confirmation email in case of a Gift card. However, if you want to display this for non-gift card orders, you will have to edit the code.
Step 1. Open the Order Confirmation template: Settings > Notifcations > Customer Notifications > Order confirmation > Edit code
Step 2. Search for
{% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
{% for property in line.properties %}
{% assign property_first_char = property.first | slice: 0 %}
{% if property.last != blank and property_first_char != '_' %}
<div class="order-list__item-property">
<dt>{{ property.first }}:</dt>
<dd>
{% if property.last contains '/uploads/' %}
<a href="{{ property.last }}" class="link" target="_blank">
{{ property.last | split: '/' | last }}
</a>
{% else %}
{{ property.last }}
{% endif %}
</dd>
</div>
{% endif %}
{% endfor %}
{% endif %}
and replace it by
{% for property in line.properties %}
{% assign property_first_char = property.first | slice: 0 %}
{% if property.last != blank and property_first_char != '_' %}
<div class="order-list__item-property">
<dt>{{ property.first }}:</dt>
<dd>
{% if property.last contains '/uploads/' %}
<a href="{{ property.last }}" class="link" target="_blank">
{{ property.last | split: '/' | last }}
</a>
{% else %}
{{ property.last }}
{% endif %}
</dd>
</div>
{% endif %}
{% endfor %}
What this removal of the gift card condition is that, it will print the line item properties(if present) for every type of product.
This solution is based on the assumption that your delivery information is saved in the line item properties. Please test this once by sending a preview email to yourself before saving this change.
Hi thanks for the reply, I tried to edit that code, and it didn't give me the dates, it looks like this.
In the order it shows the dates it's rented, March 29-March 30th. I just want the dates to show up that show up in the order details, there is no shipping info.
Here's a screenshot of the code I changed, in the order confirmation email.
@Layne2Kim ,
Please remove the below highlighted code lines and test.
Please note, this solution is still based on the assumtion that your dates are stored in the product's line item properties. Please try this once and let me know if this works.
@Sushant Thanks for the info, I tried your last code edit and it gives me this error "Body html Liquid syntax error: 'endfor' is not a valid delimiter for if tags. use endif" so not sure to change.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025