Стильные элитные обои для вашего дома.
Узнать больше
diff --git a/frontend/views/catalog/view.php b/frontend/views/catalog/view.php
index c407321..e31c482 100755
--- a/frontend/views/catalog/view.php
+++ b/frontend/views/catalog/view.php
@@ -1,54 +1,56 @@
title = $product->name;
-$this->params['breadcrumbs'][] = [
- 'label' => $product->category->parent->parent->name,
- 'url' => Url::to([
- 'category/index',
- 'id' => $product->category->parent->parent->category_id,
- ]),
-];
-$this->params['breadcrumbs'][] = [
- 'label' => $product->category->parent->name,
- 'url' => Url::to([
- 'category/brand',
- 'id' => $product->category->parent->category_id,
- ]),
-];
-$this->params['breadcrumbs'][] = [
- 'label' => $product->category->name,
- 'url' => Url::to([
- 'category/collection',
- 'id' => $product->category->category_id,
- ]),
-];
-$this->params['breadcrumbs'][] = $this->title;
+ /**
+ * @var Product $product
+ * @var ProductVariant $variant
+ * @var View $this
+ * @var ProductVariant[] $variants
+ * @var array $attributes
+ */
+ use common\components\artboximage\ArtboxImageHelper;
+ use common\modules\product\models\Product;
+ use common\modules\product\models\ProductVariant;
+ use yii\helpers\Html;
+ use yii\helpers\Url;
+ use yii\web\View;
+ use yii\widgets\Pjax;
+ use common\widgets\Seo;
+
+ $this->title = $product->name;
+ $this->params[ 'breadcrumbs' ][] = [
+ 'label' => $product->category->parent->parent->name,
+ 'url' => Url::to([
+ 'category/index',
+ 'id' => $product->category->parent->parent->category_id,
+ ]),
+ ];
+ $this->params[ 'breadcrumbs' ][] = [
+ 'label' => $product->category->parent->name,
+ 'url' => Url::to([
+ 'category/brand',
+ 'id' => $product->category->parent->category_id,
+ ]),
+ ];
+ $this->params[ 'breadcrumbs' ][] = [
+ 'label' => $product->category->name,
+ 'url' => Url::to([
+ 'category/collection',
+ 'id' => $product->category->category_id,
+ ]),
+ ];
+ $this->params[ 'breadcrumbs' ][] = $product->name;
+ $this->params[ 'seo' ][ Seo::TITLE ] = $product->name;
?>
'pjax-reload',
+ 'id' => 'pjax-reload',
'timeout' => 5000,
]); ?>
getImageUrl(), 'product_main');
+ echo ArtboxImageHelper::getImage($variant->getImageUrl(), 'product_main');
?>
@@ -56,14 +58,16 @@ $this->params['breadcrumbs'][] = $this->title;
name; ?>
category->name; ?>
category->parent->name; ?>
-
+
- Артикул: sku; ?>
$options) { ?>
- - :
- $options) { ?>
+ -
+ :
+
+
@@ -72,17 +76,17 @@ $this->params['breadcrumbs'][] = $this->title;
-
- getImageUrl(), 'product_variant_main'), [
- 'catalog/product',
- 'product' => $product->alias,
- 'variant' => $oneVariant->sku,
- ]);
- ?>
-
-
+ foreach($variants as $oneVariant) {
+ ?>
+
+ getImageUrl(), 'product_variant_main'), [
+ 'catalog/product',
+ 'product' => $product->alias,
+ 'variant' => $oneVariant->sku,
+ ]);
+ ?>
+
+
diff --git a/frontend/views/category/brand.php b/frontend/views/category/brand.php
index 3dc86a7..d704537 100755
--- a/frontend/views/category/brand.php
+++ b/frontend/views/category/brand.php
@@ -1,20 +1,27 @@
title = $category->name;
-$this->params[ 'breadcrumbs' ][] = [
- 'label' => $category->parent->name,
- 'url' => ['category/index', 'id' => $category->parent->category_id],
-];
-$this->params[ 'breadcrumbs' ][] = $this->title;
+ use common\modules\product\models\Category;
+ use yii\data\ActiveDataProvider;
+ use yii\web\View;
+ use yii\widgets\ListView;
+ use common\widgets\Seo;
+
+ /**
+ * @var Category $category
+ * @var ActiveDataProvider $dataProvider
+ * @var View $this
+ */
+ $this->params[ 'seo' ][ Seo::TITLE ] = !empty( $category->meta_title ) ? $category->meta_title : $category->name;
+ $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty( $category->meta_desc ) ? $category->meta_desc : '';
+ $this->params[ 'seo' ][ Seo::SEO_TEXT ] = !empty( $category->seo_text ) ? $category->seo_text : '';
+ $this->params[ 'seo' ][ Seo::H1 ] = !empty( $category->h1 ) ? $category->h1 : $category->name;
+ $this->params[ 'breadcrumbs' ][] = [
+ 'label' => $category->parent->name,
+ 'url' => [
+ 'category/index',
+ 'id' => $category->parent->category_id,
+ ],
+ ];
+ $this->params[ 'breadcrumbs' ][] = $category->name;
?>
@@ -24,19 +31,19 @@ $this->params[ 'breadcrumbs' ][] = $this->title;
-
+
$dataProvider,
- 'itemView' => '_brand_item',
- 'layout' => '{items}',
- ])
+ echo ListView::widget([
+ 'dataProvider' => $dataProvider,
+ 'itemView' => '_brand_item',
+ 'layout' => '{items}',
+ ])
?>
-
+
-
h1; ?>
+
Seo::H1]); ?>
-
seo_text; ?>
+
Seo::SEO_TEXT]); ?>
Узнать больше
diff --git a/frontend/views/category/collection.php b/frontend/views/category/collection.php
index 3ff1d73..8bd92bd 100755
--- a/frontend/views/category/collection.php
+++ b/frontend/views/category/collection.php
@@ -1,69 +1,74 @@
title = $category->name;
-$this->params['breadcrumbs'][] = [
- 'label' => $category->parent->parent->name,
- 'url' => Url::to([
- 'category/index',
- 'id' => $category->parent->parent->category_id,
- ]),
-];
-$this->params['breadcrumbs'][] = [
- 'label' => $category->parent->name,
- 'url' => Url::to([
- 'category/brand',
- 'id' => $category->parent->category_id,
- ]),
-];
-$this->params['breadcrumbs'][] = $this->title;
+ /**
+ * @var Product[][] $products
+ * @var View $this
+ * @var Category $category
+ */
+ use common\components\artboximage\ArtboxImageHelper;
+ use common\modules\product\models\Category;
+ use common\modules\product\models\Product;
+ use yii\web\View;
+ use yii\helpers\Url;
+ use common\widgets\Seo;
+
+ $this->params[ 'seo' ][ Seo::TITLE ] = !empty( $category->meta_title ) ? $category->meta_title : $category->name;
+ $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty( $category->meta_desc ) ? $category->meta_desc : '';
+ $this->params[ 'seo' ][ Seo::SEO_TEXT ] = !empty( $category->seo_text ) ? $category->seo_text : '';
+ $this->params[ 'seo' ][ Seo::H1 ] = !empty( $category->h1 ) ? $category->h1 : $category->name;
+ $this->params[ 'breadcrumbs' ][] = [
+ 'label' => $category->parent->parent->name,
+ 'url' => Url::to([
+ 'category/index',
+ 'id' => $category->parent->parent->category_id,
+ ]),
+ ];
+ $this->params[ 'breadcrumbs' ][] = [
+ 'label' => $category->parent->name,
+ 'url' => Url::to([
+ 'category/brand',
+ 'id' => $category->parent->category_id,
+ ]),
+ ];
+ $this->params[ 'breadcrumbs' ][] = $category->name;
?>
-
meta_desc; ?>
+
second_text; ?>
-
seo_text; ?>
+
Seo::SEO_TEXT]); ?>
Узнать больше
diff --git a/frontend/views/category/index.php b/frontend/views/category/index.php
index edaadee..3fad488 100755
--- a/frontend/views/category/index.php
+++ b/frontend/views/category/index.php
@@ -1,36 +1,39 @@
params[ 'seo' ][ 'title' ] = !empty($category->meta_title) ? $category->meta_title : $category->name;
-$this->title = $category->name;
-$this->params[ 'breadcrumbs' ][] = $this->title;
-
-echo ListView::widget([
- 'dataProvider' => $dataProvider,
- 'options' => [
- 'class' => 'blocks_2',
- ],
- 'itemView' => '_category_item',
- 'layout' => '{items}',
-]);
+ use common\modules\product\models\Category;
+ use common\widgets\Seo;
+ use yii\data\ActiveDataProvider;
+ use yii\web\View;
+ use yii\widgets\ListView;
+
+ /**
+ * @var Category $category
+ * @var ActiveDataProvider $dataProvider
+ * @var View $this
+ */
+ $this->params[ 'seo' ][ Seo::TITLE ] = !empty( $category->meta_title ) ? $category->meta_title : $category->name;
+ $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty( $category->meta_desc ) ? $category->meta_desc : '';
+ $this->params[ 'seo' ][ Seo::SEO_TEXT ] = !empty( $category->seo_text ) ? $category->seo_text : '';
+ $this->params[ 'seo' ][ Seo::H1 ] = !empty( $category->h1 ) ? $category->h1 : $category->name;
+ $this->params[ 'breadcrumbs' ][] = $category->name;
+
+ echo ListView::widget([
+ 'dataProvider' => $dataProvider,
+ 'options' => [
+ 'class' => 'blocks_2',
+ ],
+ 'itemView' => '_category_item',
+ 'layout' => '{items}',
+ ]);
?>
-
h1; ?>
-
-
+
Seo::H1]); ?>
+
+
diff --git a/frontend/views/comments/index.php b/frontend/views/comments/index.php
index d407ef6..ea04cb1 100755
--- a/frontend/views/comments/index.php
+++ b/frontend/views/comments/index.php
@@ -6,9 +6,10 @@
use common\models\Comments;
use common\modules\comment\widgets\CommentWidget;
use yii\web\View;
+ use common\widgets\Seo;
- $this->title = 'Отзывы';
- $this->params['breadcrumbs'][] = $this->title;
+ $this->params[ 'seo' ][ Seo::TITLE ] = 'Отзывы';
+ $this->params['breadcrumbs'][] = 'Отзывы';
?>
diff --git a/frontend/views/discount/discount.php b/frontend/views/discount/discount.php
index 4c9acc0..d43e6cc 100755
--- a/frontend/views/discount/discount.php
+++ b/frontend/views/discount/discount.php
@@ -1,15 +1,16 @@
title = 'Акции';
-$this->params['breadcrumbs'][] = $this->title;
+ $this->params[ 'breadcrumbs' ][] = 'Акции';
+ $this->params[ 'seo' ][ Seo::TITLE ] = 'Акции';
?>
@@ -17,32 +18,33 @@ $this->params['breadcrumbs'][] = $this->title;
Акции
-
-
+
-
Стильные элитные обои для вашего дома
+
Seo::H1]);?>
-
Продумывая дизайн своей квартиры, мы непременно тщательно выбираем "одежду" для стен - красивые модные обои.
+
Seo::SEO_TEXT]);?>
Узнать больше
diff --git a/frontend/views/discount/empty.php b/frontend/views/discount/empty.php
index ff58473..ca9bb7a 100755
--- a/frontend/views/discount/empty.php
+++ b/frontend/views/discount/empty.php
@@ -7,4 +7,5 @@ use yii\web\View;
$this->title = 'Акции';
$this->params['breadcrumbs'][] = $this->title;
-echo "Товары не найдены";
\ No newline at end of file
+echo "Товары не найдены";
+
\ No newline at end of file
diff --git a/frontend/views/new-collections/index.php b/frontend/views/new-collections/index.php
index 909974e..2100320 100755
--- a/frontend/views/new-collections/index.php
+++ b/frontend/views/new-collections/index.php
@@ -1,45 +1,45 @@
title = 'Новые коллекции';
-$this->params[ 'breadcrumbs' ][] = $this->title;
+ use common\modules\product\models\Category;
+ use yii\data\ActiveDataProvider;
+ use yii\web\View;
+ use yii\widgets\ListView;
+ use common\widgets\Seo;
+
+ /**
+ * @var Category $category
+ * @var ActiveDataProvider $dataProvider
+ * @var View $this
+ */
+ $this->params[ 'seo' ][ Seo::TITLE ] = 'Новые коллекции';
+ $this->params[ 'breadcrumbs' ][] = 'Новые коллекции';
?>
-
-
Новые коллекции в Baccara Home
-
- $dataProvider,
- 'itemOptions' => [
- 'tag' => false,
- ],
- 'itemView' => '_new_collections_item',
- 'layout' => '{items}',
- ]);
- ?>
- count > 6) { ?>
-
-
-
-
-
-
Стильные элитные обои для вашего дома.
-
-
Продумывая дизайн своей квартиры, мы непременно тщательно выбираем «одежду» для стен — красивые модные обои.
-
-
-
-
\ No newline at end of file
+
+
Новые коллекции в Baccara Home
+
+ $dataProvider,
+ 'itemOptions' => [
+ 'tag' => false,
+ ],
+ 'itemView' => '_new_collections_item',
+ 'layout' => '{items}',
+ ]);
+ ?>
+ count > 6) { ?>
+
+
+
+
\ No newline at end of file
diff --git a/frontend/views/product/index.php b/frontend/views/product/index.php
index a0f3706..62c0859 100755
--- a/frontend/views/product/index.php
+++ b/frontend/views/product/index.php
@@ -1,17 +1,19 @@
title = $category->first_text;
-$this->params['breadcrumbs'][] = $this->title;
+
+ /**
+ * @var ActiveDataProvider $dataProvider
+ * @var View $this
+ * @var Category $category
+ */
+ use common\modules\product\models\Category;
+ use yii\data\ActiveDataProvider;
+ use yii\web\View;
+ use yii\widgets\ListView;
+ use common\widgets\Seo;
+
+ $this->params[ 'seo' ][ Seo::TITLE ] = !empty($category->meta_title) ? $category->meta_title : $category->first_text;
+ $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty($category->meta_desc) ? $category->meta_desc : '';
+ $this->params[ 'breadcrumbs' ][] = $category->first_text;
?>
@@ -198,13 +200,13 @@ $this->params['breadcrumbs'][] = $this->title;
-
+
$dataProvider,
- 'itemView' => '_product_list',
- 'layout' => '{items}{pager}',
- ])?>
-
+ 'itemView' => '_product_list',
+ 'layout' => '{items}{pager}',
+ ]) ?>
+
diff --git a/frontend/views/site/page.php b/frontend/views/site/page.php
index 54fa21a..aa166d8 100755
--- a/frontend/views/site/page.php
+++ b/frontend/views/site/page.php
@@ -1,14 +1,15 @@
title = $model->title;
-$this->params['breadcrumbs'][] = $this->title;
-
-echo $model->body;
\ No newline at end of file
+ use common\models\Page;
+ use yii\web\View;
+ use common\widgets\Seo;
+
+ /**
+ * @var Page $model
+ * @var View $this
+ */
+
+ $this->params[ 'seo' ][ Seo::TITLE ] = !empty($model->meta_title) ? $model->meta_title : $model->title;
+ $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty($model->meta_description) ? $model->meta_description : '';
+ $this->params[ 'breadcrumbs' ][] = $model->title;
+
+ echo $model->body;
\ No newline at end of file
diff --git a/frontend/web/js/script.js b/frontend/web/js/script.js
index 3410a97..82ddbd4 100755
--- a/frontend/web/js/script.js
+++ b/frontend/web/js/script.js
@@ -18,7 +18,7 @@ $(document).ready(
if($(this).hasClass('opened')) {
$('.more a').text('Узнать больше');
} else {
- $('.more a').text('Скрыть');
+ $('.more a').text('Свернуть');
}
$(this).toggleClass('opened');
return false;
@@ -112,7 +112,7 @@ $(document).ready(
event.preventDefault();
if($(".simple-spoiler").hasClass("just-closed"))
{
- $('.just-more a').text("Скрыть");
+ $('.just-more a').text("Свернуть");
$('.simple-spoiler').animate({height : spoilerFullHeight}, 1000);
} else
{
--
libgit2 0.21.4