/** * @param $filterId * @return Ess_M2ePro_Model_Magento_Product_Rule_Custom_Abstract */ protected function getCustomFilterInstance($filterId) { $parentFilters = parent::getCustomFilters(); if (isset($parentFilters[$filterId])) { return parent::getCustomFilterInstance($filterId); } $customFilters = $this->getCustomFilters(); $this->_customFiltersCache[$filterId] = Mage::getModel('M2ePro/Amazon_Magento_Product_Rule_Custom_' . $customFilters[$filterId]); return $this->_customFiltersCache[$filterId]; }
/** * @param mixed $validatedValue * @return bool */ public function validateAttribute($validatedValue) { if (is_array($validatedValue)) { $result = false; foreach ($validatedValue as $value) { $result = parent::validateAttribute($value); if ($result) { break; } } return $result; } return parent::validateAttribute($validatedValue); }