Unlock More Sales: Auto-Add & Remove Free Gifts in Your Shopify Cart (No Manual Hunting!)

Hey there, fellow store owners! Let's dive into a super common, but often tricky, question that popped up in the Shopify Community recently. It's all about how to offer those enticing 'spend X, get a free gift' promotions, but without making your customers jump through hoops to claim them. Our friend minjunkim95 kicked off the discussion, asking the golden question: "How does the gift get into the basket automatically? I don't want customers hunting for it and adding it themselves. Also, if they remove something and go below the minimum, would the gift come back out?" And boy, did the community deliver some fantastic insights! This isn't just about giving something away; it's about creating a seamless, delightful customer experience that boosts conversions.

The Shopify Native Discount Reality Check

First things first, let's clear up a common misconception. As Taha_Dev and Josh-FiveAcreCode rightly pointed out, Shopify's built-in "Buy X Get Y" or amount-off discounts are brilliant for making a gift free. But here's the catch: they don't automatically add that gift product to the customer's cart, nor do they remove it if the cart subtotal drops below your set threshold. This is a crucial distinction that often trips people up! So, if you're looking for that "magic" auto-add and auto-remove functionality, you've got two main paths.

Path 1: The DIY Code Approach (For the Tech-Savvy)

For those who love getting under the hood of their Shopify store, Taha_Dev laid out a really clever way to achieve this without needing a third-party app. It involves a bit of theme customization using AJAX (Asynchronous JavaScript and XML) to interact with the cart. Here’s the gist of how it works:
  1. Create Your Gift Product: Set up your free gift as a regular product or variant. Note its variant ID.
  2. Listen for Cart Changes: Add custom JavaScript to your theme (e.g., in Custom liquid or a JS asset). This script will "listen" for any cart changes and check the subtotal against your threshold.
  3. Auto-Add the Gift: If the subtotal is over threshold and the gift is missing, your script sends a POST /cart/add.js request with the variant ID and a line property like properties[_free_gift]=true.
  4. Auto-Remove the Gift: If the subtotal drops under threshold and the gift is present, your script sends a POST /cart/change.js request with that line’s key and quantity: 0.
It's a powerful solution, but Taha_Dev also shared important caveats: consider "race conditions" (debounce ~300ms), ensure it works with cart drawers, and be aware that "Buy Now" or accelerated checkout might bypass your script. You'd also pair this with a regular 100% automatic discount for that gift product to ensure it always shows as free. For Shopify Plus merchants, Cart Transform Functions offer even more robust checkout enforcement, but theme AJAX is a solid starting point for most.

Path 2: Embracing the App Ecosystem (The Simpler Way for Many)

For many store owners, diving into custom code can feel a bit daunting. This is where Shopify's incredible app ecosystem shines. The community consensus, including Ellie-BOGOS, Josh-FiveAcreCode, and alaattincagil, strongly recommended using a dedicated "gift with purchase" app for this functionality.

Choosing the Right App: Auto-Add and Auto-Remove are Key!

Ellie-BOGOS highlighted a critical point: "many gift apps support auto-add but not auto-remove. So when testing, make sure to check both behaviors." This is super important! You want an app that keeps the cart in sync with your rules. Several apps were mentioned:

It's great to see the community sharing such helpful tools! :blush:

Step-by-Step with a Gift App (Using Monk as an Example)

alaattincagil provided excellent, detailed instructions using Monk Free Gift with Purchase, which gives us a great blueprint for how these apps generally work. Here’s a simplified version of the steps you’d typically follow:
  1. Prepare Your Gift Product: Create your free gift as a standard Shopify product (active, in stock, online store).
  2. Set Up the Offer in the App:
    • Navigate to the app's offer creation (e.g., in Monk: Create Offer → Gifts, Shipping and Cart Goals → General Free Gifts → Auto Add).
    • Choose your gift product, define eligibility (e.g., "cart value over $X"), and select the trigger ("Cart").
  3. Enable Auto-Remove (Crucial!): Find settings like "Cart Refresh and Behaviour" and explicitly turn on Auto Remove. Enable "Auto Refresh" if your theme's cart drawer doesn't update visibly.
  4. Save, Activate, and Test Thoroughly: Configure, save, and activate your offer. Then, test rigorously:
    • Basket just below threshold (gift shouldn't appear).
    • Basket just above threshold (gift should appear).
    • Going back below threshold (gift should be removed).
    Confirm the gift shows as free at checkout.
Many apps also manage the gift's discount directly, often eliminating the need for a separate Shopify "Buy X Get Y" discount. So, whether you're keen to roll up your sleeves with some code or prefer the streamlined power of a dedicated app, the good news is that automatically adding and removing free gifts in your Shopify cart is absolutely achievable! The community discussion really highlighted that while Shopify's native discounts are a great start, for true automation and a smooth customer journey, you'll need to look at either custom theme development or leverage one of the many fantastic apps available. It's all about picking the path that best suits your comfort level and business needs. And remember, thorough testing is your best friend, no matter which route you choose to boost your store's sales with exciting freebies! Want to get started on your own Shopify journey? You can set up your store today!
Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools