Skip to content

Shopify tutorials for the person running the store. Orders, discounts, fulfilment, returns.

Set a minimum quantity for a discount code in Shopify

A quantity minimum rewards a fuller cart instead of a dearer one. This tutorial sets up THREEFOR20, worth 20% off when the cart holds 3 items or more, with one use per customer, running 11 to 30 November 2026.

Written · Shopify admin, desktop steps · 4 minutes read

The worked example

CodeTHREEFOR20
Value20% off the order
Minimum quantity3 items
Usage limitOne per customer
Active11 to 30 November 2026
3 x $20.00 = $60.00$12.00 off, pays $48.00
2 x $20.00 = $40.00No discount

Download the planner: minimum-quantity-example-carts.csv (136 bytes).

Three example carts that meet the 3-item minimum, with the discount on each. Every cart totals $60, and every one pays $48 after the discount.

1Open Discounts and start a new discount

From your Shopify admin, go to Discounts, then click Create discount. From the discount type menu, click Amount off orders. An amount off orders discount applies to the whole order.

2Choose the code method

Under Method, select Discount code. Then enter the code name in the Discount code section, or click Generate code for a random one. This tutorial uses THREEFOR20.

3Set the value to 20%

In the Value section, select Percentage and enter 20. The other choice is Fixed amount, a dollar value off instead of a percent.

4Set a minimum quantity of 3 items

In the Minimum requirements section, select Minimum quantity of items and enter 3. The code now needs at least 3 products in the cart. If the discount applies to specific products or collections, only those items count toward the quantity.

5Set who can use it

In the Eligibility section, select All customers for a public code. The other choices are Specific customers, Customer segments, and Markets, which limit the code to the customers or regions you pick.

6Limit it to one use per customer

In the Maximum discount uses section, check Limit to one per customer. Shopify tracks a customer's email address or phone number to enforce the limit.

7Set the dates and save

In the Active dates section, set the start date to 11 November 2026 and click Set end date to set the end date to 30 November 2026. Start and end times follow the time zone set in your Shopify admin. Then click Save.

The arithmetic

The discount applies to the order total before tax and shipping.

CartTotal20% offPays
3 items x $20.00$60.00$12.00$48.00
4 items x $15.00$60.00$12.00$48.00
5 items x $12.00$60.00$12.00$48.00

Two $20 items total $40 and hold only 2 items, so the code does not apply even though the cart is worth $40. Quantity is a count of items, not a dollar total.

Held at the counter

Quantity counts items, not dollars. A $40 cart of two items fails a 3-item minimum. A customer who reads the offer as spend $40 will be turned away at checkout.

Only the items the discount applies to count. If the code covers one collection, items outside it do not count toward the quantity. A cart with 2 collection items and 2 other items holds only 2 toward a 3-item minimum.

A quantity minimum and a purchase minimum are different settings. The form offers Minimum purchase amount or Minimum quantity of items. Pick the one that matches the offer: a dollar total needs the first, an item count needs the second.

Sources

  • Amount off discounts — Shopify's help pages: the Minimum quantity of items option, the rule that only selected items count toward it, and the usage-limit rules.