Discount code isn’t valid for the items in your cart

Topic summary

Main issue: “Buy X Get Y” discount codes return “discount code isn’t valid for the items in your cart.” Most cases trace to setup/usage expectations rather than a platform bug.

Key causes and checks:

  • Customers must add all required items (the Buy X items and the free/discounted Y items) to the cart before applying the code; free items are not auto-added. Variants and product/collection eligibility must match the discount settings.
  • Quantity rules matter (e.g., Buy 2 Get 1 requires 2 qualifying items plus the free item in cart). Some confusion arose when trying to apply percentage off to the same items; that scenario fits “Amount off products,” not “Buy X Get Y.”

Resolutions and guidance:

  • Support confirmed setups by testing, advised selecting correct collections (often “All”), verifying variants, and ensuring both items are in cart.
  • For “buy 2 get 20% off those 2,” use “Amount off products.”
  • To adjust error wording (e.g., minimum spend), edit theme language settings.

Outstanding items:

  • No auto-add of free items; feature request submitted. Workaround: instruct customers in cart/UX or use third‑party apps. Discussion largely resolved case-by-case; broader feature remains open.
Summarized with AI on January 8. AI used: gpt-5.

Hi, I’ll be running a promotion details as follows:

Spend minimum of P500 get free item

But the problem is whenever I’ll try to apply the code during check out it says

Hi there, @preciouslimson !

I’m happy to help. From the screenshots you’ve posted, it does look like all the settings are correct. Because of this, the issue may be related to the products/collections that were selected for this discount code. I made a discount code on my store to test out the spend $X get Y free type discount, and it did work, as shown here:

I recommend checking that the products you added to your cart are included in the products or collection you added to the discount code. For my discount code, I chose to have it apply to the collection “All” (which includes all my products). You can see my settings here:

I also recommend reading over our discount codes help document to ensure you’re going through all the necessary steps.

If the discount code still isn’t working, please let me know, and if you could also share a screenshot of your full page of discount code settings, that would be super helpful! Thank you for posting.

1 Like

Hey @Greta_3 , I have tried adding the All collection and tags to my products but its still not working for me. Need help ASAP.

Thanks

Hi there, @Ahsan256 !

Thank you for your comment, I’d be happy to take a look into this with you.

Would you mind taking a screenshot of your discount code settings and sharing it with me here? It would look something like this:

If you also wanted to share your URL, I’d be happy to try out the code on your store.

I look forward to helping you out!

I have the same problem. For whatever reason, it says “discount code isn’t valid for the items in your cart”. Discounts are so frustrating with Shopify.

Hi, @MatijaGas !

I’m sorry to hear that you’re having trouble setting up this discount code. From what you’ve shown me in that screenshot, it does look like it is set up correctly, so I’m not sure what the issue would be but we can look into this together.

First, to confirm, have you added two of the Natural CBD Oil Dropper products to your cart (ensuring that you selected the correct variant, as only 1 of your 4 variants is eligible for this discount code)? For Buy X Get Y discount codes, both products need to be added to your cart for the code to work. Could you also share your URL with me, so I can attempt to check out and see if the discount code works for me?

I look forward to helping you out!

@Greta_3

Please can you help me in this thing, am facing the same issue below are my SS for my setting and the error

Hi, @irzum !

Thank you for sharing those screenshots. It looks like you’ve only added the blue shoes to your cart, but you actually have to add both the blue shoes as well as the product you want to be free (in this case, the black tank top) to your cart in order for the discount work.

I recommend adding the blue shoes and the blank tank top to your cart and entering the discount code again. If that doesn’t work, you can let me know and I’ll take another look with you.

Thanks again!

Hi Greta, I am having a similar issue.

Hi there, @SeanWP !

I’m happy to help you out with your discount code issue.

Thanks so much for including those screenshots, that’s super helpful! With the Buy X Get Y Discount, customers need to add all applicable products to their cart in order to receive the discount. The discounted or free products aren’t added to the cart automatically. In your case, both the Jumbo UtraCleanse and the BONUS Headband will have to be added to the cart for the discount code to work.

Please try that out and if you still run into an issue, feel free to let me know here and I’ll take another look. Cheers!

Hi Greta,

I am having the same issue with a discount code and would really appreciate your help. I have checked that the products are in the correct collections and still can’t figure it out. Screenshot attached of Discount set up.

Thanks so much!

You need to check 3 things

  • the product that you want customer to select should be in the correct collection that you are selecting.

  • you need to have both the products (the one on which you have condition on, second the one you want to give for free/discounted)

  • you need to have atleast 2 quantity of the “conditioned” producted (as per your rule)

After this when you ll be applying code it should work. You can refer to my query above and Greta’s answer right after that for the reference.

2 Likes

Hi, @oladigital !

Thanks for getting in touch and sharing that screenshot. From reviewing the screenshot, everything looks like it’s set up correctly. Can you tell me a bit more about the issue you’re having when checking out? Are you getting an error message that the discount code is invalid? A screenshot from the checkout would be great as well. Alternatively, you can share the store URL with me and I can test out the checkout myself.

I look forward to helping you further!

Hi Greta,

Thanks for your help. This is the error that comes up when using the code:

The store URL is https://shop.bobbiecharles.com.au/ if you would like to trial also.

The two collections selected for the discount are:

Thank you!

Thanks.

Hi, @oladigital !

Thank you for getting back to me. I tested out the discount code on your store with a few combination of products and it works each time:

When you use a Buy X Get Y discount code, you need to ensure that all the products needed for the discount are added to the cart. In your case, that would mean you need to add the two full priced products from the applicable collections, as well as the two products you’ll receive 20% off on (as shown in the above screenshots).

If you try that and still run into an issue, please let me know and we can continue to work on this together!

Thanks for your quick reply Greta!

I see what you mean - I think the problem is I have misunderstood how the discounts settings works. What I’m after is buy 2 products, get those 2 products at a 20% off discount. I’ve realised I can do this in the ‘Amount off products’ section rather than buy X get Y.

Thank you for your help!

Hey, @oladigital !

Thank you for updating me, I’m glad you were able to figure out the type of discount that will get you the result you’re looking for. You can find more information/instructions for amount off discounts in this help document.

Thanks again for working with me on this!

I am having issue with Buy X Get Y discount offer: everthing is setup correctly. I tried it with automatic buy cart was not showing any thing. I ended up doing it with the code but it is showing attaching the screen shot below.

Hi there, @azimaslam !

Thanks for reaching out and sharing those screenshots. Based on the settings you currently have, the customer would need to add 2 products to their cart to get 1 free (for a total of 3 products). If you wanted the customer to be able to buy 1 product and get 1 product free, you’ll want to change the quantity in the Customer Buys section to 1, as shown here:

Let me know if you have any other questions about this!

I’m also having the same problem,