In short: Add three Product Discount types, each with a Cart Quantity Per-Discount Condition: 10% at 2 or more, 15% at 3 or more, 20% at 4 or more. Customers automatically get the highest tier they reach.
Why one discount: a Shopify discount has one value, so each tier would be a separate discount, or a separate code. OneCode: Stackable Discounts keeps all the tiers in one code or one automatic discount.
Example
"Buy more, save more": when the cart has 2 items the Summer Collection is 10% off, 3 items 15% off, 4 or more 20% off. Any item in the cart counts toward the tier.
Steps
Click Create discount. Choose Automatic discount with the Title
Buy more, save more, or use a code.Click Add Discount Type. Enter
10in Percentage, set Target to Specific Collections and pick the collection.Under Per-Discount Conditions, click Add Condition. Set Field to Cart Quantity, Operator to Greater than or equal to and Value to
2.Optional: to keep sale items at their sale price, click Add sale item rule and choose Exclude sale items.
Add a second product discount the same way with
15and Cart Quantity at least3.Add a third with
20and Cart Quantity at least4.Click Save discount.

Why the tiers don't add up
With 4 items, all three tiers qualify. Each item gets only its best discount, so the customer gets 20%, not 45%. See How OneCode decides which discounts apply.
Cart Quantity or Group Quantity?
Cart Quantity counts every item in the cart, from any collection, including sale items.
Group Quantity only counts items this discount targets, after exclusions.
Use Group Quantity if only items from the collection should count toward the tier, for example "buy 3 Summer Collection items".
Sale items count, but don't get the discount
With the sale item rule from step 4 and Cart Quantity as the condition, a customer with 3 full-price items and 1 sale item reaches the 4-item tier: the 3 full-price items get 20% off and the sale item stays at its sale price.
Good to know
Each tier needs the same target and sale item rule. Only the condition and percentage change.
You can use a Fixed Amount instead, for example $5 off each item at 2 or more.
