View Issue Details

IDProjectCategoryView StatusLast Update
0006102OXID eShop (all versions)1.03. Basket, checkout processpublic2017-08-03 11:15
Reportervschmi Assigned To 
Status resolvedResolutionfixed 
Product Version4.9.3 / 5.2.3 
Fixed in Version4.10.6 / 5.3.6 
Summary0006102: Article Stock Function causes wrong stock levels in high load scenarios / Use transactions
DescriptionThe article stock function in combination with basket reservation causes wrong stock levels. This occurs when much traffic is on the website, because OXID does not use transactions at this point.
Steps To Reproduce0. Open the file oxarticle.php, locate the method reduceStock and add a sleep(10) prior $oDB->execute('update ...') so that it's easier to reproduce
1. Activate Basket Reservations
2. Create a new article with stock level 1
3. Open up 2 different browsers so you get 2 different sessions for the frontend
4. Add the newly created article in the first window, then in the second window
5. You should now have one article reserved in both baskets. If you check the stock level, it displays 0. If you check the table oxbasketitems, you'll find that the item is really added to both baskets.
6. The users could now order the articles
7. If you remove the item from both baskets, the stock level will then be 2.
Additional InformationThis issue occurs on webservers with many concurrent users. Please implement transactions at this point!
TagsHigh_Load, Stock
PHP VersionNot defined
Database VersionNot defined


has duplicate 0004317 closedQA OXID private sales is not compatable with the high attendance shops 



2015-03-27 12:29

reporter   ~0010841

This issue most likely also can occur when basket reservations are turned off when orders are committed into the database.


2015-06-29 10:21

reporter   ~0011064

Updated the title so I could better remember the issue


2016-01-20 11:39

reporter   ~0011442

Location in source code:


2017-01-13 10:51

developer   ~0011917

Location in actual oxid 6.0 repository (2017-01-13)

Please fix this high priority Bug. We have many troubles with correct stocks in a ticketshop where stocks can be sold, reserved, reduced etc. in seconds.


2017-05-17 16:50

reporter   ~0012093

Any update on this?


2017-07-28 13:40

developer   ~0012193

Breaking News:

The bug is fixed in the development version 6.0. A backport for Version 4.10.x should follow soon ...