Jump to content

Adding product to cart does not update quantity of product in stock


Recommended Posts

Hi,

 

I have encountered a problem that in my eshop (running on Presta 1.6) the quantity of product that is in stock is not updated after adding the product to the cart. It updates only after comleting the order.

 

I assume that is the standard behaviour but do you have idea how (and where) to change the code so that the quantity is update each time the product is added to or removed from the cart?

 

i.e. if I have 10 pcs. in stock and add 2 to cart, eshop would show 8 pcs in stock on product page or not available if I add to cart all 10 - it is quite confusing for customers as it is now because it still shows the initial quantity which however cannot be ordered...

 

Thank you!

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

are you sure this is the behavior you want? Because if you do implement stock update, that would mean some 'competition' will easily put your stocks to zero just by creating zillions of abandoned carts, therefore real customers will never buy anything, cause the stock will be empty for them.

 

Guess this piece of logic should be smarter that just simple stock updates.

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...