示例#1
0
 /**
  * After load
  * 
  * @return Innoexts_StorePricing_Model_Catalogrule_Rule
  */
 protected function _afterLoad()
 {
     parent::_afterLoad();
     if (!$this->getVersionHelper()->isGe1700()) {
         $storeIds = $this->_getData('store_ids');
         if (is_string($storeIds)) {
             $this->setStoreIds(explode(',', $storeIds));
         }
     }
     return $this;
 }
示例#2
0
文件: Rule.php 项目: rajarshc/Rooja
 /**
  * Change label for current store
  */
 protected function _afterLoad()
 {
     $store = Mage::app()->getStore();
     // Not admin
     if ($store->getId() != 0) {
         // Save original name
         $this->setOriginalName($this->getName());
         $label = Mage::getModel('rewards/catalogrule_label')->getRuleLabelsAsArray($this);
         // Load the label for this store
         if (isset($label[$store->getId()])) {
             $this->setName($label[$store->getId()]);
         } elseif (isset($label[0])) {
             $this->setName($label[0]);
         }
     }
     return parent::_afterLoad();
 }