public function actionProducts($slug = 'products') { $filterForm = new GadgetsFilterForm(); $cat = Catalog::cat($slug); if (!$cat) { throw new NotFoundHttpException('Shop category not found.'); } $filters = null; if ($filterForm->load(Yii::$app->request->get()) && $filterForm->validate()) { $filters = $filterForm->parse(); } return $this->render('cat', ['cat' => $cat, 'items' => $cat->items(['pagination' => ['pageSize' => 2], 'filters' => $filters]), 'filterForm' => $filterForm]); }
public function actionOnline($slug = 'products') { $filterForm = new GadgetsFilterForm(); $cat = Catalog::cat($slug); if (!$cat) { throw new NotFoundHttpException('Shop category not found.'); } $filters = null; if ($filterForm->load(Yii::$app->request->get()) && $filterForm->validate()) { $filters = $filterForm->parse(); } return $this->render('online', ['cat' => $cat, 'Postpartum' => $cat->itemsGo(['pagination' => ['pageSize' => 1000], 'filters' => $filterForm->FilerByCat(1)]), 'PeriodPads' => $cat->itemsGo(['pagination' => ['pageSize' => 1000], 'filters' => $filterForm->FilerByCat(2)]), 'DailyPantilinears' => $cat->itemsGo(['pagination' => ['pageSize' => 1000], 'filters' => $filterForm->FilerByCat(3)]), 'NewGeneration' => $cat->itemsGo(['pagination' => ['pageSize' => 1000], 'filters' => $filterForm->FilerByCat(4)])]); }