<p>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.</p>

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

CC BY-SA 3.0
2017-10-11T08:18:42.547Z
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.
Clive Portman
CC BY-SA 3.0
2017-10-12T05:10:12.617Z
Hmm, that shouldn't happen.  I'd connect with Luke on that.
Jeremy Daalder
CC BY-SA 3.0
2017-11-09T11:49:45.637Z
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.
Clive Portman
CC BY-SA 3.0
2018-02-14T20:36:39.513Z
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
CC BY-SA 3.0
2017-10-11T00:30:19.967Z
2017-10-11T00:30:19.967Z
Jeremy Daalder
<ol>
<li>Customer 1 adds a product to their cart. Does not complete their order.</li>
<li>Customer 2 purchases the remaining stock of that product, completing their order.</li>
<li>Customer 1 returns to the store the next day, picking up where they left off.</li>
</ol>

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

<plugin-craftcommerce><stock>
Craft Commerce carts containing out-of-stock products
# Craft Commerce carts containing out-of-stock products

(Asked by: username_0 on 2017-10-10)

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?

**Tags:** plugin-craftcommerce, stock


---

## 1 answers

### Answer by username_1 on 2017-10-11. Score: 2

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.

> **Comments:**
> **username_0**: 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.  
> **username_1**: Hmm, that shouldn't happen.  I'd connect with Luke on that.  
> **username_0**: 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.  
> **username_2**: 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.  

---

