سؤال

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top