Commit a4d63ed9e5d805ddc020282d117112242c30741c
1 parent
eea9565f
20.07.16
Showing
1 changed file
with
16 additions
and
16 deletions
Show diff stats
frontend/widgets/Seo.php
@@ -55,7 +55,7 @@ class Seo extends Widget | @@ -55,7 +55,7 @@ class Seo extends Widget | ||
55 | case self::SEO_TEXT: | 55 | case self::SEO_TEXT: |
56 | 56 | ||
57 | 57 | ||
58 | - $filter = \Yii::$app->request->get('filter', []); | 58 | + $filter = \Yii::$app->request->get('filters', []); |
59 | $sort = \Yii::$app->request->get('sort', []); | 59 | $sort = \Yii::$app->request->get('sort', []); |
60 | $paginate = \Yii::$app->request->get('page', []); | 60 | $paginate = \Yii::$app->request->get('page', []); |
61 | 61 | ||
@@ -92,7 +92,7 @@ class Seo extends Widget | @@ -92,7 +92,7 @@ class Seo extends Widget | ||
92 | break; | 92 | break; |
93 | case self::H1: | 93 | case self::H1: |
94 | 94 | ||
95 | - $filter = \Yii::$app->request->get('filter', []); | 95 | + $filter = \Yii::$app->request->get('filters', []); |
96 | 96 | ||
97 | 97 | ||
98 | 98 | ||
@@ -109,9 +109,9 @@ class Seo extends Widget | @@ -109,9 +109,9 @@ class Seo extends Widget | ||
109 | 109 | ||
110 | } | 110 | } |
111 | 111 | ||
112 | - } else if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { | 112 | + } else if (isset($filter["naznacenie"]) && count($filter["naznacenie"]) == 1) { |
113 | 113 | ||
114 | - $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); | 114 | + $model = TaxOption::find()->where(['alias' => $filter["naznacenie"]])->one(); |
115 | if($this->selectSeoData(self::H1) == $this->category_name) { | 115 | if($this->selectSeoData(self::H1) == $this->category_name) { |
116 | 116 | ||
117 | return $this->selectSeoData(self::H1) . ' ' . $model->value->value; | 117 | return $this->selectSeoData(self::H1) . ' ' . $model->value->value; |
@@ -129,7 +129,7 @@ class Seo extends Widget | @@ -129,7 +129,7 @@ class Seo extends Widget | ||
129 | break; | 129 | break; |
130 | case self::TITLE: | 130 | case self::TITLE: |
131 | 131 | ||
132 | - $filter = \Yii::$app->request->get('filter', []); | 132 | + $filter = \Yii::$app->request->get('filters', []); |
133 | 133 | ||
134 | 134 | ||
135 | $title = $this->selectSeoData(self::TITLE); | 135 | $title = $this->selectSeoData(self::TITLE); |
@@ -148,24 +148,24 @@ class Seo extends Widget | @@ -148,24 +148,24 @@ class Seo extends Widget | ||
148 | $array['brand'] = $model->name; | 148 | $array['brand'] = $model->name; |
149 | } | 149 | } |
150 | 150 | ||
151 | - if (isset($filter['options']["pol"]) && count($filter['options']["pol"]) == 1) { | 151 | + if (isset($filter["pol"]) && count($filter["pol"]) == 1) { |
152 | 152 | ||
153 | - $model = TaxOption::find()->where(['alias' => $filter['options']["pol"]])->one(); | 153 | + $model = TaxOption::find()->where(['alias' => $filter["pol"]])->one(); |
154 | $array['sex'] = $model->value->value; | 154 | $array['sex'] = $model->value->value; |
155 | 155 | ||
156 | 156 | ||
157 | } | 157 | } |
158 | 158 | ||
159 | - if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { | 159 | + if (isset($filter["naznacenie"]) && count($filter["naznacenie"]) == 1) { |
160 | 160 | ||
161 | - $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); | 161 | + $model = TaxOption::find()->where(['alias' => $filter["naznacenie"]])->one(); |
162 | $array['naz'] = $model->value->value; | 162 | $array['naz'] = $model->value->value; |
163 | 163 | ||
164 | } | 164 | } |
165 | 165 | ||
166 | - if (isset($filter['options']["god"]) && count($filter['options']["god"]) == 1) { | 166 | + if (isset($filter["god"]) && count($filter["god"]) == 1) { |
167 | 167 | ||
168 | - $model = TaxOption::find()->where(['alias' => $filter['options']["god"]])->one(); | 168 | + $model = TaxOption::find()->where(['alias' => $filter["god"]])->one(); |
169 | $array['year'] = $model->value->value; | 169 | $array['year'] = $model->value->value; |
170 | 170 | ||
171 | } | 171 | } |
@@ -218,9 +218,9 @@ class Seo extends Widget | @@ -218,9 +218,9 @@ class Seo extends Widget | ||
218 | 218 | ||
219 | } else if ( | 219 | } else if ( |
220 | isset($filter['brands']) && count($filter['brands']) > 1 | 220 | isset($filter['brands']) && count($filter['brands']) > 1 |
221 | - || isset($filter['options']["pol"]) && count($filter['options']["pol"]) > 1 | ||
222 | - || isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) > 1 | ||
223 | - || isset($filter['options']["god"]) && count($filter['options']["god"]) > 1 | 221 | + || isset($filter["pol"]) && count($filter["pol"]) > 1 |
222 | + || isset($filter["naznacenie"]) && count($filter["naznacenie"]) > 1 | ||
223 | + || isset($filter["god"]) && count($filter["god"]) > 1 | ||
224 | 224 | ||
225 | ) { | 225 | ) { |
226 | $this->getView()->registerMetaTag([ | 226 | $this->getView()->registerMetaTag([ |
@@ -229,8 +229,8 @@ class Seo extends Widget | @@ -229,8 +229,8 @@ class Seo extends Widget | ||
229 | ]); | 229 | ]); |
230 | 230 | ||
231 | } else if ( | 231 | } else if ( |
232 | - isset($filter['brands']) && count($filter['brands']) <= 1 && isset($filter['options']) && count($filter['options'], COUNT_RECURSIVE) >= 4 | ||
233 | - || isset($filter['options']) && count($filter['options'], COUNT_RECURSIVE) > 4 | 232 | + isset($filter['brands']) && count($filter['brands']) <= 1 && isset($filter) && count($filter, COUNT_RECURSIVE) >= 4 |
233 | + || isset($filter) && count($filter, COUNT_RECURSIVE) > 4 | ||
234 | || !empty($sort) || !empty($paginate) || isset($filter['prices']) | 234 | || !empty($sort) || !empty($paginate) || isset($filter['prices']) |
235 | ) { | 235 | ) { |
236 | $this->getView()->registerMetaTag([ | 236 | $this->getView()->registerMetaTag([ |