From 2caac13529ae64f1bed462c9fa24f97b484b7996 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 27 Oct 2016 18:00:33 +0300 Subject: [PATCH] big commti --- frontend/views/catalog/product.php | 3 +-- frontend/widgets/Seo.php | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 50896b6..7d0a14a 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -20,8 +20,7 @@ $this->title = $product->name; - $this->params[ 'seo' ][ Seo::TITLE ] = $category->name; - $this->params[ 'seo' ][ 'key' ] = $category->name; + $this->params[ 'seo' ][ Seo::TITLE ] = $product->name; $this->params[ 'seo' ][ 'fields' ][ 'name' ] = $product->name; $this->params[ 'seo' ][ 'h1' ] = $product->name; diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index 4d91f6c..da635f9 100755 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -125,12 +125,11 @@ class Seo extends Widget $filter = \Yii::$app->request->get('filters', []); - - $title = $this->selectSeoData(self::TITLE); - if(!empty($filter) && isset($this->fields['meta-title']) && $title == $this->fields['meta-title'] || !empty($filter) && empty($title)) { + if(!empty($filter) && $title == $this->title || !empty($filter) && empty($title)) { + $array = $this->arrayBuilder($filter); $title_string = $this->getTitleString($array); @@ -142,6 +141,7 @@ class Seo extends Widget } if (!empty($title)) { + return $title; } else { return $this->project_name; @@ -289,6 +289,7 @@ class Seo extends Widget protected function selectSeoData($param) { + $result = ''; $widgetData = static::findSeoByUrl($this->url); -- libgit2 0.21.4