From c3a266dd816707f12a028461e941e99b877f1a9b Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 7 Nov 2016 16:57:59 +0200 Subject: [PATCH] big commti --- frontend/controllers/AjaxController.php | 5 +++-- frontend/web/js/filter.js | 5 +++-- frontend/widgets/views/_filter_view.php | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/controllers/AjaxController.php b/frontend/controllers/AjaxController.php index ceba6c2..ebd6e90 100755 --- a/frontend/controllers/AjaxController.php +++ b/frontend/controllers/AjaxController.php @@ -53,8 +53,9 @@ class AjaxController extends Controller } - public function actionTest(){ + public function actionCount(){ $filter = \Yii::$app->request->get('info'); + $id = \Yii::$app->request->get('category'); if(!empty( $filter[ 'brands' ] )) { @@ -73,7 +74,7 @@ class AjaxController extends Controller } if(!empty($filter)){ - $category = Category::findOne(176); + $category = Category::findOne($id); return $this->findItem($category,$filter); } else { return 'test'; diff --git a/frontend/web/js/filter.js b/frontend/web/js/filter.js index 85415bb..f91c837 100644 --- a/frontend/web/js/filter.js +++ b/frontend/web/js/filter.js @@ -65,10 +65,11 @@ function loadService(){ function priceRequest(link){ var tag = $(link).parents('li'); var filter = tag.data('filter'); + var id = $("#filters").data('category'); $.ajax({ - url: "/ajax/test", + url: "/ajax/count", type: 'GET', - data: {info:filter}, + data: {info:filter,category:id}, success: function(result){ if(result=='0'){ $(link).addClass('disabled-link'); diff --git a/frontend/widgets/views/_filter_view.php b/frontend/widgets/views/_filter_view.php index 878e710..0d89086 100755 --- a/frontend/widgets/views/_filter_view.php +++ b/frontend/widgets/views/_filter_view.php @@ -7,7 +7,7 @@ use frontend\widgets\FilterList; ?> -
+
-- libgit2 0.21.4