/**
  * Вывод сравнения цен
  */
 public function actionPriceMatching()
 {
     $searchModel = new PodruzkaProductSearch();
     $condition = [];
     if (isset(Yii::$app->request->queryParams['PodruzkaProductSearch'])) {
         $params = Yii::$app->request->queryParams['PodruzkaProductSearch'];
         if ($params['arrival']) {
             $condition['arrival'] = $params['arrival'];
         }
         if ($params['category']) {
             $condition['category'] = $params['category'];
         }
         if ($params['brand']) {
             $condition['brand'] = $params['brand'];
         }
     }
     $dataProvider = $searchModel->searchPriceMatching(Yii::$app->request->queryParams);
     return $this->render('price_matching', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'condition' => $condition]);
 }
 /**
  * Lists all PodruzkaProduct models.
  *
  * @return mixed
  */
 public function actionMatchings()
 {
     $searchModel = new PodruzkaProductSearch();
     $condition = [];
     if (isset(Yii::$app->request->queryParams['PodruzkaProductSearch'])) {
         $params = Yii::$app->request->queryParams['PodruzkaProductSearch'];
         if ($params['group']) {
             $condition['group'] = $params['group'];
         }
         if ($params['category']) {
             $condition['category'] = $params['category'];
         }
         if ($params['sub_category']) {
             $condition['sub_category'] = $params['sub_category'];
         }
         if ($params['detail']) {
             $condition['detail'] = $params['detail'];
         }
         if ($params['brand']) {
             $condition['brand'] = $params['brand'];
         }
         if ($params['sub_brand']) {
             $condition['sub_brand'] = $params['sub_brand'];
         }
         if ($params['line']) {
             $condition['line'] = $params['line'];
         }
     }
     $dataProvider = $searchModel->searchMatching(Yii::$app->request->queryParams);
     return $this->render('matchings', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'condition' => $condition]);
 }