How to Add a Gift Wrap Option to Shopify Order Emails
How to Add a Gift Wrap Option to Shopify Order Emails
A customer pays for gift wrap, then the confirmation email says nothing about it. The package arrives plain, or worse, with the receipt and price inside. That's the failure mode this guide fixes: getting the gift wrap choice from checkout into the attributes of every order email Shopify sends, from confirmation to shipping to delivery.
The work happens in three places — a checkout input, a cart/order attribute, and the notification templates. None of it requires a paid app if you're comfortable editing Liquid, and all of it is testable before a single order goes out.
Why Gift Wrap Needs Its Own Setup in Shopify Emails
Shopify's notification templates can only print data that exists on the order. Gift wrap isn't a native field, so out of the box there's nothing to print. Three things follow from that:
- The choice must be captured before the order is created. A post-purchase survey or a note in the order's timeline won't reach the confirmation email, which fires immediately at checkout.
- The data must live on the order, not the customer. Gift wrap is per-order. Storing it on the customer record means it leaks into future orders and into marketing segments.
- Email templates are per-notification. Adding the line to the order confirmation does nothing for the shipping confirmation. Each template you want to show gift wrap needs the same snippet.
If you sell gift wrap as a product instead, the line item will appear in emails automatically — but it also appears as a physical SKU you have to ship, and it can't be applied to specific items in a mixed cart. The attribute approach is cleaner for a service fee.
Step 1: Capture the Gift Wrap Choice at Checkout
Shopify's checkout is locked down for most merchants, so you can't add a native checkbox. You have two viable routes.
Route A: Cart attribute via theme. Add a checkbox to the cart page or the cart drawer using a cart attribute. In your theme's cart template (sections/main-cart-footer.liquid or your cart drawer section), add:
<label for="gift-wrap">
<input type="checkbox" id="gift-wrap" name="attributes[Gift wrap]" value="Yes">
Add gift wrap
</label>
Cart attributes submitted with name="attributes[...]" are carried into checkout and saved on the order. This is the simplest no-app method. The tradeoff: the checkbox lives in the cart, not at checkout, so a customer who skips the cart (buy-it-now, dynamic checkout buttons) won't see it.
Route B: Cart attribute app. Apps like Cart Attributes or Infinite Options (check current pricing and Shopify plan compatibility) add fields to the cart or product page without Liquid edits. Useful if you want conditional logic — for example, only show gift wrap when the cart contains certain product types.
For a fee, create a separate "Gift wrap" product priced at your fee, set to not require shipping, and let the attribute drive whether the fee applies. Do not rely on the customer to add both.
Step 2: Store the Selection as a Cart or Order Attribute
Once the customer checks out, Shopify converts cart attributes into order attributes. You can see them in the admin under the order's Additional details section, or via the API as note_attributes.
Verify the attribute name is exact and consistent. Gift wrap and gift wrap are different keys in Liquid. Pick one — for example Gift wrap — and use it everywhere. The value should be a plain string like Yes, with the message stored separately if you collect one.
If you also want a gift message, add a second field:
<textarea name="attributes[Gift message]" placeholder="Gift message (optional)"></textarea>
Both attributes will then be available in every notification template as order.attributes.
Step 3: Edit the Order Confirmation Notification to Show Gift Wrap
Go to Settings → Notifications → Order confirmation and click Edit code. Find a sensible spot — after the line items table, before the totals — and insert:
{% if order.attributes["Gift wrap"] == "Yes" %}
<p><strong>Gift wrap:</strong> Included</p>
{% if order.attributes["Gift message"] != blank %}
<p><strong>Gift message:</strong> {{ order.attributes["Gift message"] }}</p>
{% endif %}
{% endif %}
Two details matter here. First, guard the whole block with the if so non-gift orders don't show an empty label. Second, escape the message if you're rendering it into HTML — Shopify's default templates already escape output, but if you're hand-writing HTML, use {{ order.attributes["Gift message"] | escape }} to avoid broken markup from quotes or angle brackets.
If you use a third-party email app that overrides Shopify notifications (Klaviyo, Omnisend, etc.), the edit must happen in that app's template instead — Shopify's template won't fire. Check which system actually sends your confirmation before editing.
Step 4: Add Gift Wrap Details to Shipping Confirmation and Other Emails
Repeat the block from Step 3 in each template where the information is useful. The table below is a reasonable starting point.
| Notification | Show gift wrap? | Why |
|---|---|---|
| Order confirmation | Yes | Confirms the customer paid for it |
| Shipping confirmation | Yes | Reminds the packer and the recipient |
| Out for delivery / Delivered | Optional | Useful if the recipient is different from the buyer |
| Order edited / Refund | Yes | Prevents disputes if gift wrap is removed |
| Abandoned checkout | No | Attribute may not exist yet |
For the packing slip, the same order.attributes data is available — add the gift wrap line near the top so warehouse staff see it before packing. If you print slips through an app like Order Printer, check that it exposes order attributes; most do, but confirm in the app's template variables.
If you want a single source of truth, save the block as a snippet (snippets/gift-wrap-line.liquid) and render it with {% render 'gift-wrap-line', order: order %} in each template. One edit updates every email.
Step 5: Test Every Email Before You Go Live
Place real test orders — not draft orders, which behave differently in some flows. Use Shopify's Bogus Gateway in test mode, or a 100%-off discount code for a live test.
- Place one order with gift wrap and a message, one with gift wrap and no message, and one with neither.
- Check the confirmation, shipping confirmation, and packing slip for each.
- Confirm the attribute appears in the admin under Additional details.
- Send yourself the emails via Settings → Notifications → Send test notification only after the real test orders pass — the test sender uses sample data, not your attributes.
- Check rendering in Gmail and Apple Mail; a stray
<from an unescaped message is the most common break.
Common Pitfalls and Quick Fixes
Gift wrap shows on every order. The if guard is missing or the attribute value has whitespace. Compare with == "Yes" after trimming, or check != blank instead.
Attribute missing on express checkout orders. The checkbox lived in the cart, and the customer skipped it. Move the field to the product page or accept that express checkout bypasses it — and state that in your gift wrap policy.
Message renders as raw HTML or breaks the layout. Escape the output: | escape.
Emails sent by a third-party app ignore the edit. The template you edited isn't the one sending. Check the app's flow settings and edit there.
Packing slip lacks the line. The slip app doesn't expose order.attributes — check its variable reference or add the line to the Shopify packing slip template directly.
Gift wrap fee charged but no attribute saved. The fee is a product line item, the attribute is separate. Link them: only offer the fee product when the attribute is set, or apply the fee via a cart script/discount.
Conclusion
Gift wrap in Shopify emails comes down to capturing the choice as a cart attribute, confirming it lands on the order, and printing it in each notification template with a guard so plain orders stay clean. Test with real orders before launch, and keep the snippet in one place so future edits don't drift between templates. Once it's set up, the whole flow runs without manual intervention.
FAQ
Do I need a paid app to add gift wrap to Shopify emails? No. A cart attribute plus a few lines of Liquid in the notification templates covers the standard case. Apps help if you want conditional logic, product-page options, or a no-code interface — check current pricing before committing.
Will the gift wrap option show at checkout? Not natively. Shopify's checkout can't be customized with a checkbox on most plans, so the option lives in the cart or on the product page. Customers using express checkout buttons may bypass it.
Can I hide the gift wrap fee from the packing slip? Yes — the packing slip template is separate from the emails, so you can print the attribute and the fee line independently, or suppress the fee line if you'd rather not show pricing to the recipient.