# 20% off full price and 10% off sale items, one Shopify code

To give full-price items 20% off and sale items 10% off with one code, add two product discounts to the same code: a 20% discount with the sale item rule **Exclude sale items**, and a 10% discount with no rule. Full-price items qualify for both and get the bigger one, 20%. Sale items only qualify for the 10%.

[OneCode: Stackable Discounts](https://apps.shopify.com/rm-combo-discounts) decides what counts as a sale item when the customer checks out: any item whose compare-at price is higher than its price. It checks each item in the cart, so if only some sizes or colors of a product are reduced, the full-price ones still get 20%. You don't need to keep a list of full-price products up to date.

A cart with a $50 full-price shirt and jeans reduced from $80 to $60:

- The shirt gets 20% off, $10, so it costs $40.
- The jeans get 10% off their $60 sale price, $6, so they cost $54.
- The subtotal is $94.

![Checkout with SAVE20: the $50 full-price Oxford shirt is $40, the straight jeans on sale at $60 (was $80) are $54, the subtotal is $94, shipping is $8, and the total is $102](/images/checkout-saleitems.png)

## Set it up

1. In OneCode, click **Create discount**, keep **Discount code**, and enter `SAVE20`.
2. Click **Add Discount Type** and enter `20` in **Percentage**. Keep **Target** as **All Products**, or choose **Specific Collections** and pick the collections you want.
3. On that discount, click **Add sale item rule** and choose **Exclude sale items**.
4. Click **Add Discount Type** and enter `10` in **Percentage**, with the same **Target**. Do not add a sale item rule.
5. Click **Save discount**.

![The Sale items section on a product discount with Exclude sale items selected, described as Left out of this discount and its group conditions](/images/exclusions-sale.png)

Each item gets only one product discount from the code, the one that saves the most. That is why a full-price item gets 20% and not 30%.

## The three sale item rules

Each product discount in the code can treat sale items in one of three ways:

- **Discount the sale price (default):** the discount comes off the item's current price. This is what happens with no rule.
- **Discount from the compare-at price:** the item ends at the discount's percentage off its original price, or keeps its sale price if that is already lower. With 20% off, an item reduced from $100 to $85 ends at $80, so the customer saves $5 at checkout. An item reduced from $100 to $70 stays at $70. Items with no compare-at price get the normal 20%. This rule is only for **Percentage** discounts.
- **Exclude sale items:** sale items get nothing from this discount, and they don't count toward its Group Subtotal, Group Quantity or quantity limit. They still count toward Cart Subtotal and Cart Quantity, which measure the whole cart.

![The Sale items section on a product discount with Discount from the compare-at price selected, described as Sale items get this % off their compare-at price](/images/sale-items-compare-at.png)

If you would rather not stack a code on top of a sale at all, use a single 20% discount with **Discount from the compare-at price**. Each item ends at 20% off its original price, unless its sale price is already lower.

Sale item rules are only on product discounts. An order discount comes off the whole order, sale items included. To leave subscription items out of a product discount, click **Add exclusions** and tick **Exclude subscription items**. See [subscription discounts](/guides/subscription-discounts.md).

OneCode costs $9.90 USD every 30 days after a 7-day free trial, billed by Shopify. Install it from the [Shopify App Store](https://apps.shopify.com/rm-combo-discounts).
