Commit f8ed6ca00f3c33e09647e5218965ab277705fbb4

Authored by Dmytry Fedorchuk
1 parent 71ef7261

title product seo

frontend/views/catalog/product.php
@@ -2,7 +2,10 @@ @@ -2,7 +2,10 @@
2 use yii\widgets\Breadcrumbs; 2 use yii\widgets\Breadcrumbs;
3 use yii\web\View; 3 use yii\web\View;
4 use yii\helpers\Url; 4 use yii\helpers\Url;
5 -$this->params['seo']['title'] = $product->fullname; 5 +
  6 +//$this->params['seo']['title'] = $product->fullname;
  7 +$this->params['seo']['title'] = "Купить " . substr($product->category->categoryName->value, 0, -2) . " " . $product->fullname . " купить в Киеве, Харькове, Украине: цены, отзывы - Rukzachok.com.ua";
  8 +
6 $this->title = $product->fullname; 9 $this->title = $product->fullname;
7 //$this->title = (! empty($product->meta_title)) ? $product->meta_title : $product->fullname; 10 //$this->title = (! empty($product->meta_title)) ? $product->meta_title : $product->fullname;
8 //$this->registerMetaTag (['name' => 'description', 'content' => ((! empty($product->meta_description)) ? $product->meta_description : $product->fullname)]); 11 //$this->registerMetaTag (['name' => 'description', 'content' => ((! empty($product->meta_description)) ? $product->meta_description : $product->fullname)]);
frontend/views/catalog/products.php
@@ -9,7 +9,7 @@ use yii\web\View; @@ -9,7 +9,7 @@ use yii\web\View;
9 use common\modules\product\helpers\ProductHelper; 9 use common\modules\product\helpers\ProductHelper;
10 use frontend\widgets\Seo; 10 use frontend\widgets\Seo;
11 //$this->title = $category->categoryName->value; 11 //$this->title = $category->categoryName->value;
12 -$this->params['seo']['title'] = !empty($category->meta_title) ? $category->meta_title : $category->name; 12 +$this->params['seo']['title'] = !empty($category->meta_title) ? $category->meta_title : "Купить " . substr($category->name, 0, -2) . " в Украине недорого |" . $category->name . " доставка в Киев, Харьков, Днепропетровск, Одесса - Rukzachok.com.ua";
13 $this->params['seo']['h1'] = !empty($category->h1) ? $category->h1 : $category->name; 13 $this->params['seo']['h1'] = !empty($category->h1) ? $category->h1 : $category->name;
14 $this->params['seo']['seo_text'] = $category->seo_text; 14 $this->params['seo']['seo_text'] = $category->seo_text;
15 $this->params['seo']['description'] = $category->meta_desc; 15 $this->params['seo']['description'] = $category->meta_desc;