Configurable product is showing IN STOCK but all child are in out of stock in default setup of Magento 2.2.1
Place order with second child . once order get placed successfully
Did you assure indexers finished their work after such placement?
Yes! I did indexing also but no success.
@pramodkharade , thank you for your report.
We were not able to reproduce this issue by following the steps you provided. Please provide more detailed steps to reproduce or try to reproduce this issue on a clean installation or latest release.
Configurable product

Child products

Child in stock with quantity 1

Child out of stock

Add to cart more than one with error message, not placing order

Place order

Product status after placing order

Hi Team,
I have tested pure default setup.
1.Child on OutOfStock:
​
2.Child after Order placed: Out Of Stock
​3. Still Parent Product Status is
In Stock
​parent product should be* out of stock* at catalog but it is showing
and it showing Out Of stock at front-end.
--
Thanks And Regards
Mr.Pramod K.Kharade
Software Engineer *
*Mobile: +91 9623014150 Email: [email protected]
[email protected]
On 27 March 2018 at 19:22, Magento Community Engineering <
[email protected]> wrote:
@pramodkharade https://github.com/pramodkharade , thank you for your
report.
We were not able to reproduce this issue by following the steps you
provided. Please provide more detailed steps to reproduce or try to
reproduce this issue on a clean installation or latest release.Configurable product
[image: conf1]
https://user-images.githubusercontent.com/31669971/37971100-d1750c2c-31dd-11e8-930e-73ac1fcee003.pngChild products
[image: conf_child]
https://user-images.githubusercontent.com/31669971/37971150-e8cc42fa-31dd-11e8-886e-0a27dc723b1e.pngChild in stock with quantity 1
[image: conf_child_in_stock]
https://user-images.githubusercontent.com/31669971/37971177-fb9129dc-31dd-11e8-9958-5897e8e9755d.pngChild out of stock
[image: conf_child_out_of_stock]
https://user-images.githubusercontent.com/31669971/37971207-0c94c392-31de-11e8-9b2e-d3b3915644f6.pngAdd to cart more than one with error message, not placing order
[image: add_more]
https://user-images.githubusercontent.com/31669971/37971345-615037b8-31de-11e8-9c40-96437115a9f8.pngPlace order
[image: order_conf]
https://user-images.githubusercontent.com/31669971/37971414-8a490b04-31de-11e8-8070-eb17610cd4e5.pngProduct status after placing order
[image: after_plasing order]
https://user-images.githubusercontent.com/31669971/37971468-adc28cea-31de-11e8-9d13-7615c867a444.png—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/14389#issuecomment-376532886,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH0GtZk4HRqoAa-gARl1PrGHl34rdUAEks5tikQigaJpZM4S8oy_
.
In M1 at least, I'm 99% sure that there is no attempt to update the "stock status" field on a configurable when it's last simple goes out of stock. It was my understanding the justification for this was so that you could manually control the saleability of the configurable regardless of the simples stock level. So this would be considered "Works as designed". Checking availability of a configurable should therefore be done with the isAvailable / isSalable methods rather than checking the stock status directly (which is why the previous testers screen shot shows Out of stock).
@pramodkharade, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
if all simples and configurables are out of stock.
In admin you put simple in stock manually
run the indexes
it does not put configurable back in stock
see \Magento\ConfigurableProduct\Model\ResourceModel\Indexer\Stock\Configurable::_getStockStatusSelect()
And code
$statusExpr = $this->getStatusExpression($connection);
$optExpr = $connection->getCheckSql("le.required_options = 0", 'i.stock_status', 0);
$stockStatusExpr = $connection->getLeastSql(["MAX({$optExpr})", "MIN({$statusExpr})"]);
statusExpr has configurable product status, while optExpr has its simple stock status
stockStatusExpr is least of these two, which means if configurable is out of stock at any point, adding stock in simple and running indexes won't bring back configurable product back in stock
Most helpful comment
Greetings from FundsIndia!
A wonderful friend of you "Pramod([email protected])" referred your name as a person who would be interested in our services.
We are an exciting new online platform for investment services in India. We provide a variety of investment products on our platform - schemes from 35 mutual fund companies, deposits from 6 corporates and more!
All our mutual fund and deposit services are offered fully free of cost - no account opening fees, no transaction charges or account maintenance charges!
We welcome you to open an account with us by clicking on the link below:
Click here to open a free account
If you have any questions, please write to us at [email protected], or call us at +91-44-43443100.
Regards,
FundsIndia Team.