Commit 77df534456ef7fb46a9249e526efab6fc333084b
1 parent
921ebe10
slider
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
widgets/Seo.php
@@ -39,7 +39,7 @@ class Seo extends Widget | @@ -39,7 +39,7 @@ class Seo extends Widget | ||
39 | $this->url = \Yii::$app->request->url; | 39 | $this->url = \Yii::$app->request->url; |
40 | $this->project_name = \Yii::$app->name; | 40 | $this->project_name = \Yii::$app->name; |
41 | if(empty(self::$optionsList)){ | 41 | if(empty(self::$optionsList)){ |
42 | - self::$optionsList = ArrayHelper::getColumn(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(),'alias'); | 42 | + self::$optionsList = ArrayHelper::getColumn(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(),'lang.alias'); |
43 | } | 43 | } |
44 | 44 | ||
45 | parent::init(); | 45 | parent::init(); |
@@ -107,7 +107,6 @@ class Seo extends Widget | @@ -107,7 +107,6 @@ class Seo extends Widget | ||
107 | 107 | ||
108 | 108 | ||
109 | } else if(!empty($filter) && !$this->checkFilter($filter)){ | 109 | } else if(!empty($filter) && !$this->checkFilter($filter)){ |
110 | - | ||
111 | $array = $this->arrayBuilder($filter); | 110 | $array = $this->arrayBuilder($filter); |
112 | return $this->getNameString($array); | 111 | return $this->getNameString($array); |
113 | } | 112 | } |
@@ -394,7 +393,7 @@ class Seo extends Widget | @@ -394,7 +393,7 @@ class Seo extends Widget | ||
394 | 393 | ||
395 | 394 | ||
396 | if (isset($filter['brands']) && count($filter['brands']) == 1) { | 395 | if (isset($filter['brands']) && count($filter['brands']) == 1) { |
397 | - $model = Brand::find()->joinWith('lang')->where(['alias' => $filter['brands'][0]])->one(); | 396 | + $model = Brand::find()->joinWith('lang')->where(['lang.alias' => $filter['brands'][0]])->one(); |
398 | if (!$model instanceof Brand) { | 397 | if (!$model instanceof Brand) { |
399 | 398 | ||
400 | \Yii::$app->response->redirect(['/site/error'], 404); | 399 | \Yii::$app->response->redirect(['/site/error'], 404); |
@@ -406,7 +405,7 @@ class Seo extends Widget | @@ -406,7 +405,7 @@ class Seo extends Widget | ||
406 | } | 405 | } |
407 | 406 | ||
408 | 407 | ||
409 | - $optionsList = ArrayHelper::map(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(), 'alias', 'name'); | 408 | + $optionsList = ArrayHelper::map(TaxGroup::find()->joinWith('lang')->where(['is_filter' => 'TRUE'])->asArray()->all(), 'lang.alias', 'name'); |
410 | 409 | ||
411 | 410 | ||
412 | foreach ($optionsList as $optionList => $name) { | 411 | foreach ($optionsList as $optionList => $name) { |