Commit ed62b6ee4bd461bf914d84074d43b3b1bbd44d46
1 parent
77f8451c
20.07.16
Showing
1 changed file
with
14 additions
and
1 deletions
Show diff stats
common/modules/product/CatalogUrlManager.php
... | ... | @@ -53,7 +53,20 @@ class CatalogUrlManager implements UrlRuleInterface { |
53 | 53 | else if(strpos($paths[2], 'filter:') === 0){ |
54 | 54 | $this->parseOldFilter($paths[2], $params); |
55 | 55 | //['catalog/category', 'category' => $category, 'filters' =>$params['filter']] |
56 | - Yii::$app->response->redirect(['catalog/category', 'category' => $category, 'filters' =>$params['filter']],301); | |
56 | + | |
57 | + $optionsTemplate = FilterHelper::optionsTemplate(); | |
58 | + array_unshift($optionsTemplate, "special", "brands"); | |
59 | + $filterView = []; | |
60 | + foreach($optionsTemplate as $optionKey){ | |
61 | + if(isset($params['filter'][$optionKey])){ | |
62 | + $filterView[$optionKey] = $params['filter'][$optionKey]; | |
63 | + } | |
64 | + | |
65 | + | |
66 | + } | |
67 | + | |
68 | + | |
69 | + Yii::$app->response->redirect(['catalog/category', 'category' => $category, 'filters' =>$filterView],301); | |
57 | 70 | } |
58 | 71 | else { |
59 | 72 | throw new HttpException(404 ,'Page not found'); | ... | ... |