Open ereztaiar opened 9 months ago
Hi @ereztaiar. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
Summary (*)
Adding configurable product with simple product that has stock and arriving to the checkout when the product has no stock available. Quiring the GRAPHQL endpoint if the product has stock result in "IN_STOCK" instead of "OUT_OF_STOCK" (only the configurable product is taken into account)
Examples (*)
When running the getCheckoutDetails graphql query on a cart with configurable product and simple product that had available qty when added to cart the query returns the product as in stock
variables:
This query is mapped to the PHP file Magento\InventoryGraphQl\Model\Resolver\StockStatusProvider where in the resolve function the product model is the configurable product only note: the PHP file listed above looks like a copy of the PHP file Magento\CatalogInventoryGraphQl\Model\Resolver\StockStatusProvider
Proposed solution
A solution to this could be passing the cart object with the selected values of the configuration and testing each added simple product by itself