Shopstack Work with us

Guides Fix a problem

How do I exclude sale items or specific products from a Shopify discount code?

The short version

  • Skip chosen products on a product code: yes, with a collection that leaves them out. Free, Shopify only.
  • Skip sale items on a product code: yes, with an automated collection where Compare at price is not set. A product with a mix of sale and full-price variants stays in it.
  • Skip products or sale items on an order code: not in Shopify. An Amount off orders code has no Applies to section.
  • Discount Genie: its Order and Tiered order discounts can leave out a collection or every product with a compare-at price. The Advanced Product discount can leave out sale items too. All of this is on paid plans. The basic free plan (up to 3 basic discounts) has none of it.

What counts as a sale item

A sale item is a product whose Compare-at price field is filled in. You set that field to the original price, and Shopify shows it crossed out next to the lower price (Shopify sale pricing help, checked November 7, 2026). Discounts are a separate tool from sale prices, and no discount setting reads the compare-at field. That is why a 20% code lands on a jacket you already marked down.

Exclude sale items with a Shopify collection, step by step

Shopify's discount applies to the products you point it at, so you build the "not on sale" list as a collection. The admin steps below are for desktop (collection conditions, checked November 7, 2026).

  1. From your Shopify admin, go to Products > Collections and click Add collection. Name it, for example Full-price products.
  2. In the Products source, click Add condition. Choose Compare at price and then is not set.
  3. Click Save. A collection used only for a discount can stay unpublished from all sales channels (Shopify help).
  4. Go to Discounts, click Create discount, and in the Select discount type menu click Amount off products.
  5. Under Method, choose Discount code and type a code, for example FULLPRICE20. Or choose Automatic discount and enter a title.
  6. Set the Value. In Applies to, choose Specific collections and pick Full-price products.
  7. Set Eligibility, Combinations and Active dates, then click Save.
  8. Test a cart with one sale item and one full-price item.

What the collection does and doesn't do:

  • Mixed variants. is not set matches a product when any of its variants has an empty compare-at price. A shirt with one marked-down size and one full-price size stays in the collection, so the code can also discount the marked-down size.
  • Zero isn't empty. A compare-at price of $0.00 counts as set, so such a product is not matched by is not set.
  • Variants source. Shopify documents a Variants source that holds specific variants. Its help doesn't say whether a discount honors that, so test before you rely on it.
  • Minimum purchase. Only the products a code applies to count toward its minimum, so sale items in the cart don't help a shopper reach it.

Each item below links the Shopify page it comes from (checked November 7, 2026).

Shopify can

  • Apply an amount off products code to specific products or specific collections, in the Applies to section. Source: help.shopify.com
  • Build an automated collection with the condition Compare at price is not set, which matches a product when any of its variants has an empty compare-at price. Source: help.shopify.com
  • Exclude products from a collection one by one, by condition, or by excluding another collection. Exclusions override inclusions. Source: help.shopify.com
  • Build a collection from a tag condition with the options includes and does not include. Source: help.shopify.com
  • Count only the products a code applies to toward its minimum purchase amount. Source: help.shopify.com
  • Let a discount Function leave chosen cart lines out of an order discount's subtotal when calculating the discount's maximum value. Source: shopify.dev

Shopify can’t

  • Exclude products or sale items in the discount itself. The discount steps have no exclude option and no compare-at setting, and the API's item targeting is include-only: all, collections or products (checked against API version 2026-10). Source: shopify.dev
  • Point an amount off orders code at specific products or collections. Applies to is only in the product discount steps. Source: help.shopify.com
  • Use one source to exclude single products and another collection at the same time. Source: help.shopify.com
  • Have more than 5 collections that exclude another collection in one store. Source: help.shopify.com

Exclude specific products with a Shopify collection

To keep named products at full price instead of sale items, use the collection's Exclude option. The product code points at a collection that already leaves them out.

  1. Go to Products > Collections, click Add collection, and name it, for example Discount eligible.
  2. In the Products source, click Add condition and add one that every product you sell meets, for example Price is greater than 0. Check the finished collection holds all your products before you rely on it.
  3. In the same source, click Exclude. Then click Add products and pick the products to skip, or open the Products drop-down, choose Collection, and pick a collection to skip. One source can't do both.
  4. Click Save, then create an Amount off products code with Applies to set to Specific collections and pick Discount eligible.

Check whether gift card products ended up in the collection, and remove them if you don't want them discounted. For tag-based control, add a tag such as no-discount to the products and build the collection with a Tag condition set to does not include that tag. If the source also has the Price condition, select Match all conditions (Shopify help). Shopify allows a maximum of 5 collections that exclude another collection per store.

Why an order code can't skip products

An Amount off orders code has no Applies to section, so you can't point it at a collection (Shopify help). You have three ways around it:

  • Switch to a product code. Make it an Amount off products code on your full-price collection. It then discounts those items, not the whole order.
  • Use a discount Function. A Function can list cart lines to leave out of an order discount's subtotal when calculating the discount's maximum value (shopify.dev). Stores not on Plus run Functions through a public app (shopify.dev).
  • Use an app that builds that Function for you, such as Discount Genie (next section).

