Esempio n. 1
0
 public function applyPricesFilter()
 {
     $minPrice = Yii::app()->request->getQuery('min_price');
     $maxPrice = Yii::app()->request->getQuery('max_price');
     $cm = Yii::app()->currency;
     if ($cm->active->id !== $cm->main->id && ($minPrice > 0 || $maxPrice > 0)) {
         $minPrice = $cm->activeToMain($minPrice);
         $maxPrice = $cm->activeToMain($maxPrice);
     }
     if ($minPrice > 0) {
         $this->query->applyMinPrice($minPrice);
     }
     if ($maxPrice > 0) {
         $this->query->applyMaxPrice($maxPrice);
     }
 }