/** * Add error info to the item and quote the item belongs to with the * provided error code and messages. * * @param Mage_Sales_Model_Quote_Item * @param int * @param string * @param string * @return self */ protected function _addErrorInfoForItem(Mage_Sales_Model_Quote_Item $item, $errorCode, $itemMessage, $quoteMessage) { $item->addErrorInfo(EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_SOURCE, $errorCode, $itemMessage); $parentItem = $item->getParentItem(); if ($parentItem) { $parentItem->addErrorInfo(EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_SOURCE, $errorCode, $itemMessage); } $item->getQuote()->addErrorInfo(EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_TYPE, EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_SOURCE, $errorCode, $quoteMessage); return $this; }
/** * Add error info to the item and quote the item belongs to with the * provided error code and messages. * * @param Mage_Sales_Model_Quote_Item * @param int * @param string * @param string * @return self */ protected function _addErrorInfoForItem(Mage_Sales_Model_Quote_Item $item, $errorCode, $itemMessage, $quoteMessage) { $item->addErrorInfo(self::ERROR_INFO_SOURCE, $errorCode, $itemMessage); $parentItem = $item->getParentItem(); if ($parentItem) { $parentItem->addErrorInfo(self::ERROR_INFO_SOURCE, $errorCode, $itemMessage); } $item->getQuote()->addErrorInfo(self::ERROR_INFO_TYPE, self::ERROR_INFO_SOURCE, $errorCode, $quoteMessage); return $this; }
/** * Add error info to the item and quote the item belongs to with the * provided error code and messages. * * @param Mage_Sales_Model_Quote_Item * @param int * @param string * @param string * @return self */ protected function _addErrorInfoForItem(Mage_Sales_Model_Quote_Item $item, $errorCode, $itemMessage, $quoteMessage) { $item->addErrorInfo(EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_SOURCE, $errorCode, $itemMessage); foreach ($item->getChildren() as $child) { $child->addErrorInfo(EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_SOURCE, $errorCode, $itemMessage); } $item->getQuote()->addErrorInfo(EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_TYPE, EbayEnterprise_Inventory_Model_Quantity_Service::ERROR_INFO_SOURCE, $errorCode, $quoteMessage); return $this; }