示例#1
0
 protected function _beforeSave()
 {
     if ((int) $this->getId() > 3) {
         $this->_getResource()->loadLabelProductImage($this);
         $this->_getResource()->loadLabelCategoryImage($this);
     }
     parent::_beforeSave();
 }
示例#2
0
 /**
  * Prepare data before saving
  *
  * @return Innoexts_StorePricing_Model_Catalogrule_Rule
  */
 protected function _beforeSave()
 {
     if ($this->getVersionHelper()->isGe1700()) {
         if ($this->hasStoreIds()) {
             $storeIds = $this->getStoreIds();
             if (is_string($storeIds) && !empty($storeIds)) {
                 $this->setStoreIds(explode(',', $storeIds));
             }
         }
     } else {
         if (is_array($this->getStoreIds())) {
             $this->setStoreIds(join(',', $this->getStoreIds()));
         }
     }
     parent::_beforeSave();
     return $this;
 }
示例#3
0
文件: Rule.php 项目: rajarshc/Rooja
 /**
  * Check clean cache before save
  */
 protected function _beforeSave()
 {
     $this->cleanCache();
     return parent::_beforeSave();
 }