public function getManageStock() { $isMP = Mage::helper('udropship')->isModuleActive('Unirgy_DropshipVendorProduct'); if (!$isMP) { return parent::getManageStock(); } if ($this->getUseConfigManageStock()) { $productVendor = $this->getUdropshipVendor(); return $productVendor ? (int) Mage::helper('udropship')->getVendorUseCustomFallbackField($productVendor, 'is_udprod_manage_stock', 'udprod_manage_stock', self::XML_PATH_MANAGE_STOCK) : (int) Mage::getStoreConfigFlag(self::XML_PATH_MANAGE_STOCK); } return $this->getData('manage_stock'); }
/** * If the inventory configuration allow order item to be backorderable simply check if the * Manage stock for the item is greater than zero. Otherwise, if the inventory configuration * do not allow order items to be backorderable, then ensure the item is not backorder and has * manage stock. * * @param Mage_CatalogInventory_Model_Stock_Item * @return bool */ protected function isManagedStock(Mage_CatalogInventory_Model_Stock_Item $stock) { return ($this->_config->isBackorderable || (int) $stock->getBackorders() === Mage_CatalogInventory_Model_Stock::BACKORDERS_NO) && $stock->getManageStock() > 0; }