1
votes

I have developed a Magento store for a customer and she wants the stock is decreased for a product after it has been added to cart. Is it possible, through the code, get this solution? This is because doesn't make sense you add a product to your cart and 2 other customers try to buy that same product you already have added (reserved) for yourself.

Anyone could give me a "code" hint to do this?

Thanks.

1
Doesn't make sense? Let's say you have 5 in stock. 5 people add it to their basket but never check out. Nobody can buy that stock as it's been abandoned in an aisle somewhere in somebodies basket never to be seen again.Peter O'Callaghan

1 Answers

1
votes

There are some big issues with decreasing stock when you add to the cart. A customer could essentially come and max out every item in their own cart, thus locking all of those products to that customer and having them unsellable to others. It does seem strange that stock decreases only after an order and in turn someone may visit their cart to find that the item is out of stock, but it seems to be the lesser of two evils.

I would recommend talking to the client and seeing if there's any leverage with what she's doing.