/** * Unserialize additional_information in each item * * @return Mage_Sales_Model_Resource_Order_Payment_Collection */ protected function _afterLoad() { foreach ($this->_items as $item) { $this->getResource()->unserializeFields($item); } return parent::_afterLoad(); }
/** * Assign parent items on after collection load * * @return Mage_Sales_Model_Resource_Order_Item_Collection */ protected function _afterLoad() { parent::_afterLoad(); /** * Assign parent items */ foreach ($this as $item) { if ($item->getParentItemId()) { $item->setParentItem($this->getItemById($item->getParentItemId())); } } return $this; }
/** * Unserialize additional_information in each item * * @return Mage_Sales_Model_Resource_Order_Payment_Collection */ protected function _afterLoad() { foreach ($this->_items as $item) { $this->getResource()->unserializeFields($item); } /** @var Mage_Sales_Model_Order_Payment $item */ foreach ($this->_items as $item) { foreach ($item->getData() as $fieldName => $fieldValue) { $item->setData($fieldName, Mage::getSingleton('Mage_Sales_Model_Payment_Method_Converter')->decode($item, $fieldName)); } } return parent::_afterLoad(); }
/** * Redeclare after load method for dispatch event * * @return Mage_Sales_Model_Resource_Order_Address_Collection */ protected function _afterLoad() { parent::_afterLoad(); Mage::dispatchEvent($this->_eventPrefix . '_load_after', array($this->_eventObject => $this)); return $this; }