magmodules / magento2-channable

Channable Connect for Magento® 2
https://marketplace.magento.com/magmodules-magento2-channable.html
BSD 2-Clause "Simplified" License
28 stars 40 forks source link

Configurable stock status (Issue: 192) #193

Closed kaplansin closed 1 year ago

kaplansin commented 1 year ago

While checking is_in_stock value of parent product we should check following values ;. mange_stock , use_config_manage_stock and store's cataloginventory/item_options/manage_stock value.

for unmanaged stocks getIsInStock should always return true, like magento does.

\Magento\CatalogInventory\Model\Stock\Item::getIsInStock

public function getIsInStock()
    {
        if (!$this->getManageStock()) {
            return true;
        }
        return (bool) $this->_getData(static::IS_IN_STOCK);
    }