/** * Overwrite parent method to add new operators * * @param array $arr * * @return MatheusGontijo_EasyShippingRules_Model_Rule_Condition_Product|Mage_CatalogRule_Model_Rule_Condition_Product */ public function loadArray($arr) { $isBetweenOperator = isset($arr['operator']) && in_array($arr['operator'], array('><', '<>')); if (isset($arr['value']) && $isBetweenOperator) { $valueExploded = explode('-', $arr['value']); if (isset($valueExploded[0]) && isset($valueExploded[1])) { $arr['value'] = Mage::app()->getLocale()->getNumber($valueExploded[0]) . '-' . Mage::app()->getLocale()->getNumber($valueExploded[1]); return Mage_Rule_Model_Condition_Abstract::loadArray($arr); } else { $arr['value'] = ''; } } return parent::loadArray($arr); }