View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007220||OXID eShop (all versions)||1.03. Basket, checkout process||public||2021-03-18 22:17||2021-03-19 13:07|
|Status||closed||Resolution||no change required|
|Platform||PC||OS||Linux Debian||OS Version||9|
|Target Version||Fixed in Version|
|Summary||0007220: 0-inventory product increased after order declined/canceled|
A partner payment provider (Ratepay) reported to us that it seems to be a strange behavior with article with 0 stock, when an order goes wrong.
The article with 0 stock can still be ordered (depending on the shop configuration). As normal process, the stock is reduced by -1, but when no negative stock is allowed, the value stays at 0.
Then when the order goes wrong, the stock is increased by 1, as a way to restore the initial stock.
Problem is that the stock is now 1, when it was initially 0.
To make sure that the problem doesn't come from the module, I tried on vanilla shop, with standard payment methods.
After the order was successfully placed, I cancelled it in admin, and noticed the same behavior (stock =1 when it was 0 before)
Thanks for help.
|Steps To Reproduce||- Set a product to oxstock = 0|
- Delivery status = standard
- Place an order with whatever oxid standard payment method
- After order placement, in admin > order management > cancel the order (via the option at the end of the line for example)
- Check the stock amount of the article, it will be set to 1 instead of 0.
|Additional Information||For standard methods, I could not achieve a "declined" order as it is with the payment plugin. They have specific test data that allow the payment to be simulated as declined.|
But the anomaly (if it is) can also be observed with a cancelled order.
I noticed the same behavior in a 4.10.8 shop Version.
I've seen a similar issue there : https://bugs.oxid-esales.com/view.php?id=4785
If information is missing, I'll add them promptly (not used to opening bug tickets process)
|PHP Version||Not defined|
|Database Version||Not defined|
If the stock level of an item oxstock = 0 and is ordered, the stock level will be decremented only if in the master settings -> core settings -> settings -> stock -> "Allow negative Stock Values" is enabled, otherwise it remains = 0.
1. So oxstock = 0
2. Master settings -> core settings -> settings -> stock -> "Allow negative Stock Values" is enabled
3. Article will be oredered -> oxstock = -1
4. If "Allow negative Stock Values" is not enabled -> oxstock remains 0
If the order is now cancelled, the corresponding oxstock is incremented and leads to oxstock = 1 if "Allow negative Stock Values" is not activated, and to oxstock = 0 if "Allow negative Stock Values" is activated.
Therefore the bug is closed.