Last updated: October 2026
A Shopify free gift based on quantity rewards the number of qualifying products a customer buys, not how much they spend. You might offer a free tote when a shopper buys any three products from a collection, or add a sample after their cart reaches five paid items.
That distinction matters. A basic buy-one-get-one promotion usually connects one qualifying product to one reward. A quantity-based gift can count several units of one product, eligible products across a collection, or every paid item in the cart. This guide shows how to choose the right quantity rule, set it up, and test it before launch.
How do you run a buy X items get gift offer on Shopify? Choose the products or collections that count, set the minimum item quantity, select the reward, and make it free. Shopify's native discount requires the customer to add the gift. AutoCart can add it automatically and, when automatic removal is enabled, remove it if the cart stops qualifying.
Decide what your quantity rule should count
Write the offer as one sentence before opening Shopify or an app. It should identify the qualifying products, the required quantity, and the gift:
- Cart item count: “Buy any five paid items and get a free sample.”
- Collection quantity: “Buy any three products from the Summer collection and get a free tote.”
- Product quantity: “Buy two units of the 500 ml cleanser and get a travel-size cleanser.”
- Exact quantity: “Buy exactly four eligible products and get a free pouch.”
- Minimum quantity: “Buy four or more eligible products and get a free pouch.”
Also decide whether quantities from different products should add together. If a customer buys two shirts and one pair of shorts, does that count as three qualifying items? A collection-level rule should say yes. A product-specific rule should count only the selected product or variant.
Do not include the gift itself in the qualifying count. Otherwise, adding the gift can make the cart satisfy its own rule or create confusing quantity changes.
How Shopify's native Buy X Get Y discount handles quantity
Shopify supports quantity conditions through Shopify's native Buy X Get Y discount. In Shopify admin, you choose a minimum quantity of qualifying products, select what the customer receives, and set the reward to free or discounted.
To create the native offer:
- In Shopify admin, go to Discounts and click Create discount.
- Choose Buy X get Y.
- Under Customer buys, set the minimum quantity and choose the qualifying products or collections.
- Under Customer gets, select the gift product, its quantity, and Free as the discount value.
- Choose whether the discount is automatic or uses a code, then set dates, eligibility, and usage limits.
- Save the discount and test it on your storefront.
There is one important limitation: Shopify applies the discount only after the reward product is in the cart. It does not automatically add that product for the customer. Your promotional message therefore needs to tell shoppers which gift to add, or you need an auto-add app to place the gift in the cart when the quantity condition is met.
The native method works well when customers already expect to choose and add the reward. If your offer promises “buy three items and your free gift appears automatically,” connect the quantity condition to an auto-add app instead.
Auto-add a Shopify free gift by cart quantity
AutoCart can evaluate cart quantities, add a selected gift at 100% off, and remove it if the cart stops qualifying when automatic removal is enabled. If conditions and actions are new to you, start with how Shopify cart automation rules work. Feature availability and labels can vary by automation type and plan, so confirm them in your current AutoCart interface before launch.
Set a minimum cart or collection quantity
Use this structure for offers such as “buy any three products from this collection, get a free gift.”
- Open AutoCart and create a new Store Automation rule.
- Give the rule a clear internal name, such as “Summer collection — 3+ items — free tote.”
- Add a product or collection condition for the items that should count.
- Enable the quantity condition and set it to Greater than 2. This makes the rule start at three qualifying items.
- Select the gift product and the quantity AutoCart should add.
- Enable the discount for the selected gift and set it to 100%.
- Add customer-facing text that explains why the gift appeared.
- Save and enable the rule.
For an “any five paid items” offer, use the broadest cart-level condition available in your rule setup. For a promotion limited to one range, collection, product, or variant, select only that group so unrelated cart items do not increase the count.
Trigger the gift at an exact quantity
“Buy exactly three” and “buy three or more” are different offers. A minimum rule keeps the gift eligible at quantities four, five, and above. An exact-quantity rule should stop applying when another qualifying item enters the cart.
AutoCart can define an exact count with lower and upper bounds. For exactly three qualifying items:
- Add a quantity condition for the eligible product or collection set to Greater than 2.
- Add a second condition for the same eligible products set to Less than 4.
- Require both conditions to be true.
Together, those conditions describe a quantity greater than two and less than four: exactly three. If your promotion is meant to reward three or more, use only the lower bound.
Count line-item quantity without counting the whole cart
Suppose the offer is “buy three refill packs, get a free dispenser.” A shopper with one refill pack and two unrelated products should not qualify. Point the quantity condition at the refill product, relevant variants, or its collection instead of using the full cart count.
Test variants deliberately. If only the 12-pack should count, select that variant rather than the whole product. If all sizes qualify and their quantities should combine, include every eligible variant in the same rule.
Quantity-rule examples you can adapt
| Promotion | What to count | Recommended rule |
|---|---|---|
| Buy any 3 skincare products, get a free pouch | Units from the skincare collection | Collection quantity greater than 2 |
| Buy 2 bags of coffee, get a free scoop | Units of the selected coffee products | Product quantity greater than 1 |
| Buy exactly 4 sale items, get a free tote | Units from the sale collection | Greater than 3 and less than 5 |
| Add any 5 paid items, get a sample | All qualifying cart items | Cart quantity greater than 4 |
| Buy 3 shirts in any size, get a cap | Combined units across eligible shirt variants | Product or collection quantity greater than 2 |
If the promotion repeats—one gift for every three qualifying products—you need a cyclic or repeatable reward rule, not a single minimum threshold. Define how partial groups behave: seven qualifying items could mean two gifts with one item carried toward the next group, while a basic threshold rule would still add only one gift.
Test the quantity-based free gift before launch
Run a short cart test matrix in your live theme preview or a safe test environment. Check both the qualifying path and the removal path.
For a “buy three, get one free” minimum-quantity rule, test:
- Two qualifying items: no gift.
- Three qualifying items: one gift appears and is discounted to $0.
- Four qualifying items: the gift remains if the offer is “three or more.”
- Two qualifying plus one unrelated item: no gift when only the selected collection should count.
- Quantity reduced from three to two: the gift is removed.
- Gift manually removed: confirm whether your rule should add it again or respect the customer's choice.
- Out-of-stock gift: confirm the storefront does not promise an unavailable reward.
- Mobile cart drawer and cart page: confirm the gift, discount, and explanatory text display correctly in both.
Also test a direct checkout path, accelerated checkout, discount combinations, subscription products, and every market or currency used by the campaign. The offer copy should match the rule exactly; “buy three products” is misleading if only one collection counts.
Common mistakes with free gifts based on item quantity
Counting the gift as a qualifying item
Exclude the reward product from the eligible set. The gift should be the result of the condition, not part of the condition itself.
Using cart count for a collection-specific offer
A cart-wide rule can qualify a shopper with unrelated products. Restrict the condition to the promoted products, variants, or collection when the offer copy names a specific group.
Confusing minimum and exact quantities
Use one lower-bound condition for “three or more.” Use both a lower and upper bound for “exactly three.” Test what happens at the next quantity before publishing.
Forgetting automatic removal
Customers change quantities in the cart. A gift that remains after the cart drops below the requirement can create margin loss or a confusing checkout adjustment. Confirm that the gift is removed as soon as the rule no longer applies.
Launching without inventory and abuse limits
Set an inventory buffer for the gift, decide how many gifts one order can receive, and prevent the paid version of the gift from accidentally satisfying the rule. If the reward can repeat, test a high-quantity cart to make sure the maximum exposure matches your campaign budget.
Free gift by quantity: frequently asked questions
Can Shopify add a free gift automatically when a customer buys three items?
Shopify's native Buy X Get Y discount can make the reward free, but the customer must add the reward product to the cart. Use an auto-add app such as AutoCart if the gift should appear automatically once the cart reaches three qualifying items.
Can the three items come from different products?
Yes, if the rule counts a collection or a defined group of eligible products. A product-specific rule counts only the selected product or variants, while a cart-level rule can count all qualifying items.
What is the difference between a quantity gift and BOGO?
BOGO usually links a purchase of product X to a reward product Y, often in a one-to-one structure. A quantity gift can total several units across products or collections before adding one reward. See the Shopify BOGO setup guide for the basic buy-one-get-one version.
Does AutoCart remove the gift if the quantity drops?
Yes, when automatic removal is enabled. AutoCart re-evaluates its rules when the cart changes and can remove an auto-added product when the qualifying condition is no longer true. Test this path with your theme and cart drawer before launch.
Set up the rule around the products customers actually buy
The cleanest Shopify free gift based on quantity starts with precise eligibility: what counts, how many units qualify, whether quantities combine across products, and whether the reward repeats. Once those decisions are clear, the rule is straightforward to build and much easier to explain on your storefront.
AutoCart lets you auto-add the gift, discount it to $0, and remove it when the cart falls below the required quantity—without theme edits or custom code. If your promotion is based on spending rather than units, use the free gift based on cart total guide instead.

Install Now