View Issue Details

IDProjectCategoryView StatusLast Update
0007220OXID eShop (all versions)1.03. Basket, checkout processpublic2021-03-19 13:07
ReporterFC_VincentBoulanger Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformPCOSLinux Debian OS Version9
Product Version6.2.3 
Summary0007220: 0-inventory product increased after order declined/canceled
DescriptionHello,

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.

Regards,
Vincent
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 InformationFor 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)
TagsStock
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Relationships

related to 0006162 confirmedHR On cancelling an order, OXID copies wrong stock amounts back to article 
related to 0004785 resolvedjurate.baseviciene oxstock is increased after expiry of reservation 

Activities

QA

2021-03-19 13:04

administrator   ~0013399

Last edited: 2021-03-19 13:06

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.