Help articles

Show gift choices in the order confirmation email

In our tests, Shopify's default order confirmation did not show the wrap style or message. Paste two short snippets into the notification template to show them. The app sends no email of its own.

Before you start

Where to paste

In your Shopify admin, open Settings → Notifications → Customer notifications → Order confirmation → Edit code.

1. Item wrap, message and recipient

Find the part of the template that prints each item. It may loop over line_items or subtotal_line_items, and may do so in more than one place. In each place, find where the item's title is printed and paste this snippet after it, inside the same cell. If the loop names the item something other than line, use that name in line.properties.

{% for gift_property in line.properties %}
  {% if gift_property.first == 'Gift wrap' or gift_property.first == 'Gift message' or gift_property.first == 'Recipient' %}
    {% if gift_property.last != blank %}
      <p style="margin: 4px 0; overflow-wrap: anywhere;"><strong>{{ gift_property.first | escape }}:</strong> {{ gift_property.last | escape | newline_to_br }}</p>
    {% endif %}
  {% endif %}
{% endfor %}

2. The whole-order instruction

Find the order summary, the part after the item list that prints the subtotal, shipping and total. Paste this snippet just before it.

{% for gift_attribute in attributes %}
  {% if gift_attribute.first == 'Gift order' or gift_attribute.first == 'Gift message (order)' or gift_attribute.first == 'No prices in box' %}
    {% if gift_attribute.last != blank %}
      <p style="margin: 4px 0; overflow-wrap: anywhere;"><strong>{{ gift_attribute.first | escape }}:</strong> {{ gift_attribute.last | escape | newline_to_br }}</p>
    {% endif %}
  {% endif %}
{% endfor %}

Check it before saving

Choose Preview in the template editor. Shopify's preview uses a sample order, which may have no gift fields, so the new lines may not appear there; what you are checking is that the template still renders without an error.

Then save, place a test order with a wrapped item and a message, and read the email you receive. You should see lines like Gift wrap: Kraft and Gift message: Happy birthday Priya under the item, and Gift order: yes under the order summary when the shopper turned on This is a gift.

If your template is customised

Templates differ by version, and yours may have been changed by you or a designer. The rule is the same: the item snippet goes wherever each line item is rendered, using that loop's item name in place of line; the order snippet goes near the order summary, using attributes. If you are not sure, ask whoever built the template.

Other notifications

The same snippets should work in other customer notifications that loop over line items, such as shipping confirmation. The item's name in the code may differ. Paste them the same way and check one test email before relying on it.

The app does not send emails or text messages to shoppers, and it does not change Shopify's packing slip template. The pack sheet is a separate document for your team; see Packing gift orders.

Still stuck? Write to hello@fairstride.app with your store address.