Stock Bug 2.3.0.2
Posted: Tue Sep 13, 2016 7:26 pm
Hey all,
Not sure if I'm missing something here but had an order for an out of stock item, was trying to work out how it happened....so went through the process a few times on a vanilla install of 2.3.0.2.
Here's the scenario:
Product - Iphone
Stock - 1 Unit
Product Options - More than one product option (stock set to 0, subtrack stock set to no)
So a customer can add the Iphone to his cart multiple times, using different options, and then checkout.
The stock is then changed to -1 Units.
I've had a look around to see if I'm missing something and get that Opencart will not update the stock until the order is set to a certain status defined in the admin.
I'm only guessing as haven't looked at the code yet but the stock check probably loops through each item in the basket, as the product is added as another line with the option it passes the check.
Not sure if I'm missing something here but had an order for an out of stock item, was trying to work out how it happened....so went through the process a few times on a vanilla install of 2.3.0.2.
Here's the scenario:
Product - Iphone
Stock - 1 Unit
Product Options - More than one product option (stock set to 0, subtrack stock set to no)
So a customer can add the Iphone to his cart multiple times, using different options, and then checkout.
The stock is then changed to -1 Units.
I've had a look around to see if I'm missing something and get that Opencart will not update the stock until the order is set to a certain status defined in the admin.
I'm only guessing as haven't looked at the code yet but the stock check probably loops through each item in the basket, as the product is added as another line with the option it passes the check.