in most of my orders, I have negative qty although I often cleaned unwanted basket. but from time to time I have some order with this problem.
how can I set a limitation to don't let happens again because of each time I have to call the customer and describe that product is out of stock and this is not good for my company .
Edited by Khouloud
This bug happens When two customers check out concurrently for the same product.
Did you try to set the "available preferences when out of stock" to deny in the product page or globaly in the setting of your shop?
@BenTen
Hi
yes sure both of them are enabled but I had a lot of orders with this statues
check this screenshot.
https://ibb.co/54CrMq1
https://ibb.co/G2qqM8V
in the last 12 hours, I had 19 order with out of stock statues
pls help me
Hi @IranDec , could you please provide us with more info? We need more details to understand how we can reproduce your issue:
what are the exact steps we should execute in order to reproduce your issue?
thank you !
HI @matthieu-rolland
really I don't know how this action happens, I just know I have a lot of order with out of stock statues
although I set order statues in Deny orders.
I guess this action happens when some customers are buying the same items at the same time or maybe they are doing check out steps at the same time.
they order sign completely and after few seconds automatically statues change to out of stock.
if possible let me know what do u need to understand this situation more
Hi @IranDec,
I manage to reproduce the issue with PS1.7.5.2 and PS1.7.6.4.

https://drive.google.com/file/d/1zSaREcGesPX8zds8ffTaU-EC2fvjO4D0/view
Reported previously here:
http://forge.prestashop.com/browse/BOOM-4438
Fixed Previously with those PRs:
With PS1.7.7.x, we have the same issue.
https://drive.google.com/file/d/1MqTsi0KKROSMeeQc2s7PwR2MkKOkx7lK/view?usp=sharing
I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
The expected behaviors around stocks availability need to be specified.
Hey,
would like to solve this problem ASAP. I've been haunted from this issue since 1.5 and 1.6 and see little improvement from prestashop in this matter.
For this concurrency issue I think it's best if there is a stock check function doing it for every checkout step process, because the first barrier is when the product is added to the basket and you proceed to checkout.
For instance:
We take 2 customers with same product and combination for purchase and qty = 1
-Customer A adds product to basket but don't checkout yet ( qty=1)
-Customer B adds product to basket and proceed to checkout (qty=1) but not at payment step
-Customer A proceeds to checkout as well ---> The product is not sold yet so qty=1 is still there.
If there is a stock function check in every step then at least we can solve the concurrency issue until last step.
Other approach would be locking the stock while the payment method is processed, for instance if we have an external payment module and it takes a while for payment (like 2 or 5 minutes) but again, to make it work you have to check the stock before going trought order confirmation.
At the moment the only stock check there is in prestashop 1.7 is in /cart where the cart can be abandoned and it's not really usefull. The stock management is completely useless if we use it in a very concurred shop, and could be catastrophic for shops with +200 orders/day, especially when most of the orders are in a specific time zone.
Hi,
I think another solution is a reservation stock system like this module for each basket or check stock availability in each step or make a reservation stock for all basket are waiting for a response from payment getaway and after sometimes if systems didn't get any response then the reservation stock will be back to the main stock.
https://addons.prestashop.com/en/stock-supplier-management/21707-temporary-product-reservation-lonely-stock.html
Hi,
I think another solution is a reservation stock system like this module for each basket or check stock availability in each step or make a reservation stock for all basket are waiting for a response from payment getaway and after sometimes if systems didn't get any response then the reservation stock will be back to the main stock.
https://addons.prestashop.com/en/stock-supplier-management/21707-temporary-product-reservation-lonely-stock.html
Developper of this module here : this is exactly the point of our module plus some "real time" capabilities that can be disable for avoiding high server workload.
It creates a separate database and mostly rely on updateQty hook.
Module is sold since more than 3 years now, fully functionnal and debugged. Feel free to ask questions about this if needed, you can also take a look at our FAQ here : https://www.malttt.com/faq-products/?lang=en
i've the same problem with PS 1.7.6.7

global setup

All my products have this setup:

Hi,
I think another solution is a reservation stock system like this module for each basket or check stock availability in each step or make a reservation stock for all basket are waiting for a response from payment getaway and after sometimes if systems didn't get any response then the reservation stock will be back to the main stock.
https://addons.prestashop.com/en/stock-supplier-management/21707-temporary-product-reservation-lonely-stock.htmlDevelopper of this module here : this is exactly the point of our module plus some "real time" capabilities that can be disable for avoiding high server workload.
It creates a separate database and mostly rely on updateQty hook.
Module is sold since more than 3 years now, fully functionnal and debugged. Feel free to ask questions about this if needed, you can also take a look at our FAQ here : https://www.malttt.com/faq-products/?lang=en
this module will delete all abandoned cart pratically?
because abandoned cart are a good strategy to do some remarketing and recover missed sales.