From ed62b6ee4bd461bf914d84074d43b3b1bbd44d46 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 21 Jul 2016 12:19:26 +0300 Subject: [PATCH] 20.07.16 --- common/modules/product/CatalogUrlManager.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/common/modules/product/CatalogUrlManager.php b/common/modules/product/CatalogUrlManager.php index 8e3211f..ac9af89 100755 --- a/common/modules/product/CatalogUrlManager.php +++ b/common/modules/product/CatalogUrlManager.php @@ -53,7 +53,20 @@ class CatalogUrlManager implements UrlRuleInterface { else if(strpos($paths[2], 'filter:') === 0){ $this->parseOldFilter($paths[2], $params); //['catalog/category', 'category' => $category, 'filters' =>$params['filter']] - Yii::$app->response->redirect(['catalog/category', 'category' => $category, 'filters' =>$params['filter']],301); + + $optionsTemplate = FilterHelper::optionsTemplate(); + array_unshift($optionsTemplate, "special", "brands"); + $filterView = []; + foreach($optionsTemplate as $optionKey){ + if(isset($params['filter'][$optionKey])){ + $filterView[$optionKey] = $params['filter'][$optionKey]; + } + + + } + + + Yii::$app->response->redirect(['catalog/category', 'category' => $category, 'filters' =>$filterView],301); } else { throw new HttpException(404 ,'Page not found'); -- libgit2 0.21.4