Product in reservation show like out of stock (MAGENTO2 MSI)
-
15-04-2021 - |
문제
I have stock_qty = 2
and salable_qty = 0
because of my products reservations and when I open product page add To Cart
exists. Can this product show like out of stock when salable qty is 0 ?
올바른 솔루션이 없습니다
다른 팁
That is indeed the default Magento behavior, but you could alter it by adding an after plugin on isAvailable()
method from the Magento\Catalog\Model\Product
class and inside it, you could interrogate the isSalable()
method from Magento\InventorySalesApi\Api\AreProductsSalableInterface
service (as Magento\InventorySalesApi\Api\IsProductSalableInterface
is now marked as deprecated) to double- check if the product is really available.
제휴하지 않습니다 magento.stackexchange