After insert qty more than zero - changed new stock status In Stock
Still Out of Stock
Same issue when with a credit memo you return to stock a product correclty went out of stock with qty 0.
It increases its qty, but it remains in out of stock state, so i have to cron a script all night that put in stock all products out of stock with qty > 0.
Absolutly crazy.
@oroskodias Thanks for reporting this issue, internal ticket was created MAGETWO-70370.
It looks like the specific code is right here:
I think the easiest way to fix is if we added another if statement below like:
if ($stockItem->getManageStock() && $isInStock && !$stockItem->getIsInStock()) {
$stockItem->setIsInStock(true)->setStockStatusChangedAutomaticallyFlag(true);
}
Willing to submit a PR, but curious if anyone has any better ideas.
@oroskodias, thank you for your report.
We've created internal ticket(s) MAGETWO-70370 to track progress on the issue.
In this way, are you never going to have a product with qty positive and out of stock?
Working on this.
Hi @oroskodias. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#955 by @RomaKis in 2.2-develop branch
Related commit(s):
The fix will be available with the upcoming patch release.
Hi @magento-team
This issue was really fixed, but in the 2.3 the fix has gone, and now it doesn't work again.
When will this issue fix?
Hi @magento-team,
I am using Magento 2.2.4, but still, the issue is no fixed
Same issue in 2.3.2
I have the same issue in 2.3.2 are you going to provide a fix?
Hi
I am using Magento 2.3.4
Details Issues :
When changing the quantity of a product from any number to 0, the state is automatically changed to Out of Stock upon saving. However, when changing an out of stock product to any number and saving, the product is still listed as Out of Stock.
Steps to reproduce
Access an active, out of stock product through Products > Catalog
Change Quantity to any number and save
Expected result
The product鈥檚 state is automatically changed to In Stock
Actual result
The product is still listed as Out of Stock despite the quantity change.
One must manually remember to also set In Stock which is a inconvenient step and not working as one would expect because the other way the state is changed
any info about this issue?? I have the same problem in Magento ver. 2.3.3
I am also facing the same issue in Magento 2.3.4. Please let me know if there is any solution.
Most helpful comment
It looks like the specific code is right here:
https://github.com/magento/magento2/blob/9c14af7a97bcf338662de365d2613c7ca9dbf8c6/app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php#L165-L167
I think the easiest way to fix is if we added another if statement below like: