params[ 'seo' ][ 'key' ] = $product->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']['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->registerMetaTag (['name' => 'keywords', 'content' => $product->meta_keywords]); //foreach($product->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' ][] = [ 'label' => $product->category->categoryName->value, 'url' => [ 'catalog/category', 'category' => $product->category, ], ]; $this->params[ 'breadcrumbs' ][] = $product->fullname . ' #' . $product->enabledVariants[ 0 ]->sku; $this->registerJs(' var checkData = function($index) { var sourceNew = $(".productLeftBar .product_mod > li").eq($index); $(".productLeftBar .product_mod > li").removeClass("active") sourceNew.addClass("active"); var $source = sourceNew.find("a"); var $target = $(".productLeftBar .cost_box"); $("#cost").text($source.data("cost")); $("#old_cost").text($source.data("old_cost")); if (parseInt ($source.data("old_cost")) == 0) { $target.find("strike").hide(); } else { $target.find("strike").show(); } $("#product_id").val($source.data("id")); $("#art").text($source.data("art")); $("#color").text($source.data("color")); $("#pic").attr("src",$source.data("image")); $("#picoriginal").attr("href",$source.data("imageoriginal")); } $(".product_mod > li").click(function() { checkData($(this).index()); Shadowbox.setup($("#picoriginal")); return false; }); checkData(0); ', View::POS_READY, 'fasovka'); $this->registerJs(" $('#nav_product li a').addClass('active'); $('#nav_product li').find('.info').toggle(); $('#nav_product li a').bind('click',function() { if($(this).parent().find('.info').css('display')=='none')$(this).addClass('active'); else $(this).removeClass('active'); $(this).parent().find('.info').toggle(); return false; }); ", 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(" Shadowbox.init({ }); ", View::POS_READY, 'Shadowbox'); ?> session->getFlash('success')): ?>
*/ ?>
enabledVariants[ 0 ]->imageUrl, 'product_view', [ 'id' => 'pic', 'alt' => $product->category->categoryName->value . ' ' . $product->fullname, 'title' => $product->category->categoryName->value . ' ' . $product->fullname, ]) ?>
$product, // ]); ?>
$product ]) ?> 'promo' ]) ?> 'new' ]) ?> 'top' ]) ?> registerJs(" var productHash = window.location.hash; productHash = productHash.replace('#','') var productUl = $('ul.product_mod li') var productA = productUl.find('a#'+productHash) productUl.removeClass('active') productA.parent().addClass('active') var dataLink = productA.attr('data-imageoriginal') var dataImg = productA.attr('data-image') $('#pic').attr('src',dataImg) $('#pic').parent().attr('href',dataLink) ", View::POS_READY, 'new_script'); ?>