How to Add a Gift Wrap Option to Shopify Product Pages

2026-10-23 · upselling

Gift wrap is one of the cheapest upsells in e-commerce, and Shopify handles it without a paid app. You add a checkbox to your product form using line item properties, a native Shopify feature that attaches custom data to a cart line. The customer ticks the box, the choice travels with the order through cart, checkout, and the admin, and your team sees it on the packing slip. This guide walks through the full build: theme backup, Liquid edits, styling, testing, and the edge cases that trip people up.

Why Use Line Item Properties Instead of a Gift Wrap App

Gift wrap apps exist and some are good, but most charge a monthly fee and inject their own scripts and cart logic into your theme. For a single checkbox (or a checkbox plus a short message field), that's more machinery than you need. Check current pricing on any app you're considering and compare it against about 20 lines of Liquid.

Line item properties are built into Shopify's cart object. Each property is stored on the line item, shown in the cart and checkout, carried into the order in the admin, and printed on packing slips and order emails via line.properties. No third-party dependency, no app uninstall leaving orphaned code, no speed penalty.

The trade-offs are real, so go in with eyes open:

If you need conditional logic like "gift wrap free over $50" or per-item wrap pricing recalculated at checkout, a dedicated app or Shopify Functions will save you time. For everything else, native is the right call.

Before You Start: Theme Backup and Duplication

You're editing theme code, so protect yourself first.

  1. In Shopify admin, go to Online Store → Themes.
  2. On your live theme, click the ⋯ menu and choose Duplicate. This creates an unpublished copy you can test against.
  3. On the duplicate, click ⋯ → Edit code. Do all work here until it's tested.
  4. If your theme is from the Shopify Theme Store, note its name and version. Dawn, Sense, and Craft are the common ones; their product form structure is nearly identical, so the steps below apply with minor selector differences.

Also confirm which template your product page uses. In the theme editor, open a product page and check the section list for main-product (Online Store 2.0 themes) or the older product-template.liquid. The file you'll edit is almost always sections/main-product.liquid.

Step 1: Add the Gift Wrap Checkbox to Your Product Form

Open sections/main-product.liquid and find the <form> element with action="/cart/add". Inside it, locate the block that renders the variant picker and quantity selector. You want to insert your checkbox just before the buy buttons block.

Paste this inside the form, after the variant selector:

<div class="gift-wrap-option">
  <input
    type="checkbox"
    id="gift-wrap-{{ section.id }}"
    name="properties[Gift wrap]"
    value="Yes"
  >
  <label for="gift-wrap-{{ section.id }}">
    Add gift wrap (+$5.00)
  </label>
</div>

Replace $5.00 with whatever you actually charge, or remove the parenthetical if gift wrap is free.

Two details matter here:

If you also want a gift message field, add a textarea with name="properties[Gift message]" right below it. Cap the length with maxlength="200" so it doesn't break your packing slip layout.

Save the file. The checkbox now submits with the product form.

Step 2: Style the Checkbox So It Fits Your Theme

An unstyled checkbox looks like a browser default and undermines trust on a checkout-adjacent element. Add CSS in assets/base.css (or your theme's main stylesheet) using your theme's existing color variables where possible:

.gift-wrap-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(var(--color-foreground), 0.15);
  border-radius: 6px;
}

.gift-wrap-option input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: rgb(var(--color-button));
  cursor: pointer;
}

.gift-wrap-option label {
  cursor: pointer;
  font-size: 0.95rem;
}

The accent-color property colors the native checkbox to match your button color in every modern browser, which is less code than a custom-drawn checkbox and more accessible. Clicking the label text toggles the box because of the matching for and id attributes.

Test at mobile width. If the box sits awkwardly next to the variant picker, increase the top margin or wrap the option in the same container class your theme uses for the quantity selector.

Step 3: Test the Option in Cart, Checkout, and Order Details

Most themes display line item properties automatically in the cart, but verify each surface:

Run the test on the duplicated theme with a test product priced at $1, then delete the order. Don't test on your live theme with a real customer's session active.

Step 4: Show Gift Wrap Charges and Fulfillment Notes to Staff

Because a checkbox can't change price, decide how you charge and make it visible to your team:

For fulfillment, add a note to your order notification or packing slip template reminding staff to check the property. In the packing slip, the property prints automatically; in the admin, add a staff note on the order when it comes in.

Optional: Use a Gift Wrap Variant Instead of a Checkbox

A variant solves the pricing problem cleanly because variants carry their own price. Create a "Gift wrap" option on each product with values "No" and "Yes", and price the "Yes" variant $5 higher. Shopify supports up to three options and 100 variants per product, so this fits.

The catch: every product needs variants, and if a product already has two options (Size, Color), gift wrap becomes the third, leaving no room for a fourth. It also multiplies your variant count and complicates inventory tracking if you don't manage "Yes" variants carefully. For stores with simple products, a variant is the smoother customer experience. For stores with many options, the property approach wins.

Common Issues and How to Fix Them

Issue Cause Fix
Checkbox missing from cart Theme cart template doesn't loop over properties Add a property loop to main-cart-items.liquid and the cart drawer
Property shows as "Gift wrap: on" Value attribute missing or set to a boolean Set value="Yes" explicitly
Duplicate checkbox on quick view Hardcoded id collides across sections Append {{ section.id }} to the id
Gift wrap charge not applied Properties can't change price Use a variant or a separate gift wrap product
Property lost after quantity change Cart JS rebuilds line items without properties Check the theme's cart update script; properties usually persist, but custom scripts may not
Checkbox visible on products that shouldn't offer wrap Snippet added to the shared product form Wrap the snippet in {% if product.tags contains 'gift-wrap' %} and tag eligible products

Add the gift-wrap tag to products you want to offer wrapping on, and the conditional keeps the option off everything else. This is the cleanest way to manage a mixed catalog without duplicating templates.

Conclusion

A gift wrap checkbox built on line item properties takes about 20 minutes, costs nothing monthly, and survives theme updates better than most apps because it lives in your own code. Duplicate your theme, add the checkbox to main-product.liquid, style it to match, and test the full path from product page to packing slip before publishing. Decide up front whether you're absorbing the cost, adding a separate product, or using a variant, because that choice shapes everything downstream.

FAQ

Will the gift wrap property show up in my analytics and reports? Line item properties appear in order exports and the Shopify admin, but they aren't broken out in the standard sales reports. For revenue tracking, export orders to CSV and filter on the property column, or use a variant if you need gift wrap revenue in reports natively.

Can I charge for gift wrap automatically with a checkbox? No. Line item properties store data but don't change price. To charge automatically, use a gift wrap variant priced higher, or add a separate gift wrap product to the cart alongside the item.

Does this work on Shopify's new checkout? Yes. Line item properties are supported in Shopify's checkout and are displayed to customers and staff by default. Test on a duplicated theme first, since custom checkout branding or apps can affect display.