diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php
index 42d08ef..0941b8a 100755
--- a/frontend/views/catalog/product.php
+++ b/frontend/views/catalog/product.php
@@ -7,21 +7,25 @@
// use common\modules\comment\widgets\CommentWidget;
use common\modules\comment\widgets\CommentWidget;
use common\modules\product\models\Category;
-use yii\helpers\Html;
-use yii\web\View;
+ use yii\helpers\Html;
+ use yii\web\View;
use yii\helpers\Url;
use frontend\widgets\Seo;
-use frontend\assets\FlipclockAsset;
-FlipclockAsset::register($this);
+ use frontend\assets\FlipclockAsset;
+
+ FlipclockAsset::register($this);
+ $fullname = $product->fullname;
$this->params[ 'seo' ][ 'key' ] = $category->categoryName->value;
- $this->params[ 'seo' ][ 'fields' ][ 'name' ] = $product->fullname;
- $this->params[ 'seo' ][ 'h1' ] = !empty( Seo::widget([ 'row' => 'h1' ]) ) ? Seo::widget([ 'row' => 'h1' ]) : $product->fullname;
+ $this->params[ 'seo' ][ 'fields' ][ 'name' ] = $fullname;
+ $this->params[ 'seo' ][ 'h1' ] = !empty( Seo::widget([ 'row' => 'h1' ]) ) ? Seo::widget(
+ [ 'row' => 'h1' ]
+ ) : $fullname;
- //$this->params['seo']['title'] = "Купить " . substr($product->category->categoryName->value, 0, -2) . " " . $product->fullname . " в Киеве, Харькове, Украине: цены, отзывы - Rukzachok.com.ua";
- //$this->params['seo']['description'] = "Заказать " . substr($product->category->categoryName->value, 0, -2) . " " . $product->fullname . " - самые модные и стильные рюкзаки в Украине по лучшим ценам. Интернет магазин рюкзаков Rukzachok.com.ua";
- $this->title = $product->fullname;
- //$this->title = (! empty($product->meta_title)) ? $product->meta_title : $product->fullname;
- //$this->registerMetaTag (['name' => 'description', 'content' => ((! empty($product->meta_description)) ? $product->meta_description : $product->fullname)]);
+ //$this->params['seo']['title'] = "Купить " . substr($product->category->categoryName->value, 0, -2) . " " . $fullname . " в Киеве, Харькове, Украине: цены, отзывы - Rukzachok.com.ua";
+ //$this->params['seo']['description'] = "Заказать " . substr($product->category->categoryName->value, 0, -2) . " " . $fullname . " - самые модные и стильные рюкзаки в Украине по лучшим ценам. Интернет магазин рюкзаков Rukzachok.com.ua";
+ $this->title = $fullname;
+ //$this->title = (! empty($product->meta_title)) ? $product->meta_title : $fullname;
+ //$this->registerMetaTag (['name' => 'description', 'content' => ((! empty($product->meta_description)) ? $product->meta_description : $fullname)]);
//$this->registerMetaTag (['name' => 'keywords', 'content' => $product->meta_keywords]);
//foreach($product->category->getParents()->all() as $parent) {
@@ -39,18 +43,19 @@ FlipclockAsset::register($this);
],
];
$this->params[ 'breadcrumbs' ][] = [
- 'label' => $category->name.' '.$product->brand->name,
+ 'label' => $category->name . ' ' . $product->brand->name,
'url' => [
'catalog/category',
'category' => $category,
- 'filters' => [
- 'brands' => [$product->brand->alias]
- ]
+ 'filters' => [
+ 'brands' => [ $product->brand->alias ],
+ ],
],
];
- $this->params[ 'breadcrumbs' ][] = $product->fullname . ' #' . $product->variant->sku;
+ $this->params[ 'breadcrumbs' ][] = $fullname . ' #' . $product->variant->sku;
- $this->registerJs('
+ $this->registerJs(
+ '
var checkData = function($index)
{
@@ -94,9 +99,13 @@ FlipclockAsset::register($this);
checkData(0);
- ', View::POS_READY, 'fasovka');
+ ',
+ View::POS_READY,
+ 'fasovka'
+ );
- $this->registerJs("
+ $this->registerJs(
+ "
$('#nav_product li > a').addClass('active');
$('#nav_product li').find('.info').toggle();
@@ -108,43 +117,60 @@ FlipclockAsset::register($this);
return false;
});
- ", View::POS_READY, 'nav_product');
+ ",
+ View::POS_READY,
+ 'nav_product'
+ );
$this->registerCssFile(Yii::$app->request->BaseUrl . '/js/shadowbox-3.0.3/shadowbox.css');
- $this->registerJsFile(Yii::$app->request->baseUrl . '/js/shadowbox-3.0.3/shadowbox.js', [
- 'position' => View::POS_END,
- 'depends' => [ 'yii\web\JqueryAsset' ],
- ]);
- $this->registerJs("
+ $this->registerJsFile(
+ Yii::$app->request->baseUrl . '/js/shadowbox-3.0.3/shadowbox.js',
+ [
+ 'position' => View::POS_END,
+ 'depends' => [ 'yii\web\JqueryAsset' ],
+ ]
+ );
+ $this->registerJs(
+ "
Shadowbox.init({
});
- ", View::POS_READY, 'Shadowbox');
+ ",
+ View::POS_READY,
+ 'Shadowbox'
+ );
?>
-session->getFlash('success')): ?>
+session->getFlash('success')): ?>
= $flash ?>
= Seo::widget([ 'row' => 'h1' ]) ?>
- enabledVariantsGrouped as $variantGroup) : ?>
+ enabledVariantsGrouped as $variantGroup) : ?>
= $variantGroup->name2 ?>
- _variants as $variant): ?>
+ _variants as $variant): ?>
-
- = \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant', [
- 'alt' => $category->categoryName->value . ' ' . $product->fullname,
- 'title' => $category->categoryName->value . ' ' . $product->fullname,
- ]) ?>
+ title="= $fullname ?>">
+ = \common\components\artboximage\ArtboxImageHelper::getImage(
+ $variant->imageUrl,
+ 'product_variant',
+ [
+ 'alt' => $fullname,
+ 'title' => $fullname,
+ ]
+ ) ?>
@@ -158,12 +184,12 @@ FlipclockAsset::register($this);
@@ -174,33 +200,41 @@ FlipclockAsset::register($this);
- events as $event):?>
- end_at) && $event->isActive()):?>
+ events as $event): ?>
+ end_at ) && $event->isActive()): ?>
-
-
= Html::a('Акция!!! '.$event->name,Url::to(['event/show','alias'=>$event->alias,'id'=>$event->primaryKey]))?>
+
+
= Html::a(
+ 'Акция!!! ' . $event->name,
+ Url::to(
+ [
+ 'event/show',
+ 'alias' => $event->alias,
+ 'id' => $event->primaryKey,
+ ]
+ )
+ ) ?>
До конца осталось:
-
+
-
+
- Характеристики
-
Бренд: = Html::a($product->brand->name, [
- 'catalog/category',
- 'category' => $category,
- 'filters' => [
- 'brands' => [$product->brand->alias]
- ]
- ])
- ?>
- getActiveProperties($category->category_id) as $group): ?>
+
Бренд: = Html::a(
+ $product->brand->name,
+ [
+ 'catalog/category',
+ 'category' => $category,
+ 'filters' => [
+ 'brands' => [ $product->brand->alias ],
+ ],
+ ]
+ ) ?>
+ getActiveProperties($category->category_id) as $group): ?>
name .' ';
+ echo $group->name . ' ';
$i = 1;
- foreach($group->_options as $option) {
- if ($group->is_filter) {
- echo Html::a(
- $option->ValueRenderHTML,
- [
- 'catalog/category',
- 'category' => $category,
- 'filters' => [
- $group->alias => [ $option->alias ],
- ],
- ]
- );
- } else {
- echo $option->ValueRenderHTML;
- }
- if (count($group->_options) != $i) {
- echo ', ';
- }
- $i++;
+ foreach ($group->_options as $option) {
+ if ($group->is_filter) {
+ echo Html::a(
+ $option->ValueRenderHTML,
+ [
+ 'catalog/category',
+ 'category' => $category,
+ 'filters' => [
+ $group->alias => [ $option->alias ],
+ ],
+ ]
+ );
+ } else {
+ echo $option->ValueRenderHTML;
+ }
+ if (count($group->_options) != $i) {
+ echo ', ';
+ }
+ $i++;
}
- unset($i);
+ unset( $i );
?>
@@ -336,16 +389,26 @@ FlipclockAsset::register($this);
- video ) && strpos($product->video, '.jpg') === false && strpos($product->video, '.png') === false) : ?>
+ video ) && strpos($product->video, '.jpg') === false && strpos(
+ $product->video,
+ '.png'
+ ) === false
+ ) : ?>
Видео
- video, '
@@ -355,38 +418,60 @@ FlipclockAsset::register($this);
- = \common\components\artboximage\ArtboxImageHelper::getImage($product->variant->imageUrl, 'product_view', [
- 'id' => 'pic',
- 'alt' => $category->categoryName->value . ' ' . $product->fullname,
- 'title' => $category->categoryName->value . ' ' . $product->fullname,
- ]) ?>
+ = \common\components\artboximage\ArtboxImageHelper::getImage(
+ $product->variant->imageUrl,
+ 'product_view',
+ [
+ 'id' => 'pic',
+ 'alt' => $fullname,
+ 'title' => $fullname,
+ ]
+ ) ?>
- events as $event):?>
- banner) && $event->isActive()):?>
- = Html::a(\common\components\artboximage\ArtboxImageHelper::getImage($event->bannerUrl, 'event_in_product'),Url::to(['event/show','alias'=>$event->alias,'id'=>$event->primaryKey]))?>
+ events as $event): ?>
+ banner ) && $event->isActive()): ?>
+ = Html::a(
+ \common\components\artboximage\ArtboxImageHelper::getImage(
+ $event->bannerUrl,
+ 'event_in_product'
+ ),
+ Url::to(
+ [
+ 'event/show',
+ 'alias' => $event->alias,
+ 'id' => $event->primaryKey,
+ ]
+ )
+ ) ?>
-
+
@@ -399,7 +484,8 @@ FlipclockAsset::register($this);
= \common\modules\product\widgets\lastProducts::widget() ?>
registerJs("
+ $this->registerJs(
+ "
var productHash = window.location.hash;
productHash = productHash.replace('#','')
@@ -412,5 +498,8 @@ FlipclockAsset::register($this);
$('#pic').attr('src',dataImg)
$('#pic').parent().attr('href',dataLink)
- ", View::POS_READY, 'new_script');
+ ",
+ View::POS_READY,
+ 'new_script'
+ );
?>
\ No newline at end of file
diff --git a/frontend/views/catalog/product_item.php b/frontend/views/catalog/product_item.php
index 0fea24c..eb13b23 100755
--- a/frontend/views/catalog/product_item.php
+++ b/frontend/views/catalog/product_item.php
@@ -6,6 +6,7 @@
Yii::$app->getModule('artbox-comment');
CommentAsset::register($this);
+ $fullname = $product->fullname;
?>
@@ -16,8 +17,8 @@
'#' => 'm' . $product->enabledVariants[ 0 ]->product_variant_id,
]) ?>">
= \common\components\artboximage\ArtboxImageHelper::getImage($product->enabledVariants[ 0 ]->imageUrl, 'list', [
- 'alt' => $product->category->categoryName->value . ' ' . $product->fullname,
- 'title' => $product->category->categoryName->value . ' ' . $product->fullname,
+ 'alt' => $fullname,
+ 'title' => $fullname,
]) ?>
@@ -64,7 +65,7 @@
'product' => $product,
'#' => 'm' . $product->enabledVariants[ 0 ]->product_variant_id,
]) ?>"
- class="name">= $product->fullname ?>
+ class="name">= $fullname ?>
'm' . $variant->product_variant_id,
]) ?>">
= \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant', [
- 'alt' => $product->category->categoryName->value . ' ' . $product->fullname,
- 'title' => $product->category->categoryName->value . ' ' . $product->fullname,
+ 'alt' => $fullname,
+ 'title' => $fullname,
]) ?>
--
libgit2 0.21.4