El zorro Posted March 28, 2018 Share Posted March 28, 2018 Has anyone any solution for my problem ? Same problem twice in 1 week. 2 Customers place the same product in the shopping cart, however there is only 1 in stock. With a 2-minute difference, they order the same product. My settings are 'No products can be ordered if stock = 0'. I made a test product and could create the same problem. Behavior when out of stock is not visible. Do anyone have any advice how to avoid this problem? Maybe any advice for any existing modules, to avoid this issue? Thanks in advanced Stas Link to comment Share on other sites More sharing options...
jetway Posted March 29, 2018 Share Posted March 29, 2018 (edited) As soon as the product has been added to the cart prestashop does not verify that the item is still available at checkout. The item does not get reserved or is deducted from your stock until its actually been purchased. The only way to solve this is to add a block to the product the customer added to the cart, so lets say if someone adds a t-shirt, that t-shirt is reserved for a certain amount of time and is deducted from your stock. After 10 mins it gets released again if not purchased. Prestashop core does not offer that ability. To be honest, this is a basic and i don't understand why its not in core code. If you want something like that you have to do it on your own or install an addon that does it for you. There is actually a few out there. I know its absolutely a bug, I've ran into the same situation as you. This is why i have an automated process to clear all carts left behind. Edited March 29, 2018 by jetway (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted March 30, 2018 Share Posted March 30, 2018 The better design is to check stock of all products in the cart just before payment is processed. This will take some refactoring of the core code however Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now