diff --git a/backend/views/category/_form.php b/backend/views/category/_form.php
index 7d3264c..ae21c57 100755
--- a/backend/views/category/_form.php
+++ b/backend/views/category/_form.php
@@ -2,6 +2,8 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
+use mihaildev\ckeditor\CKEditor;
+use mihaildev\elfinder\ElFinder;
use common\modules\file\widgets\ImageUploader;
use kartik\select2\Select2;
@@ -63,7 +65,17 @@ use kartik\select2\Select2;
= $form->field($model, 'meta_robots')->textInput(['maxlength' => true]) ?>
- = $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?>
+ = $form->field($model, 'h1')->textInput(['maxlength' => true]) ?>
+
+ = $form->field($model, 'seo_text')->widget(CKEditor::className(),
+ [
+ 'editorOptions' => ElFinder::ckeditorOptions('elfinder',[
+ 'preset' => 'full', //разработанны стандартные настройки basic, standard, full данную возможность не обязательно использовать
+ 'inline' => false, //по умолчанию false]),
+ 'filebrowserUploadUrl'=>Yii::$app->getUrlManager()->createUrl('file/uploader/images-upload')
+ ]
+ )
+ ]) ?>
depth == 2) :?>
= $form->field($model, 'populary')->checkbox() ?>
diff --git a/backend/views/category/view.php b/backend/views/category/view.php
index fe771c5..90945f3 100755
--- a/backend/views/category/view.php
+++ b/backend/views/category/view.php
@@ -40,10 +40,12 @@ $this->params['breadcrumbs'][] = $this->title;
'meta_title',
'meta_desc:ntext',
'meta_robots',
+ 'h1',
'seo_text:ntext',
'category_name_id',
'product_unit_id',
'alias',
+
],
]) ?>
diff --git a/common/config/main.php b/common/config/main.php
index 1e2f678..ca5185f 100755
--- a/common/config/main.php
+++ b/common/config/main.php
@@ -10,12 +10,6 @@ return [
'jsOptions' => ['position' => \yii\web\View::POS_HEAD]
]
],
-
- ],
- 'smssender' => [
-
- 'class' => 'common\components\SmsSender',
-
],
'cache' => [
diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php
index 72bb94b..062accf 100755
--- a/common/modules/product/models/Category.php
+++ b/common/modules/product/models/Category.php
@@ -86,7 +86,7 @@ class Category extends \yii\db\ActiveRecord
return [
[['name'], 'string'],
[['parent_id', 'depth', 'category_name_id', 'product_unit_id'], 'integer'],
- [['path', 'meta_desc', 'seo_text'], 'string'],
+ [['path', 'meta_desc', 'h1', 'seo_text'], 'string'],
[['meta_title', 'image'], 'string', 'max' => 255],
[['meta_robots'], 'string', 'max' => 50],
[['alias', 'name'], 'string', 'max' => 250],
@@ -113,6 +113,7 @@ class Category extends \yii\db\ActiveRecord
'meta_title' => Yii::t('product', 'Meta Title'),
'meta_desc' => Yii::t('product', 'Meta Desc'),
'meta_robots' => Yii::t('product', 'Meta Robots'),
+ 'h1' => Yii::t('product', 'h1'),
'seo_text' => Yii::t('product', 'Seo Text'),
'product_unit_id' => Yii::t('product', 'Product Unit ID'),
'alias' => Yii::t('product', 'Alias'),
diff --git a/common/modules/product/widgets/views/products_block.php b/common/modules/product/widgets/views/products_block.php
index 93bb908..feae4a3 100644
--- a/common/modules/product/widgets/views/products_block.php
+++ b/common/modules/product/widgets/views/products_block.php
@@ -4,7 +4,14 @@ use yii\web\View;
-
= $title?>
+
= $title?>
= $this->render('product_smart', ['product' => $product]);?>
diff --git a/frontend/views/basket/_popup.php b/frontend/views/basket/_popup.php
index 98ce0df..7bc62a6 100755
--- a/frontend/views/basket/_popup.php
+++ b/frontend/views/basket/_popup.php
@@ -6,7 +6,13 @@ use yii\helpers\Url;
-
Товар добавлен в корзину
+
Товар добавлен в корзину
diff --git a/frontend/views/catalog/products.php b/frontend/views/catalog/products.php
index 496bc66..ad73547 100755
--- a/frontend/views/catalog/products.php
+++ b/frontend/views/catalog/products.php
@@ -7,15 +7,20 @@ use yii\helpers\Url;
use yii\widgets\Breadcrumbs;
use yii\web\View;
use common\modules\product\helpers\ProductHelper;
+use frontend\widgets\Seo;
+//$this->title = $category->categoryName->value;
+$this->params['seo']['title'] = !empty($category->meta_title) ? $category->meta_title : $category->name;
+$this->params['seo']['h1'] = !empty($category->h1) ? $category->h1 : $category->name;
+$this->params['seo']['seo_text'] = $category->seo_text;
+$this->params['seo']['description'] = $category->meta_desc;
+$this->params['seo']['meta'] = $category->meta_robots;
-$this->title = $category->categoryName->value;
//foreach($category->getParents()->all() as $parent) {
// $this->params['breadcrumbs'][] = ['label' => $parent->categoryName->value, 'url' => ['catalog/category', 'category' => $parent]];
//}
$this->params['breadcrumbs'][] = ['label' => 'Каталог', 'url' => ['catalog/category']];
$this->params['breadcrumbs'][] = $category->categoryName->value;
-$this->params['seo']['title'] = $category->name;
$this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.css'));
$this->registerCssFile (Yii::getAlias('@web/css/ion.rangeSlider.skinHTML5.css'));
@@ -155,7 +160,7 @@ $this->registerJsFile(Yii::getAlias('@web/js/ion.rangeSlider.js'),[
-
= $category->name ?>
+ = Seo::widget([ 'row'=>'h1'])?>