/** * Retrieve select object for load object data * This gets the default select, plus the attribute id and code * * @param string $field * @param mixed $value * @return Zend_Db_Select */ protected function _getLoadSelect($field, $value, $object) { return parent::_getLoadSelect($field, $value, $object)->join(array('_attribute_table' => $this->getTable('eav/attribute')), '`_attribute_table`.`attribute_id` = `main_table`.`attribute_id`', array('attribute_code', 'frontend_label')); }
/** * After loading object get other values * * @param Mage_Core_Model_Abstract $object * @return $this */ protected function _afterLoad(Mage_Core_Model_Abstract $object) { parent::_afterLoad($object); $other = $object->getOther(); if (is_array($other)) { foreach ($other as $key => $value) { if (!$object->hasData($key)) { $object->setData($key, $value); } } } return $this; }
/** * Auto-update splash group * * @param Mage_Core_Model_Abstract $object * @return $this */ protected function _afterSave(Mage_Core_Model_Abstract $object) { parent::_afterSave($object); if (!$object->getSkipAutoCreateGroup()) { $this->updateSplashGroup($object); } return $this; }