Example #1
0
 public function getOperatorSelectOptions()
 {
     $attributeName = array('is_new' => 'Is new', 'is_special' => 'Is special', 'out_of_stock' => 'Is Out Of Stock', 'best_seller' => 'Amount Best seller');
     if ($this->getAttribute() == 'qty') {
         return array(array('label' => 'is', 'value' => '=='), array('label' => 'is not', 'value' => '!='), array('label' => 'equals or greater than', 'value' => '>='), array('label' => 'equals or less than', 'value' => '<='), array('label' => 'greater than', 'value' => '>'), array('label' => 'less than', 'value' => '<'));
     }
     if (!array_key_exists($this->getAttribute(), $attributeName)) {
         return parent::getOperatorSelectOptions();
     }
     return array(array('label' => 'is', 'value' => '=='));
 }