How to Add a Gift Message to Shopify Order Printer
Why Gift Messages Matter for Small Shopify Sellers
A gift message is one of the cheapest conversion levers in e-commerce. When a shopper knows they can add "Happy birthday, Maya — from Aunt Renée" at checkout, they buy with confidence instead of emailing you to ask whether you can include a note. For sellers of candles, jewelry, apparel, baked goods, and subscription boxes, gift orders also tend to carry higher average order values and lower return rates, because the buyer and the recipient are two different people with two different reasons to be happy.
The catch is fulfillment. A gift message that lives only in your Shopify admin is useless if the person packing the box never sees it. That's where Shopify Order Printer comes in: it's the free Shopify app that renders your invoices, packing slips, and labels from a Liquid template you control. With a small template edit, the gift note prints on the packing slip automatically, right next to the line items, so your packer can copy it onto the card without opening a browser tab.
This guide walks through the full setup: capturing the message at checkout, editing the Order Printer template, testing it safely, and avoiding the formatting mistakes that cause blank notes or broken layouts.
Before You Start: What Order Printer Can and Can't Do
Shopify Order Printer is a free first-party app that generates printable documents from order data using Shopify's Liquid templating language. It is not a design tool and not a fulfillment automation platform. Knowing its limits saves hours:
- It can print custom fields, order attributes, line item properties, customer notes, and metafields — as long as they're attached to the order and you reference them correctly in Liquid.
- It can be duplicated, so you can keep a working backup before editing.
- It cannot capture data that was never saved to the order. If your gift message field doesn't write to the cart, no template code will conjure it.
- It cannot email the recipient, schedule delivery, or print on a separate gift receipt automatically. Those need a dedicated app.
- It cannot reliably render third-party app data unless that app exposes the data as order attributes, line item properties, or metafields.
If you need automatic gift receipts, hide prices per-item, or route gift orders to a different fulfillment flow, look at dedicated gift and packaging apps in the Shopify App Store and check current pricing before committing — most charge a monthly fee that only makes sense once you're processing a steady volume of gift orders.
Step 1: Capture the Gift Message at Checkout
Order Printer can only print what's stored on the order, so capture the message first. You have three practical options.
Option A: Cart attributes (recommended for a single message per order). Add a textarea to your cart template that writes to a cart attribute. In a Shopify theme, that looks like a form field named attributes[Gift Message] inside the cart form, plus a checkbox named attributes[Is Gift] with a value of Yes. Cart attributes carry through to the order and appear in Order Printer as order.attributes.
Option B: Line item properties. Use these when the message belongs to a specific item — for example, three gifts in one order, each with its own note. Add an input named properties[Gift Message] inside the product form. These print per line item.
Option C: Order notes. The native "Add a note" field at checkout works, but it's a general-purpose field customers also use for delivery instructions. If you go this route, label it clearly ("Gift message — we'll print this on the packing slip") or you'll end up printing requests for a different delivery window.
For most small stores, Option A plus a simple "This is a gift" checkbox is the right balance of effort and clarity. Test that the field actually appears in the order's Additional details section in your Shopify admin before touching Order Printer.
Step 2: Open and Back Up Your Order Printer Template
In your Shopify admin, go to Apps → Order Printer. You'll see your templates — typically "Invoice," "Packing slip," "Label," and "Full page." Open the one you actually print for fulfillment; for gift notes, that's almost always the packing slip.
Before editing anything:
- Click the template name to open the editor.
- Click Duplicate (or create a new template) and name it something like
Packing slip — gift message v1. - Keep the original untouched as your rollback.
- Note which template is set as the default under Order Printer settings, so you know which one your team prints.
Order Printer templates are Liquid with HTML and inline CSS. If you're not comfortable editing code, duplicate the template and make one small change at a time, previewing after each.
Step 3: Add the Gift Message Code to Your Template
Find a sensible spot in the packing slip — usually directly under the shipping address block or above the line items table. Insert a conditional block so the section only renders when a gift message exists. That keeps normal orders clean.
{% if order.attributes["Gift Message"] != blank %}
<div style="border:1px solid #000; padding:12px; margin:16px 0;">
<strong>Gift Message</strong>
<p style="margin:8px 0 0 0; white-space:pre-wrap;">{{ order.attributes["Gift Message"] }}</p>
</div>
{% endif %}
Key details that matter:
- Use the exact attribute name.
order.attributes["Gift Message"]is case- and space-sensitive. If your checkout field isattributes[gift_message], the Liquid key must match exactly. white-space:pre-wrappreserves the customer's line breaks so a multi-line note doesn't collapse into one paragraph.- Escape nothing manually. Liquid auto-escapes output in most contexts; if you see stray HTML in the printed note, use
{{ order.attributes["Gift Message"] | escape }}. - For line item properties, loop through items instead:
{% for line_item in line_items %}{% if line_item.properties["Gift Message"] != blank %}...{% endif %}{% endfor %}. - If you use a gift checkbox, print a small "GIFT" flag so packers know to skip the price on the invoice.
Save the template. Order Printer does not version-control for you, which is why Step 2 matters.
Step 4: Test the Template with a Sample Order
Never test on a live customer order. Create a draft order or place a real order with a discount code that makes it free, then:
- Add a gift message with two or three line breaks and an apostrophe.
- Open Order Printer, select the order, and click Print or Preview.
- Check the printed output on paper, not just the screen — browsers render margins differently than printers.
- Confirm the note appears once, is legible, and doesn't push the line items onto a second page unnecessarily.
- Place a second test order with no gift message and confirm the block is completely absent.
| Test case | What to check | Pass criteria |
|---|---|---|
| Gift message, 1 line | Block renders, correct text | Note visible, no layout shift |
| Gift message, multi-line | Line breaks preserved | Text wraps as typed |
| No gift message | Conditional hides block | No empty box or label |
Special characters (', &, emoji) |
Escaping works | Characters print correctly |
| Order with 10+ line items | Pagination | Note stays with its section |
Run this table once after any template change. It takes five minutes and prevents the most common support tickets.
Troubleshooting Common Gift Message Issues
- The note prints blank. The attribute name in Liquid doesn't match the checkout field. Compare the exact key shown in the order's Additional details panel against your code.
- The block shows on every order. Your
{% if %}condition is missing or checking the wrong variable. - The note appears but garbled. Special characters aren't escaped, or the field is being written as HTML. Add the
escapefilter. - The note is cut off. The container has a fixed height or the text is inside a table cell with
overflow:hidden. - Nothing appears for line item properties. You're referencing
order.attributeswhen the data lives online_item.properties. - The app shows old data. Order Printer caches templates; save the template and reload the preview.
Best Practices for Gift Notes on Invoices and Packing Slips
- Print the gift message on the packing slip, not the invoice, and keep prices off anything that goes inside the box.
- Add a visible "GIFT — no prices included" flag so packers don't have to guess.
- Keep the note block visually distinct (a thin border works well) so it can't be missed during a fast pack.
- Store the message as a cart attribute for one-note orders and line item properties for multi-gift orders — don't mix the two in one store without documenting it.
- If you handwrite the note on a card, print the message in a larger font so it's easy to copy accurately.
- Back up your template before every edit and keep a dated copy of working versions.
If gift volume grows past a few orders a day, evaluate a dedicated gift message app for automatic gift receipts and recipient emails — check current pricing and confirm it writes data to order attributes so Order Printer can still print it.
Conclusion
Adding a gift message to Shopify Order Printer is a two-part job: capture the message as an order attribute at checkout, then print it with a short conditional Liquid block in your packing slip template. Back up the template first, test with a real sample order, and the whole setup takes under an hour. Once it's live, your packers see every gift note automatically and your customers stop emailing you to ask.
FAQ
Does Order Printer come free with Shopify? Yes, Order Printer is a free first-party Shopify app for generating invoices, packing slips, and labels. Check the Shopify App Store listing for current availability on your plan.
Can I print a different gift message for each item in one order?
Yes, if you capture the message as a line item property rather than a cart attribute. Loop through line_items in the template and print each item's properties["Gift Message"] next to that item.
Will the gift message show on the customer's invoice too? Only if you add the same code to the invoice template. Most sellers deliberately keep gift notes on the packing slip only, since invoices may be emailed with prices visible.