Esempio n. 1
0
 public function loadArray($arr, $key = 'conditions')
 {
     $module = $this->isModuleEnabled('Aitoc_Aitloyalty');
     if (!$module->getIsEnabled()) {
         return $this;
     }
     parent::loadArray($arr, $key);
     return $this;
 }
Esempio n. 2
0
 /**
  * Add operator when loading array
  *
  * @param array $arr
  * @param string $key
  * @return Enterprise_CustomerSegment_Model_Segment_Condition_Combine
  */
 public function loadArray($arr, $key = 'conditions')
 {
     if (isset($arr['operator'])) {
         $this->setOperator($arr['operator']);
     }
     if (isset($arr['attribute'])) {
         $this->setAttribute($arr['attribute']);
     }
     return parent::loadArray($arr, $key);
 }
Esempio n. 3
0
 /**
  * Retrieve rule combine conditions model
  *
  * @return Mage_Rule_Model_Condition_Combine
  */
 public function getConditions()
 {
     if (empty($this->_conditions)) {
         $this->_resetConditions();
     }
     // Load rule conditions if it is applicable
     if ($this->hasConditionsSerialized()) {
         $conditions = $this->getConditionsSerialized();
         if (!empty($conditions)) {
             $conditions = unserialize($conditions);
             if (is_array($conditions) && !empty($conditions)) {
                 $this->_conditions->loadArray($conditions);
             }
         }
         $this->unsConditionsSerialized();
     }
     return $this->_conditions;
 }