How to Add a Gift Wrap Option to Shopify Cart
Gift wrap is one of the highest-margin upsells in e-commerce: it costs you a few dollars in paper and ribbon, and customers routinely pay more than that for the convenience. On Shopify, you don't need a paid app to offer it — you can build a gift wrap checkbox directly into your cart using line item properties, a native Shopify feature available on every plan.
This guide walks through the full build: the cart checkbox, the fee logic, how the charge appears at checkout, and how to test it before you ship.
Why Add a Gift Wrap Option to Your Shopify Cart?
Gift wrap does three things at once:
- It raises average order value. A customer buying a $40 candle for a friend will often add $5 of wrapping without blinking, because the alternative is buying paper and tape themselves.
- It captures gift buyers you're currently losing. Someone shopping for a birthday has a different intent than someone shopping for themselves. If there's no gift option, many of those buyers leave and order from a retailer that offers one.
- It reduces support tickets. A clear gift wrap checkbox with a gift message field means fewer "can you add a note?" emails after checkout.
The catch is that Shopify's default cart has no built-in gift wrap toggle. You either install an app (Gift Wrapper, Gift Box, and similar apps all do this — check current pricing and reviews before committing) or you build it with line item properties. The DIY route costs nothing per month, gives you full control over styling, and takes about an hour if you're comfortable editing theme code.
How Shopify Line Item Properties Work for Gift Wrap
Line item properties are custom fields attached to a specific product in a specific order. They're submitted through your cart form using input names in the format properties[Your Label]. Shopify stores them with the line item and displays them on the order page, the packing slip, and in order confirmation emails.
Two types matter here:
- Visible properties — anything you name normally, like
properties[Gift message], shows up in the cart and at checkout. - Hidden properties — prefix the name with an underscore, like
properties[_gift_wrap], and it's stored on the order but never shown to the customer.
That hidden-property trick is how you attach gift wrap data to a product without confusing the customer with a weird line item. It's also how you avoid breaking your cart's JavaScript, which often assumes a certain structure per line item.
One important limit: line item properties don't change the price of a product. If you want to charge for gift wrap, you need a separate mechanism — usually a dedicated "Gift Wrap" product added to the cart. We'll cover both approaches below.
Step 1: Add the Gift Wrap Checkbox to Your Cart Template
In your Shopify admin, go to Online Store → Themes → Edit code. Open sections/main-cart-items.liquid (on newer themes like Dawn) or templates/cart.liquid (on older themes like Debut).
Inside the {%- for item in cart.items -%} loop, after the quantity selector, add a checkbox. A minimal version looks like this:
{% if item.product.tags contains 'gift-wrap-eligible' %}
<label class="gift-wrap-toggle">
<input
type="checkbox"
name="updates[]"
data-line="{{ forloop.index }}"
class="gift-wrap-checkbox"
{% if item.properties['_gift_wrap'] == 'yes' %}checked{% endif %}
>
Add gift wrap (+$5.00)
</label>
{% endif %}
A few notes on this snippet:
- The
gift-wrap-eligibletag lets you exclude products that can't be wrapped — digital downloads, oversized items, or anything drop-shipped from a supplier who won't wrap. - The
checkedstate reads from the existing property, so the box stays checked when the cart re-renders. - The price shown should match whatever you actually charge. Update it in one place and keep it consistent.
If you're not comfortable editing Liquid, apps like Gift Wrapper or In Cart Upsell handle this with a settings panel. Check current pricing on the Shopify App Store — most run $10–$20/month.
Step 2: Capture the Gift Wrap Fee with Line Item Properties
The checkbox above captures intent, but it doesn't add money to the cart. The cleanest way to charge is a separate gift wrap product.
Create the product first. In Products → Add product, create a product called "Gift Wrap" with:
- Price: whatever you charge (e.g. $5.00)
- Inventory: don't track inventory
- Shipping: uncheck "This is a physical product" if you want it to skip shipping rates, or leave it checked if you want it bundled with the main shipment
- Status: Active, but hide it from your storefront with a tag or by setting it to "Unlisted" via a sales channel
Then, in your cart JavaScript, when the checkbox is toggled, add or remove that product:
document.querySelectorAll('.gift-wrap-checkbox').forEach(box => {
box.addEventListener('change', async (e) => {
const line = e.target.dataset.line;
const checked = e.target.checked;
await fetch('/cart/change.js', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
line: line,
properties: { '_gift_wrap': checked ? 'yes' : 'no' }
})
});
// Then add or remove the gift wrap product via /cart/add.js
});
});
The exact add/remove logic depends on your theme's cart architecture. If you're using Shopify's Section Rendering API, you can re-render just the cart section instead of reloading the page — much smoother UX.
If you'd rather not manage a hidden product, some apps bundle the fee into the checkbox directly. Either way, the fee must exist as a real line item or Shopify can't charge for it.
Step 3: Display Gift Wrap Charges in the Cart and Checkout
Once the gift wrap product is in the cart, it appears as its own line item — which is exactly what you want. The customer sees:
| Cart line | Price | Notes |
|---|---|---|
| Soy Candle — Lavender | $40.00 | |
| Gift Wrap | $5.00 | Added for order #1234 |
| Subtotal | $45.00 |
The gift message, if you collect one, should be a line item property on the main product, not on the gift wrap product. That way it prints on the packing slip next to the item being wrapped. Use a textarea with name="properties[Gift message]" inside the cart form.
At checkout, Shopify displays the gift wrap line item like any other product. No extra configuration is needed — the fee flows through to the order total, taxes, and payment automatically.
Step 4: Test and Style Your Gift Wrap Option
Test in a development theme before pushing live. Run through this checklist:
- Add a tagged product to cart — does the checkbox appear?
- Check the box — does the gift wrap line item appear with the correct price?
- Uncheck it — does the line item disappear cleanly?
- Reload the cart — does the checked state persist?
- Add a second product — does the checkbox stay scoped to the right line?
- Place a test order — does the gift wrap fee appear in the order confirmation email and on the packing slip?
For styling, match your theme's existing form controls. Use the same font size, border radius, and accent color as your quantity selector. A gift wrap checkbox that looks bolted on reads as spammy; one that matches the cart reads as a normal part of the checkout experience.
Common Pitfalls and Best Practices for Gift Wrap Upsells
- Charging per order vs. per item. Most stores charge once per order. If you charge per item, you need a checkbox on every line, and the math gets confusing fast. Pick one and label it clearly.
- Forgetting tax and shipping implications. A gift wrap product marked as a physical item will be taxed and shipped. If you want it excluded from shipping rates, uncheck the physical product box — but check that your tax settings still apply correctly.
- Not excluding ineligible products. Digital downloads, gift cards, and oversized items shouldn't show a gift wrap option. Use product tags to control this.
- Hiding the fee until checkout. Show the price next to the checkbox. Surprise fees at checkout are the fastest way to lose a sale.
- Ignoring mobile. Over half of Shopify orders come from mobile. Test the checkbox on a real phone, not just a resized browser window.
- Skipping the gift message field. Gift wrap without a message is half a product. Add a textarea, cap it at 200 characters, and print it on the packing slip.
Conclusion
Adding a gift wrap option to your Shopify cart is a one-afternoon project that pays for itself the first time a customer uses it. Build the checkbox with line item properties, charge the fee through a hidden gift wrap product, and test the full flow before you push it live. Once it's working, promote it — a small note on your product pages ("Gift wrap available at checkout") is often enough to lift take rates.
FAQ
Do I need a paid app to add gift wrap to Shopify? No. Line item properties and a hidden gift wrap product are native Shopify features available on all plans. Apps like Gift Wrapper simplify the setup if you don't want to edit theme code, but they're optional — check current pricing on the Shopify App Store if you go that route.
Will the gift wrap fee show up on my packing slip? Yes. The gift wrap product appears as a line item on the packing slip, and any gift message you collect as a line item property will print alongside the product it belongs to. Test with a real order to confirm your slip template renders both correctly.
Can I offer gift wrap on only some products?
Yes. Tag the eligible products (for example, gift-wrap-eligible) and wrap the checkbox in a Liquid conditional that checks the tag. This keeps digital downloads, gift cards, and oversized items out of the gift wrap flow.