Commit 2caac13529ae64f1bed462c9fa24f97b484b7996
1 parent
950470c1
big commti
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
frontend/views/catalog/product.php
| ... | ... | @@ -20,8 +20,7 @@ |
| 20 | 20 | $this->title = $product->name; |
| 21 | 21 | |
| 22 | 22 | |
| 23 | - $this->params[ 'seo' ][ Seo::TITLE ] = $category->name; | |
| 24 | - $this->params[ 'seo' ][ 'key' ] = $category->name; | |
| 23 | + $this->params[ 'seo' ][ Seo::TITLE ] = $product->name; | |
| 25 | 24 | $this->params[ 'seo' ][ 'fields' ][ 'name' ] = $product->name; |
| 26 | 25 | $this->params[ 'seo' ][ 'h1' ] = $product->name; |
| 27 | 26 | ... | ... |
frontend/widgets/Seo.php
| ... | ... | @@ -125,12 +125,11 @@ class Seo extends Widget |
| 125 | 125 | $filter = \Yii::$app->request->get('filters', []); |
| 126 | 126 | |
| 127 | 127 | |
| 128 | - | |
| 129 | - | |
| 130 | 128 | $title = $this->selectSeoData(self::TITLE); |
| 131 | 129 | |
| 132 | 130 | |
| 133 | - if(!empty($filter) && isset($this->fields['meta-title']) && $title == $this->fields['meta-title'] || !empty($filter) && empty($title)) { | |
| 131 | + if(!empty($filter) && $title == $this->title || !empty($filter) && empty($title)) { | |
| 132 | + | |
| 134 | 133 | $array = $this->arrayBuilder($filter); |
| 135 | 134 | |
| 136 | 135 | $title_string = $this->getTitleString($array); |
| ... | ... | @@ -142,6 +141,7 @@ class Seo extends Widget |
| 142 | 141 | } |
| 143 | 142 | |
| 144 | 143 | if (!empty($title)) { |
| 144 | + | |
| 145 | 145 | return $title; |
| 146 | 146 | } else { |
| 147 | 147 | return $this->project_name; |
| ... | ... | @@ -289,6 +289,7 @@ class Seo extends Widget |
| 289 | 289 | |
| 290 | 290 | protected function selectSeoData($param) |
| 291 | 291 | { |
| 292 | + | |
| 292 | 293 | $result = ''; |
| 293 | 294 | |
| 294 | 295 | $widgetData = static::findSeoByUrl($this->url); | ... | ... |