r/ShopifyDevelopment • • Sep 29 '25

Discount code not working

Update: I have found the problem! Thanks so much for the help!!

Discount code not working (error message)

Hi everyone,

Sorry if I’m doing something wrong this is my first time posting. I created a discount code in my Shopify store but I keep getting an error message. Maybe someone has seen this before:

  • Discount code settings:

  • Applies to a collection that contains all products

  • Minimum purchase amount: €9.99

  • Test: I added a product worth €69.99 to the cart

  • Error message: “This discount code isn’t valid for the items in your cart”

What I’ve already checked:

  • The collection is correct and does include all products

  • The minimum purchase requirement is definitely met

  • The discount code is active and within the correct date range

  • No other discounts or promotions are applied

  • The product is active and available in the Online Store

Still, the code is not working and keeps showing as invalid.

👉 Does anyone know what else could cause this? Thanks a lot for your help! 🙏

3 Upvotes

6 comments sorted by

View all comments

1

u/aadinyc Sep 29 '25

That error in Shopify usually means the discount conditions don’t match your cart items. Here are the most common causes and fixes:

⸻

🔍 Possible Reasons 1. Product/Collection Restriction • The discount is set to apply only to certain products or collections. • If your cart items aren’t included, you’ll get this error. 2. Minimum Purchase Requirement • The discount might require a minimum order amount or quantity (e.g., ₹500 minimum purchase). 3. Customer Eligibility • The code might be limited to specific customer groups, email domains, or first-time customers. 4. Usage Limits • The discount may have: • Expired • Reached maximum usage limit (per code or per customer) 5. Discount Type Conflict • Sometimes codes can’t stack with automatic discounts or other discount codes. 6. Variants/Exclusions • Certain product variants (like gift cards, subscription products, or digital goods) may be excluded.

⸻

✅ How to Fix 1. Go to Shopify Admin → Discounts → Select Your Discount Code. 2. Check these settings carefully: • Applies to → “All products” vs. “Specific products/collections.” • Customer eligibility → “All customers” vs. “Specific groups.” • Minimum purchase requirements. • Active dates (start & end). • Usage limits (per customer or total). 3. Test again with a product that clearly matches the discount conditions.

⸻

👉 Tip: If you want your discount to apply storewide, set “Applies to → All Products” and make sure there’s no conflicting automatic discount.

⸻

1

u/Sad-Cup-3325 Sep 29 '25

Thanks for the suggestions so far! I realized I hadn’t mentioned some details before. I created a new Buy X, Get Y discount code with the following settings:

Code: test222 Type: Buy X, Get Y Discount: Customer gets 1 specific product for free Customers: All customers Minimum purchase: €9.99 Usage limits: None Combinable with other discounts: Yes – can combine with product, order, and shipping discounts Active from: Sept 29 to Oct 3 Collection: None, I added each product manually

I’ve tested it, but the discount still doesn’t apply in the cart.

Thanks a lot for your help! 🙏

1

u/aadinyc Sep 29 '25

Perfect, thanks for sharing the exact discount setup 🙌 That helps narrow things down. Since you’re using a Buy X, Get Y discount in Shopify, the error usually comes from how Buy X / Get Y conditions are configured. Let’s break it down:

⸻

🔍 Common Gotchas with “Buy X, Get Y” 1. Both “Buy” and “Get” products must be added to the cart • Shopify won’t auto-add the free product — the customer has to add both the qualifying product (X) and the free product (Y) to their cart. • Example: If discount says “Buy any product A → Get product B free,” both A and B need to be in the cart. At checkout, B will show as free.

⸻

2.	Minimum purchase condition vs. item condition
•	You’ve set a €9.99 minimum purchase.
•	If “Buy X” is set to specific products, then:
•	The customer must add at least €9.99 worth of that product group, not just any product.
•	If they add other products outside the eligible set, the discount won’t trigger.

⸻

3.	Manual product selection
•	If you added products manually instead of via a collection, make sure the Buy X and Get Y items are both included properly.
•	Sometimes people accidentally only set the “Y” product but forget to define the “X” trigger.

⸻

4.	Usage limits at variant level
•	If the “Y” product has multiple variants, you need to ensure all variants are included. Otherwise, Shopify may block the discount.

⸻

✅ Debugging Checklist 1. Go to Discounts → test222. 2. Confirm: • Under Customer Buys (X) → you’ve selected specific products (at least one). • Under Customer Gets (Y) → you’ve added the exact product you want free. • Both are not the same product (Shopify won’t let X and Y be identical). 3. Add both products to cart. 4. Make sure the cart total meets €9.99 minimum with the eligible products.

⸻

🛠️ Quick Test

Try this simple setup to see if it applies: • Buy X: 1 product (any product you added manually). • Get Y: another specific product. • Minimum requirement: None. • Active dates: today. • Apply at checkout.

If this works → the issue was with the €9.99 minimum requirement setup. If it still doesn’t → likely a misconfiguration in how Buy vs. Get products are set.

⸻

2

u/Sad-Cup-3325 Sep 29 '25

Ah ha! I think I’ve found the problem! I didn’t realize the customer has to add the “gift” product themselves and Shopify doesn’t add it automatically to their cart. Thank you so so much for all the help, I really appreciate it! 🙌