I created several products via backend using Magento CE 2.0.2, I upgraded to Magento CE 2.1, when I place an order on those products created on Magento CE 2.0.2, quantity not decrease. However on new products created via backend Magento CE 2.1 it's working fine.
No messages are being displayed to show why the stock is not being lowered.
The magento debug and system logs show no real issues.
The quantity should decrease.
The quantity is not being lowered.
We are facing the same issue with our website. We upgraded our website to Magento 2.1 from 2.0.4. While placing an order, the product quantity is not decreased. It remains the same.
This is causing a huge trouble managing stock. Does any one have an update on this and the cause for it?
internal jira ticket -MAGETWO-56448 has been created for this issue
This happens because of change in app/code/Magento/CatalogInventory/Model/Configuration.php.
When you save a product, it's stock item gets created and saved in DB with a website_id assigned. Previously this would take current website's ID, now it is hardcoded to zero.
As a result, there may be stock items for product that have website_id != 0 and since now Magento searches for the ones with website_id=0, those will never get updated.
This whole website scope stock management seems to be a big mess, especially since according to this https://github.com/magento/magento2/issues/473 it was not supposed to be there.
There is no easy fix since you'd need to
a) convert all stock items to have website_id=0
b) make sure Magento only uses website_id=0 for future queries and future stock items (might be fixed in 2.1 though)
Same problem over here. Updated to Magento 2.1, after that the stock is not decreasing.
Will this be fixed in Magento 2.1.1?
Hello.
This bug is still existing, any update on this ?
Hi,
this issue was already fixed and will be delivered soon,
for now you can use quick fix :
Run MySQL query update cataloginventory_stock_item set website_id = 0 where website_id = 1;
and then run in CLI php bin/magento index:reindex cataloginventory_stock.
This issue is closed as duplicate of #5222
Most helpful comment
Hi,
this issue was already fixed and will be delivered soon,
for now you can use quick fix :
Run MySQL query
update cataloginventory_stock_item set website_id = 0 where website_id = 1;and then run in CLI
php bin/magento index:reindex cataloginventory_stock.