To refuse codes whenever a sale item is in the cart, see keep codes off sale items and block codes when the cart has sale items.

Exclude sale items and products with Discount Genie

Discount Genie is a Shopify discount app by Shopstack, built on Shopify Functions. Product exclusions are on its paid plans. The basic free plan, which covers up to 3 basic discounts, doesn't include them. Three discounts can exclude sale items:

  • Order: leaves out a collection or every product with a compare-at price.
  • Tiered order: has the same Set product exclusions section.
  • Product, Advanced style: has a Has compare at price condition you set to No. The Standard Product discount has no sale-item option.

Steps for an order code that skips sale items:

  1. In Shopify admin, open Discount Genie and click Discounts.
  2. Under Create discounts like a Genie, click Order (create your first discount).
  3. Under Method, choose Discount code and type the code, or choose Automatic discount.
  4. Set the discount value and any cart or customer conditions.
  5. Under Additional settings, open Set product exclusions and choose Exclude products. The other choice is No products are excluded.
  6. Click Add exclusion. Under Exclude by, choose Has compare at price. Discount Genie shows "All products with a compare at price will be excluded". To leave out a collection instead, choose Collection and pick it.
  7. Save, read the Summary on the right, and test a cart with one sale item and one full-price item.

For the Advanced Product discount, choose Product in step 2 and pick Advanced as the style. Add the Has compare at price condition and set Choose condition to No. The form says "Products/variants on sale are excluded".

How it works:

  • Subtotal. Discount Genie works out the percentage on the lines that stay in. It also tells Shopify to leave the excluded lines out of the order subtotal "when calculating the maximum value of the discount" (Shopify's wording).
  • Cart conditions. By default, excluded products don't count toward conditions such as a minimum amount. Tick Excluded products count towards cart qualifiers to count them.
  • Scope. The exclusion lives on the Discount Genie discount. It doesn't change codes you made in Shopify or in other apps.

Discount Genie's paid plans include all 11 discount types; gift with purchase needs Shopify Plus (Scale) for stores installed since July 15, 2026. New stores pay $0.99/mo for the first 3 months on any monthly paid plan, then Core $29.99, Growth $59.99, Pro $79.99 or Scale $99.99 a month. The plan offered depends on the store's Shopify plan.

Worked examples

The cart: a hoodie at $80 (full price) and a jacket at $100 (compare-at price $140, so it is a sale item). The code is 20% off.

  • Shopify order code, no exclusion: 20% of $180 is $36. The sale jacket is discounted too.
  • Shopify product code on Full-price products: only the hoodie qualifies. 20% of $80 is $16.
  • Discount Genie order code, exclude Has compare at price: the jacket leaves the subtotal. 20% of $80 is $16.
  • With a $100 minimum purchase: in Shopify the hoodie's $80 is the only amount that counts, so the code doesn't apply. In Discount Genie it doesn't apply by default either. Tick Excluded products count towards cart qualifiers and the $180 cart meets the minimum, with the discount still worked out on the $80.

Test it before launch

Place a test order with your saved discount (and its code, if you chose the Discount code method) for each of these:

  1. Sale item only. Expect no discount on it.
  2. Full-price item only. Expect the full percentage.
  3. Both in one cart. Expect the discount on the full-price item only, as in the example above.
  4. A product with two variants, one on sale. In a Shopify collection, expect the code to cover both sizes.

Shopify vs Discount Genie for excluding items

NeedShopifyDiscount Genie
Leave a collection out of a codeProduct code: yes, with a collection that has Exclude. Order code: noOrder and Tiered order discounts, Exclude by Collection (paid)
Skip sale items on a product codeYes, Compare at price is not set collection; mixed variants stay inAdvanced Product discount, Has compare at price set to No (paid)
Skip products or sale items on an order codeNoOrder and Tiered order discounts (paid)
Count excluded items toward a minimumProduct code: no, only applicable items count. Order code: two totals must both meet the minimum, one before product discounts and one after them (gift cards are treated differently in each)Optional checkbox
PriceIncluded with ShopifyBasic free plan (up to 3 basic discounts) has no exclusions; paid plans: new stores pay $0.99/mo for the first 3 months on any monthly paid plan

FAQ

Can Shopify exclude sale items from a discount code?

Not in the discount itself. There is no compare-at setting in the discount steps (Shopify help). Build a collection where Compare at price is not set and point an Amount off products code at it.

Can I exclude products from an amount off order code?

Not with Shopify's settings: an order code has no Applies to section. A discount Function in a public app can leave chosen lines out of the order subtotal when calculating the discount's maximum value. In Discount Genie, the Order discount has product exclusions on paid plans.

Are sale items excluded on the Discount Genie basic free plan?

No. Product exclusions and the Has compare at price option are on paid plans. The basic free plan covers up to 3 basic discounts; New stores pay $0.99/mo for the first 3 months on any monthly paid plan.

Which Discount Genie discounts can leave out sale items?

The Order and Tiered order discounts, and the Advanced style of the Product discount, all on paid plans. The Standard style of the Product discount has no sale-item option.

Can I exclude a product from every discount at once?

Not with one Shopify setting. Each product code needs a collection that leaves the product out, and order codes can't. Discount Genie's exclusions apply only to its own discounts.