Commit f9849059d736b20e8c3c021b2f5c033ad87264b7
1 parent
dbceaf12
06.09.16
Showing
3 changed files
with
15 additions
and
0 deletions
Show diff stats
.htaccess
... | ... | @@ -20,6 +20,12 @@ AddDefaultCharset utf-8 |
20 | 20 | Redirect 301 /products/nesessery /catalog/nesessery |
21 | 21 | Redirect 301 /products/sumki /catalog/sumki |
22 | 22 | Redirect 301 /products/germochehly /catalog/germocehly |
23 | + Redirect 301 /catalog/sumki/filters:naznacenie=sportivnaa-sumka;pol=muzskoj /catalog/sumki/filters:pol=muzskoj;naznacenie-bag-f=sportivnaya | |
24 | + Redirect 301 /catalog/sumki/filters:naznacenie=sumka-na-kolesah /catalog/sumki/filters:naznacenie-bag-f=na-kolesah | |
25 | + Redirect 301 /catalog/sumki/filters:naznacenie=sportivnaa-sumka /catalog/sumki/filters:naznacenie-bag-f=sportivnaya | |
26 | + Redirect 301 /catalog/sumki/filters:brands=dakine;naznacenie=sumka-na-poas /catalog/sumki/filters:brands=dakine;naznacenie-bag-f=na-poyas | |
27 | + Redirect 301 /catalog/sumki/filters:naznacenie=sportivnaa-sumka;pol=zenskij /catalog/sumki/filters:pol=zenskij;naznacenie-bag-f=sportivnaya | |
28 | + Redirect 301 /catalog/sumki/filters:naznacenie=sumka-na-poas /catalog/sumki/filters:naznacenie-bag-f=na-poyas | |
23 | 29 | |
24 | 30 | RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT] |
25 | 31 | RewriteRule ^generator/(.*)?$ /generator/$1 [L,PT] | ... | ... |
common/modules/product/models/Category.php
... | ... | @@ -234,6 +234,10 @@ class Category extends \yii\db\ActiveRecord |
234 | 234 | CategoryName::deleteAll(['category_id' => $this->category_id]); |
235 | 235 | return true; |
236 | 236 | } |
237 | + | |
238 | + /** | |
239 | + * @return $this yii\db\Query | |
240 | + */ | |
237 | 241 | |
238 | 242 | public function getActiveFilters() { |
239 | 243 | $query1 = (new Query()) | ... | ... |
console/controllers/SiteMapController.php
... | ... | @@ -79,6 +79,11 @@ class SiteMapController extends Controller |
79 | 79 | return $category->brands; |
80 | 80 | } |
81 | 81 | |
82 | + /** | |
83 | + * @param $category Category; | |
84 | + * @return mixed | |
85 | + */ | |
86 | + | |
82 | 87 | public function getFilters($category){ |
83 | 88 | |
84 | 89 | return $category->getActiveFilters()->all(); | ... | ... |