How to Add a Gift Message to Shopify Packing Slip

2026-10-07 · shipping fulfillment

A gift message is one of the cheapest ways to make a Shopify order feel personal. But if that message only lives in your order notification emails, whoever opens the box never sees it. The fix is to print the gift note directly on the packing slip, so it travels with the order.

Shopify's Order Printer app gives you full control over your packing slip template, which means you can pull the gift message field into the printed document with a few lines of Liquid. Here's how to set it up, test it, and know when a dedicated app is worth installing instead.

Why Add a Gift Message to Your Shopify Packing Slip

When a customer buys a gift, two people matter: the buyer and the recipient. The buyer wants the recipient to know who sent it. The recipient wants to know what it is and who to thank.

If your packing slip shows only prices and SKUs, the recipient gets a box with no context. If it shows prices, you've also created an awkward moment — the recipient now knows exactly what the buyer spent.

Adding a gift message to the packing slip solves both problems:

What You'll Need Before You Start

Get these in place first:

One decision to make up front: are you using the built-in order note, or a custom cart attribute? The order note is faster to set up but mixes gift messages with delivery notes. A cart attribute is cleaner and is what the Liquid code below targets.

Step 1: Capture the Gift Message at Checkout

You need the message stored somewhere on the order before you can print it. The most reliable method is a cart attribute, which becomes an order attribute (also called a note attribute) when the order is placed.

Add a field to your cart form. In your theme's cart.liquid or sections/main-cart.liquid (names vary by theme), inside the cart <form> element, add:

<p class="cart-attribute__field">
  <label for="gift-message">Gift message (optional)</label>
  <textarea id="gift-message" name="attributes[Gift message]" placeholder="Add a short note for the recipient"></textarea>
</p>

The attributes[Gift message] name is what matters. Shopify stores anything in that format as an order attribute, and Order Printer can read it by that exact key.

If you'd rather not touch theme code, several cart apps add custom fields without editing Liquid — Releasit, Infinite Options, and similar tools all do this. Check current pricing and Shopify plan compatibility before installing.

Test that it works: add a product to the cart, type a message, complete a test order (use Shopify's Bogus Gateway or a 100% off discount code), and confirm the attribute appears on the order's detail page under "Additional details."

Step 2: Open the Order Printer Template Editor

In your Shopify admin, go to Apps → Order Printer. Click Manage templates, then open the template you use for packing slips. Most stores start with the default "Packing slip" template.

You'll see a mix of HTML and Liquid. Find the section where the order line items loop begins — usually something like {% for line_item in line_items %}. The gift message should print once, near the top of the document, not inside the loop. Printing it inside the loop would repeat it for every product.

A good spot is directly under the shipping address block, before the line items table.

Step 3: Add the Liquid Code to Your Packing Slip

Paste this block where you want the message to appear:

{% if attributes["Gift message"] != blank %}
  <div class="gift-message" style="border: 1px solid #ddd; padding: 12px; margin: 16px 0;">
    <strong>Gift message:</strong>
    <p style="margin: 8px 0 0;">{{ attributes["Gift message"] }}</p>
  </div>
{% endif %}

A few things worth knowing about this snippet:

If you also want to suppress prices on gift orders, wrap your price cells in a conditional keyed to a second attribute, such as attributes["Is this a gift?"]. That's a separate field you'd add in Step 1 alongside the message.

Step 4: Test and Preview Your Gift Message

Order Printer has a Preview button in the template editor that renders the template against a sample order. Use it first — it's fast and doesn't require a real order.

Then do a real test:

  1. Place a test order with a gift message filled in.
  2. Open the order in your admin.
  3. Go to More actions → Print with Order Printer.
  4. Select your template and generate the PDF.
  5. Check three things: the message text appears correctly, punctuation and line breaks survive, and the box is absent on an order with no gift message.

Also test a long message. A 500-character note can push your line items onto a second page, which wastes paper. Consider truncating with {{ attributes["Gift message"] | truncate: 300 }} if you expect long notes.

Common Issues and Quick Fixes

Symptom Likely cause Fix
Gift message box prints empty on every order Missing or broken != blank check Confirm the if wrapper is present and the attribute key is spelled correctly
Message never appears at all Attribute key mismatch between cart field and template Compare attributes[Gift message] in both places character by character
Message repeats for every line item Code placed inside the {% for line_item %} loop Move the block above the line items table
Only the first word prints Unescaped quotes or a stray " in the message Use {{ attributes["Gift message"] }} without extra quotes; test with apostrophes
Formatting looks broken in the PDF External CSS not loading Move to inline styles or a <style> block in the template
Message shows on non-gift orders Using {{ note }} instead of the attribute Switch to the attribute key and add the blank check

When a Free App Is the Better Option

Editing Liquid is fine if you're comfortable in a theme editor and your gift message needs are simple. It stops being the better option when:

Apps in this space include Gift Note, Gift Wrap, and several cart-attribute tools that bundle gift messaging with upsells. Features and pricing change often, so check current pricing and reviews in the Shopify App Store before committing — and confirm the app writes to order attributes, not a private database, or your Order Printer template won't be able to read it.

The DIY route costs nothing and keeps your data in Shopify. The app route costs a monthly fee and saves you maintenance. For a store doing under a few hundred orders a month with a single gift message field, the template edit is usually enough.

Adding a gift message to your Shopify packing slip is a fifteen-minute change that turns an anonymous box into a personal one. Capture the message as a cart attribute, print it with a short Liquid block in Order Printer, and test it against both gift and non-gift orders before you go live. Once it's in place, it runs on every order without further attention.

FAQ

Does Shopify include a gift message field by default? No. Shopify's checkout has a general order note field, but it's shared with delivery instructions. A dedicated gift message requires a cart attribute added through your theme or a cart app.

Will the gift message show on the customer's order confirmation email? Only if you add it. Order confirmation emails use separate templates, and order attributes aren't printed automatically. Add a Liquid block referencing attributes["Gift message"] to your notification template if you want it there too.

Can I hide prices on gift orders at the same time? Yes. Add a second cart attribute like "Is this a gift?" and wrap your price cells in a conditional in the Order Printer template. The message and the price suppression then work from the same checkbox.