Commit 9ce693a7a54478915c61849e26654edb8726ad87

Authored by Yarik
1 parent 0f8aaa74

Products seo text

frontend/views/catalog/products.php
@@ -3,13 +3,9 @@ @@ -3,13 +3,9 @@
3 /** @var $this \yii\web\View */ 3 /** @var $this \yii\web\View */
4 /** @var $productProvider \yii\data\ActiveDataProvider */ 4 /** @var $productProvider \yii\data\ActiveDataProvider */
5 5
6 - use common\modules\product\models\Product;  
7 - use yii\helpers\ArrayHelper;  
8 use yii\helpers\Html; 6 use yii\helpers\Html;
9 use yii\helpers\Url; 7 use yii\helpers\Url;
10 - use yii\widgets\Breadcrumbs;  
11 use yii\web\View; 8 use yii\web\View;
12 - use common\modules\product\helpers\ProductHelper;  
13 use common\modules\product\helpers\FilterHelper; 9 use common\modules\product\helpers\FilterHelper;
14 use frontend\widgets\Seo; 10 use frontend\widgets\Seo;
15 //$this->title = $category->categoryName->value; 11 //$this->title = $category->categoryName->value;
@@ -236,10 +232,9 @@ $this->registerJsFile(Yii::getAlias('@web/js/ion.rangeSlider.js'),[ @@ -236,10 +232,9 @@ $this->registerJsFile(Yii::getAlias('@web/js/ion.rangeSlider.js'),[
236 $seo_text = Seo::widget([ 'row'=>'seo_text']); 232 $seo_text = Seo::widget([ 'row'=>'seo_text']);
237 if($seo_text){ 233 if($seo_text){
238 ?> 234 ?>
239 -<div class="text_seo hidden_seo text_seo_products"> 235 +<div class="text_seo text_seo_products">
240 <div> 236 <div>
241 <?= $seo_text?> 237 <?= $seo_text?>
242 </div> 238 </div>
243 - <a href="#" class="read_more_seo">Читать полностью</a>  
244 </div> 239 </div>
245 <?php } ?> 240 <?php } ?>
246 \ No newline at end of file 241 \ No newline at end of file
frontend/widgets/Seo.php
@@ -127,7 +127,7 @@ class Seo extends Widget @@ -127,7 +127,7 @@ class Seo extends Widget
127 127
128 128
129 $title = $this->selectSeoData(self::TITLE, $priority); 129 $title = $this->selectSeoData(self::TITLE, $priority);
130 - 130 +
131 131
132 if(!empty($filter) && isset($this->fields['meta-title']) && $title == $this->fields['meta-title']) { 132 if(!empty($filter) && isset($this->fields['meta-title']) && $title == $this->fields['meta-title']) {
133 133
@@ -146,8 +146,8 @@ class Seo extends Widget @@ -146,8 +146,8 @@ class Seo extends Widget
146 } 146 }
147 147
148 } 148 }
149 -  
150 - 149 +
  150 +
151 151
152 foreach(self::$optionsList as $optionList){ 152 foreach(self::$optionsList as $optionList){
153 153
@@ -165,13 +165,13 @@ class Seo extends Widget @@ -165,13 +165,13 @@ class Seo extends Widget
165 165
166 166
167 } 167 }
168 - 168 +
169 169
170 170
171 } 171 }
172 - 172 +
173 $title_string = $this->getTitleString($array); 173 $title_string = $this->getTitleString($array);
174 - 174 +
175 if($title_string){ 175 if($title_string){
176 return $this->addPage($this->my_mb_ucfirst(trim($title_string))); 176 return $this->addPage($this->my_mb_ucfirst(trim($title_string)));
177 } 177 }
@@ -341,7 +341,7 @@ class Seo extends Widget @@ -341,7 +341,7 @@ class Seo extends Widget
341 $result = ''; 341 $result = '';
342 342
343 $widgetData = static::findSeoByUrl($this->url); 343 $widgetData = static::findSeoByUrl($this->url);
344 - 344 +
345 if ($widgetData instanceof \common\models\Seo) { 345 if ($widgetData instanceof \common\models\Seo) {
346 346
347 $result = $widgetData->$param; 347 $result = $widgetData->$param;