1. Customer 1 adds a product to their cart. Does not complete their order.
  2. Customer 2 purchases the remaining stock of that product, completing their order.
  3. Customer 1 returns to the store the next day, picking up where they left off.

What should happen in Craft Commerce? Will Customer 1 be allowed to purchase the now out-of-stock product?


The next time the cart 're-calculates' - so really any process on the cart such as updating it etc, the out of stock product will be detected and removed from the cart.

If somehow they get straight to the attempt order completion stage, then I am pretty sure an error is raised (& returned in flash) and the order won't complete.

  • Thanks. This is what was expecting and was sure happened in the past. The client has had an order go through taking the stock to -2 so I need to do some more testing by the looks of it. Oct 11 '17 at 8:18
  • Hmm, that shouldn't happen. I'd connect with Luke on that. Oct 12 '17 at 5:10
  • In my testing I just cannot get anything other than the expected behaviour you describe in your answer. I'm putting it down to human error at the moment. Nov 9 '17 at 11:49
  • I'm able to consistently reproduce a scenario where negative inventory is the result. Add two of the same products into the cart, then go into the product and change the stock number to 1, then complete the order. The stock number will be -1. It works correctly if the stock is 0, but not if it is 1.
    – Anna_MediaGirl
    Feb 14 '18 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.