Commit 84c4457e1246ee7d7f2f7d6e58b212e3f4e85475
1 parent
6d8f172c
123
Showing
15 changed files
with
48 additions
and
633 deletions
Show diff stats
frontend/views/basket/index.php
... | ... | @@ -26,14 +26,14 @@ $('#orders-delivery input[type=\"radio\"]').click(function(){ |
26 | 26 | }); |
27 | 27 | ", View::POS_READY, 'order-delivery'); |
28 | 28 | ?> |
29 | - <nav class="bread-crumbs"> | |
30 | - <?= Breadcrumbs::widget([ | |
31 | - 'links' => [ | |
32 | - 'Корзина' | |
33 | - ], | |
34 | - ]) ?> | |
35 | - <div class="both"></div> | |
36 | - </nav> | |
29 | +<!-- <nav class="bread-crumbs">--> | |
30 | +<!-- --><?//= Breadcrumbs::widget([ | |
31 | +// 'links' => [ | |
32 | +// 'Корзина' | |
33 | +// ], | |
34 | +// ]) ?> | |
35 | +<!-- <div class="both"></div>--> | |
36 | +<!-- </nav>--> | |
37 | 37 | |
38 | 38 | |
39 | 39 | ... | ... |
frontend/views/call/index.php
... | ... | @@ -12,14 +12,14 @@ $this->registerMetaTag(['name' => 'description', 'content' => 'Обратный |
12 | 12 | $this->registerMetaTag(['name' => 'keywords', 'content' => 'Обратный звонок']); |
13 | 13 | ?> |
14 | 14 | |
15 | - <nav class="bread-crumbs"> | |
16 | - <?= Breadcrumbs::widget([ | |
17 | - 'links' => [ | |
18 | - 'Обратный звонок' | |
19 | - ], | |
20 | - ]) ?> | |
21 | - <div class="both"></div> | |
22 | - </nav> | |
15 | +<!-- <nav class="bread-crumbs">--> | |
16 | +<!-- --><?//= Breadcrumbs::widget([ | |
17 | +// 'links' => [ | |
18 | +// 'Обратный звонок' | |
19 | +// ], | |
20 | +// ]) ?> | |
21 | +<!-- <div class="both"></div>--> | |
22 | +<!-- </nav>--> | |
23 | 23 | |
24 | 24 | <div class="layout"> |
25 | 25 | ... | ... |
frontend/views/catalog/brand.php
... | ... | @@ -21,15 +21,6 @@ $this->registerJsFile (Yii::getAlias('@web/js/ion.rangeSlider.js')); |
21 | 21 | ?> |
22 | 22 | |
23 | 23 | |
24 | -<nav class="bread-crumbs"> | |
25 | - <?= Breadcrumbs::widget ([ | |
26 | - 'links' => $this->params['breadcrumbs'], | |
27 | - ]) | |
28 | - ?> | |
29 | - | |
30 | - | |
31 | - <div class="both"></div> | |
32 | -</nav> | |
33 | 24 | |
34 | 25 | <div class="loyout"> |
35 | 26 | ... | ... |
frontend/views/catalog/brands.php
... | ... | @@ -11,13 +11,7 @@ $this->params['seo']['fields']['name'] = 'Brands NAME FROM FIELD'; |
11 | 11 | $this->params['seo']['key']= 'brands'; |
12 | 12 | ?> |
13 | 13 | |
14 | -<nav class="bread-crumbs"> | |
15 | - <?= Breadcrumbs::widget ([ | |
16 | - 'links' => $this->params['breadcrumbs'], | |
17 | -]) | |
18 | - ?> | |
19 | -<div class="both"></div> | |
20 | -</nav> | |
14 | + | |
21 | 15 | |
22 | 16 | <div class="loyout"> |
23 | 17 | <h1><?= $this->params['seo']['h1']?></h1> | ... | ... |
frontend/views/catalog/catalog.php
... | ... | @@ -6,13 +6,6 @@ $this->title = 'Каталог'; |
6 | 6 | $this->params['breadcrumbs'][] = ['label' => 'Каталог']; |
7 | 7 | ?> |
8 | 8 | |
9 | -<nav class="bread-crumbs"> | |
10 | - <?= Breadcrumbs::widget ([ | |
11 | - 'links' => $this->params['breadcrumbs'], | |
12 | - ]) | |
13 | - ?> | |
14 | - <div class="both"></div> | |
15 | -</nav> | |
16 | 9 | |
17 | 10 | <div class="loyout"> |
18 | 11 | <div class="content"> | ... | ... |
frontend/views/catalog/index.php
... | ... | @@ -8,15 +8,15 @@ $this->title = $catalog->meta_title; |
8 | 8 | $this->params['seo']['fields']['meta-title'] = $catalog->meta_title; |
9 | 9 | $this->registerMetaTag(['name' => 'description', 'content' => $catalog->meta_description]); |
10 | 10 | $this->registerMetaTag(['name' => 'keywords', 'content' => $catalog->meta_keywords]); |
11 | -?> | |
12 | - <nav class="bread-crumbs"> | |
13 | - <?= Breadcrumbs::widget([ | |
14 | - | |
15 | - 'links' => [ ['label'=>'Каталог','url'=>['catalog/all']], | |
16 | - $catalog->name], | |
17 | - ]) ?> | |
18 | - <div class="both"></div> | |
19 | - </nav> | |
11 | +//?> | |
12 | +<!-- <nav class="bread-crumbs">--> | |
13 | +<!-- --><?//= Breadcrumbs::widget([ | |
14 | +// | |
15 | +// 'links' => [ ['label'=>'Каталог','url'=>['catalog/all']], | |
16 | +// $catalog->name], | |
17 | +// ]) ?> | |
18 | +<!-- <div class="both"></div>--> | |
19 | +<!-- </nav>--> | |
20 | 20 | |
21 | 21 | <div class="layout"> |
22 | 22 | ... | ... |
frontend/views/catalog/product.php
... | ... | @@ -106,12 +106,12 @@ |
106 | 106 | ", View::POS_READY, 'Shadowbox'); |
107 | 107 | ?> |
108 | 108 | |
109 | - <nav class="bread-crumbs"> | |
110 | - <?= Breadcrumbs::widget([ | |
111 | - 'links' => $this->params[ 'breadcrumbs' ], | |
112 | - ]) ?> | |
113 | - <div class="both"></div> | |
114 | - </nav> | |
109 | +<!-- <nav class="bread-crumbs">--> | |
110 | +<!-- --><?//= Breadcrumbs::widget([ | |
111 | +// 'links' => $this->params[ 'breadcrumbs' ], | |
112 | +// ]) ?> | |
113 | +<!-- <div class="both"></div>--> | |
114 | +<!-- </nav>--> | |
115 | 115 | <?php if($flash = Yii::$app->session->getFlash('success')): ?> |
116 | 116 | <div class="alert-success"><?= $flash ?></div> |
117 | 117 | <?php endif; ?> | ... | ... |
frontend/views/catalog/products.php
... | ... | @@ -22,7 +22,7 @@ $this->params['seo']['category_name'] = $category->name; |
22 | 22 | //foreach($category->getParents()->all() as $parent) { |
23 | 23 | // $this->params['breadcrumbs'][] = ['label' => $parent->categoryName->value, 'url' => ['catalog/category', 'category' => $parent]]; |
24 | 24 | //} |
25 | -$this->params['breadcrumbs'][] = ['label' => 'Каталог', 'url' => ['catalog/category']]; | |
25 | +$this->params['breadcrumbs'][] = ['label' => 'Каталог', 'url' => Url::to(['catalog/category']),'itemprop' => 'url', ]; | |
26 | 26 | $this->params['breadcrumbs'][] = $category->categoryName->value; |
27 | 27 | |
28 | 28 | |
... | ... | @@ -63,16 +63,8 @@ $this->registerJsFile(Yii::getAlias('@web/js/ion.rangeSlider.js'),[ |
63 | 63 | <?php endif?> |
64 | 64 | </script> |
65 | 65 | |
66 | -<nav class="bread-crumbs"> | |
67 | - <?= Breadcrumbs::widget ([ | |
68 | - 'links' => $this->params['breadcrumbs'], | |
69 | - ]) | |
70 | - ?> | |
71 | 66 | |
72 | 67 | |
73 | - <div class="both"></div> | |
74 | -</nav> | |
75 | - | |
76 | 68 | <div class="loyout"> |
77 | 69 | <div class="leftbar"> |
78 | 70 | <?php /* | ... | ... |
frontend/views/layouts/main.php
... | ... | @@ -12,6 +12,7 @@ use common\models\Subscribe; |
12 | 12 | use yii\widgets\ActiveForm; |
13 | 13 | use common\modules\product\models\Category; |
14 | 14 | use frontend\widgets\Seo; |
15 | +use yii\widgets\Breadcrumbs; | |
15 | 16 | |
16 | 17 | AppAsset::register ($this); |
17 | 18 | $this->registerJs (" |
... | ... | @@ -241,6 +242,20 @@ $this->registerJs(" |
241 | 242 | </div> |
242 | 243 | |
243 | 244 | <div class="wrapper_all"> |
245 | + <?php if(isset ($this->params['breadcrumbs'])):?> | |
246 | + <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> | |
247 | + <nav class="bread-crumbs"> | |
248 | + <?= Breadcrumbs::widget ([ | |
249 | + 'homeLink' => ['label' => 'Главная', 'url' => Url::to(['/']),'itemprop' => 'url', ], | |
250 | + 'itemTemplate' => "<li><span itemprop=\"title\">{link}</span></li>\n", // template for all links | |
251 | + 'links' => $this->params['breadcrumbs'], | |
252 | + ]) | |
253 | + ?> | |
254 | + | |
255 | + | |
256 | + <div class="both"></div> | |
257 | + </nav></span> | |
258 | + <?php endif; ?> | |
244 | 259 | <?= $content ?> |
245 | 260 | </div> |
246 | 261 | ... | ... |
frontend/views/products/_product.php deleted
1 | -<?php | |
2 | -use yii\helpers\Url; | |
3 | - | |
4 | -?> | |
5 | -<div class="boxitem"> | |
6 | - <div class="pixbox"> | |
7 | - <a href="<?= Url::to([ | |
8 | - 'products/show', | |
9 | - 'translit_rubric' => $item->catalog->translit, | |
10 | - 'translit' => $item->translit, | |
11 | - 'id' => $item->id]) | |
12 | - ?>"> | |
13 | - <img src="<?= Yii::$app->request->baseUrl . '/upload/products/ico/' . $item->imageAvator ?>" border="0"/> | |
14 | - </a> | |
15 | - </div> | |
16 | - <a href="<?= Url::to([ | |
17 | - 'products/show', | |
18 | - 'translit_rubric' => $item->catalog->translit, | |
19 | - 'translit' => $item->translit, | |
20 | - 'id' => $item->id]) | |
21 | - ?>" class="name"><?= $item->name ?> | |
22 | - </a> | |
23 | - | |
24 | -<?php | |
25 | - | |
26 | - echo '<div class="cost-block">'; | |
27 | - | |
28 | - // есть скидка | |
29 | - if ($item->costMax->old_cost != 0 && $item->costMax->old_cost != $item->costMax->cost) | |
30 | - { | |
31 | - // одинаковая скидка | |
32 | - if ($item->costMax->count_diff == 1) | |
33 | - { | |
34 | - echo '<strike><span id=\'old_cost\'>'.$item->costMax->old_cost.'</span> грн.</strike>'; | |
35 | - } | |
36 | - } | |
37 | - | |
38 | - echo '<p class="cost">'.$item->costMax->cost.' грн.</p>'; | |
39 | - | |
40 | - echo '</div>'; | |
41 | - | |
42 | -?> | |
43 | -</div> | |
44 | - <a href="<?= Url::to([ | |
45 | - 'products/show', | |
46 | - 'translit_rubric' => $item->catalog->translit, | |
47 | - 'translit' => $item->translit, | |
48 | - 'id' => $item->id]) | |
49 | - ?>" class="link_buy">Купить</a> | |
50 | - | |
51 | -<div class="mycarousel"> | |
52 | - <ul class="jcarousel jcarousel-skin-tango"> | |
53 | - <?php foreach ($item->mods as $mods) { ?> | |
54 | - <li> | |
55 | - <a href="<?= Url::to([ | |
56 | - 'products/show', | |
57 | - 'translit_rubric' => $item->catalog->translit, | |
58 | - 'translit' => $item->translit, | |
59 | - 'id' => $item->id, | |
60 | - '#' => 'm' . $mods->id]) ?>"> | |
61 | - <img src="<?= Yii::$app->request->baseUrl . '/upload/mod/ico/' . $mods->imageAvator ?>" width="40" | |
62 | - height="40" alt="<?= $mods->name ?>"/> | |
63 | - </a> | |
64 | - </li> | |
65 | - <?php } ?> | |
66 | - </ul> | |
67 | -</div> | |
68 | 0 | \ No newline at end of file |
frontend/views/products/_show.php deleted
1 | -<?php | |
2 | -use yii\widgets\Breadcrumbs; | |
3 | -use yii\web\View; | |
4 | - | |
5 | - | |
6 | -$this->title = (!empty($product->meta_title))?$product->meta_title:$product->name; | |
7 | -$this->registerMetaTag(['name' => 'description', 'content' => ((!empty($product->meta_description))?$product->meta_description:$product->name)]); | |
8 | -$this->registerMetaTag(['name' => 'keywords', 'content' => $product->meta_keywords]); | |
9 | -$this->registerJs(" | |
10 | - var checkData = function(obj){ | |
11 | - $('#cost').text($(obj).data('cost')); | |
12 | - $('#product_id').val($(obj).data('id')); | |
13 | - } | |
14 | - $('.fasovka input[type=\"radio\"]').click(function() { | |
15 | - checkData(this); | |
16 | - }); | |
17 | - checkData($( '.fasovka input:checked' )); | |
18 | -", View::POS_READY, 'fasovka'); | |
19 | - | |
20 | -$this->registerJs(" | |
21 | - | |
22 | - $('#product_gallery a').click(function() { | |
23 | - var image = $(this).attr('href'); | |
24 | - $('#productPic').attr('src', image); | |
25 | - return false; | |
26 | - }); | |
27 | - | |
28 | -", View::POS_READY, 'gallery'); | |
29 | - | |
30 | -$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jquery.sliderkit.1.9.2.pack.js',['position'=>View::POS_END,'depends'=>['yii\web\YiiAsset']]); | |
31 | -$this->registerJs(" | |
32 | - | |
33 | - $('.skit').sliderkit({ | |
34 | - cssprefix: 'skit', | |
35 | - shownavitems: 3, | |
36 | - auto: false, | |
37 | - scroll: 1, | |
38 | - circular: false, | |
39 | - // freeheight: true, | |
40 | - scrollspeed: 500 | |
41 | - }); | |
42 | - | |
43 | -", View::POS_READY, 'sliderkit'); | |
44 | -?> | |
45 | - <nav class="bread-crumbs"> | |
46 | - <?= Breadcrumbs::widget([ | |
47 | - 'links' => [ | |
48 | - ['label'=>'Каталог','url'=>['catalog/all']], | |
49 | - ['label'=>$catalog->parent->name,'url'=>['catalog/index','translit'=>$catalog->parent->translit]], | |
50 | - ['label'=>$catalog->name,'url'=>['products/index','translit'=>$catalog->translit]], | |
51 | - $product->name, | |
52 | - ], | |
53 | - ]) ?> | |
54 | - <div class="both"></div> | |
55 | - </nav> | |
56 | - | |
57 | -<div class="layout"> | |
58 | - | |
59 | - | |
60 | - <div class="leftbar"> | |
61 | - <?= $this->render('/catalog/_catalog_box',['catalog'=>$catalog]) ?> | |
62 | - | |
63 | - </div> | |
64 | - <div class="content"> | |
65 | - <h1><?=$product->name?></h1> | |
66 | - <div class="ten2"></div> | |
67 | - | |
68 | - <div class="leftbar_product"> | |
69 | - <div class="product_pic_big"> | |
70 | - <img id="productPic" src="<?=Yii::$app->request->baseUrl.'/upload/products/big/'.$product->image?>" width="400" height="400" border="0" /> | |
71 | - <div id="pic_notvisible"> | |
72 | - <img src="<?=Yii::$app->request->baseUrl.'/upload/products/big/'.$product->image?>" width="400" height="400" border="0" /> | |
73 | - </div> | |
74 | - </div> | |
75 | - <div class='skit'> | |
76 | - <div class="skit-nav"> | |
77 | - <div id="product_gallery" class="skit-nav-clip"> | |
78 | - <ul> | |
79 | - <?foreach($product->fotos as $key=>$item):?> | |
80 | - <li> | |
81 | - <a href="<?=Yii::$app->request->baseUrl.'/upload/fotos/big/'.$item->image?>"><img src="<?=Yii::$app->request->baseUrl.'/upload/fotos/ico/'.$item->image?>" width="100" height="100" border="0" alt="<?=$item->name?>" /></a> | |
82 | - </li> | |
83 | - <?endforeach;?> | |
84 | - </div> | |
85 | - | |
86 | - <a href="#" class="skit-btn skit-nav-btn skit-nav-prev"></a> | |
87 | - <a href="#" class="skit-btn skit-nav-btn skit-nav-next"></a> | |
88 | - </div> | |
89 | - </div> | |
90 | - | |
91 | - </div> | |
92 | - <div class="content_product"> | |
93 | - <p class="txtf">Фасовка</p> | |
94 | - <div class="fasovka"> | |
95 | - <?foreach($product->mods as $key=>$item):?> | |
96 | - <input type="radio" name="fasovka" data-cost="<?=$item->cost?>" data-id="<?=$item->id?>" id="f<?=$key?>" <?=($key==0)?'checked':'';?>> <label for="f<?=$key?>"><?=$item->name?></label> | |
97 | - <?endforeach;?> | |
98 | - </div> | |
99 | - <div class="count"> | |
100 | - <label for="count" class="txtf">Количество</label> <input id="count" min="1" value="1" type="number" /> | |
101 | - </div> | |
102 | - <div class="boy_box"> | |
103 | - <input type='hidden' id='product_id' /> | |
104 | - <a href="#" rel='product' class="buy fr">Купить</a> | |
105 | - <div class="fl txtfb">цена <span id="cost">0</span> грн</div><div class="both"></div> | |
106 | - </div> | |
107 | - <div class="info"> | |
108 | - <p class="txtf">Характеристики</p> | |
109 | - <?=$product->char?> | |
110 | - | |
111 | - <p class="txtf">Описание</p> | |
112 | - <?=$product->body?> | |
113 | - </div> | |
114 | - | |
115 | - </div> | |
116 | - <div class="both"></div> | |
117 | - | |
118 | - | |
119 | - </div><div class="both"></div> | |
120 | - | |
121 | - | |
122 | -</div> | |
123 | 0 | \ No newline at end of file |
frontend/views/products/compare.php deleted
1 | -<?php | |
2 | -use yii\helpers\Url; | |
3 | -use yii\helpers\Html; | |
4 | -use yii\widgets\Breadcrumbs; | |
5 | - | |
6 | -$this->title = 'СРАВНЕНИЕ'; | |
7 | -$this->registerMetaTag(['name' => 'description', 'content' => 'СРАВНЕНИЕ']); | |
8 | -$this->registerMetaTag(['name' => 'keywords', 'content' => 'СРАВНЕНИЕ']); | |
9 | - | |
10 | -$this->params['breadcrumbs'][] = ['label'=>'Каталог','url'=>['/catalog/all']]; | |
11 | -$this->params['breadcrumbs'][] = ['label'=>'СРАВНЕНИЕ','url'=>['/products/compare']]; | |
12 | -?> | |
13 | - | |
14 | - | |
15 | - <nav class="bread-crumbs"> | |
16 | - <?= Breadcrumbs::widget([ | |
17 | - 'links' => $this->params['breadcrumbs'], | |
18 | - ]) ?> | |
19 | - <div class="both"></div> | |
20 | - </nav> | |
21 | - | |
22 | - | |
23 | - <h1>СРАВНЕНИЕ</h1> | |
24 | - <div class="products pn"> | |
25 | - | |
26 | - <ul> | |
27 | - | |
28 | - <?foreach($products as $item):?> | |
29 | - <li class="item"> | |
30 | - <a href="<?=Url::to(['products/show','translit_rubric'=>$item->catalog->translit,'translit'=>$item->translit,'id'=>$item->id])?>"><img src="<?=Yii::$app->request->baseUrl.'/upload/products/ico/'.$item->image?>" width="134" height="200" border="0" /></a> | |
31 | - <strong><a href="<?=Url::to(['products/show','translit_rubric'=>$item->catalog->translit,'translit'=>$item->translit,'id'=>$item->id])?>" class="name"><?=$item->name?></a></strong> | |
32 | - <div class="info"> | |
33 | - <p>Бренд: <?=$item->brend->name?></p> | |
34 | - <?foreach($item->params as $key=>$param):?> | |
35 | - <p><?=$param->name?> <?=$param->size?></p> | |
36 | - <?endforeach;?> | |
37 | - </div> | |
38 | - <p class="cost"><?=$item->cost->cost?> грн.</p> | |
39 | - <a href="<?=Url::to(['products/show','translit_rubric'=>$item->catalog->translit,'translit'=>$item->translit,'id'=>$item->id])?>" class="link_buy">Купить</a> | |
40 | - | |
41 | - </li> | |
42 | - <?endforeach;?> | |
43 | - | |
44 | - </ul><div class="both"></div> | |
45 | - </div> | |
46 | - |
frontend/views/products/index.php deleted
1 | -<?php | |
2 | -use yii\helpers\Url; | |
3 | - use yii\helpers\Html; | |
4 | - use yii\widgets\Breadcrumbs; | |
5 | - use app\models\Catalog; | |
6 | - use yii\bootstrap\ActiveForm; | |
7 | - use yii\helpers\ArrayHelper; | |
8 | - use yii\web\View; | |
9 | - use yii\widgets\LinkPager; | |
10 | - use app\models\Filters; | |
11 | - use app\models\Type; | |
12 | - use app\models\Brends; | |
13 | - use app\components\FiltersWidget; | |
14 | - use app\components\BrendsWidget; | |
15 | - | |
16 | -?> | |
17 | -<?php | |
18 | -$this->params['catalog_id'] = $catalog->id; | |
19 | - $this->title = $catalog->meta_title; | |
20 | - $this->registerMetaTag (['name' => 'description', 'content' => $catalog->meta_description]); | |
21 | - $this->registerMetaTag (['name' => 'keywords', 'content' => $catalog->meta_keywords]); | |
22 | - $this->registerCssFile (Yii::$app->request->BaseUrl . '/css/begunok.css'); | |
23 | - $this->registerJsFile (Yii::$app->request->baseUrl . '/js/jquery.ui-slider.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); | |
24 | - $this->registerJsFile (Yii::$app->request->baseUrl . '/js/begunok.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); | |
25 | - $this->params['breadcrumbs'][] = ['label' => 'Каталог', 'url' => ['/catalog/all']]; | |
26 | - if (! empty($catalog->parent)) $this->params['breadcrumbs'][] = ['label' => $catalog->parent->name, 'url' => ['products/index', 'translit' => $catalog->parent->translit]]; | |
27 | - $this->params['breadcrumbs'][] = ['label' => $catalog->name]; | |
28 | -?> | |
29 | -<nav class="bread-crumbs"> | |
30 | - <?= Breadcrumbs::widget ([ | |
31 | - 'links' => $this->params['breadcrumbs'], | |
32 | - ]) | |
33 | - ?> | |
34 | - | |
35 | - | |
36 | - <div class="both"></div> | |
37 | -</nav> | |
38 | - | |
39 | - | |
40 | -<div class="loyout"> | |
41 | - <div class="leftbar"> | |
42 | - <img src="<?= Yii::$app->request->baseUrl ?>/img/new_coll.png" width="112" height="22"/><br/> | |
43 | - <img src="<?= Yii::$app->request->baseUrl ?>/img/pro.png" width="42" height="22"/> | |
44 | - | |
45 | - <?= BrendsWidget::widget (['translit' => $catalog->translit, 'catalog_id' => $catalog->id]) ?> | |
46 | - | |
47 | - <?= FiltersWidget::widget (['translit' => $catalog->translit, 'catalog_id' => $catalog->id]) ?> | |
48 | - | |
49 | - <div class="cost_box filters"> | |
50 | - <div class="begin">Цена</div> | |
51 | - <?php $form = ActiveForm::begin (['enableClientScript' => false]); ?> | |
52 | - <input type="hidden" value="500" id="max"/> | |
53 | - <div class="sliderCont"> | |
54 | - <div id="begunok"></div> | |
55 | - </div> | |
56 | - <div class="formCost"> | |
57 | - <?php echo $form->field ($modelProducts, 'minCost'); ?> | |
58 | - <?php echo $form->field ($modelProducts, 'maxCost'); ?> | |
59 | - </div> | |
60 | - <?php echo Html::submitButton (' Искать ', ['class' => 'submit4', 'style' => 'margin-left:50px;']); ?> | |
61 | - <?php ActiveForm::end (); ?> | |
62 | - <div class="both"></div> | |
63 | - </div> | |
64 | - | |
65 | - </div> | |
66 | - <div class="content"> | |
67 | - | |
68 | - | |
69 | - <h1><?= $catalog->name ?></h1> | |
70 | - <div class="products pn"> | |
71 | - | |
72 | - <ul> | |
73 | - | |
74 | - <?php foreach ($products as $item): ?> | |
75 | - <li class="item"> | |
76 | - <?= $this->render ('_product', ['item' => $item, 'num' => 3]) ?> | |
77 | - </li> | |
78 | - <?php endforeach; ?> | |
79 | - | |
80 | - </ul> | |
81 | - <div class="both"></div> | |
82 | - </div> | |
83 | - | |
84 | - <?= LinkPager::widget ([ | |
85 | - 'pagination' => $pages, | |
86 | - 'registerLinkTags' => true, | |
87 | - ]); ?> | |
88 | - <div class="both"></div> | |
89 | - | |
90 | - </div> | |
91 | - <div class="both"></div> | |
92 | - | |
93 | - | |
94 | -</div> | |
95 | - | |
96 | - | |
97 | - | |
98 | - | |
99 | - |
frontend/views/products/search.php deleted
1 | -<?php | |
2 | -use yii\helpers\Url; | |
3 | - use yii\widgets\Breadcrumbs; | |
4 | - use app\models\Catalog; | |
5 | - use yii\bootstrap\ActiveForm; | |
6 | - use yii\helpers\ArrayHelper; | |
7 | - use yii\web\View; | |
8 | - use yii\widgets\LinkPager; | |
9 | - use app\models\Fasovka; | |
10 | - use app\models\Type; | |
11 | - use app\models\Brends; | |
12 | - | |
13 | -?> | |
14 | -<?php | |
15 | -$this->title = 'Поиск'; | |
16 | - $this->registerMetaTag (['name' => 'description', 'content' => 'Поиск']); | |
17 | - $this->registerMetaTag (['name' => 'keywords', 'content' => 'Поиск']); | |
18 | -?> | |
19 | -<nav class="bread-crumbs"> | |
20 | - <?= Breadcrumbs::widget ([ | |
21 | - 'links' => [ | |
22 | - ['label' => 'Каталог', 'url' => ['catalog/all']], | |
23 | - 'Поиск', | |
24 | - ], | |
25 | - ]) ?> | |
26 | - <div class="both"></div> | |
27 | -</nav> | |
28 | - | |
29 | -<div class="layout"> | |
30 | - | |
31 | - <div class="content"> | |
32 | - <h1>Поиск</h1> | |
33 | - | |
34 | - <div class="ten"></div> | |
35 | - <?= empty($products) ? 'Не чего не найдено!' : '' ?> | |
36 | - <div class="products pn"> | |
37 | - | |
38 | - <ul> | |
39 | - | |
40 | - <?php foreach ($products as $item): ?> | |
41 | - <li class="item"> | |
42 | - <?= $this->render ('_product', ['item' => $item, 'num' => 3]) ?> | |
43 | - </li> | |
44 | - <?php endforeach; ?> | |
45 | - | |
46 | - </ul> | |
47 | - <div class="both"></div> | |
48 | - </div> | |
49 | - <?= LinkPager::widget ([ | |
50 | - 'pagination' => $pages, | |
51 | - 'registerLinkTags' => true, | |
52 | - ]); ?> | |
53 | - <div> </div> | |
54 | - <div class="ten"></div> | |
55 | - | |
56 | - | |
57 | - </div> | |
58 | - | |
59 | -</div> | |
60 | - | |
61 | 0 | \ No newline at end of file |
frontend/views/products/show.php deleted
1 | -<?php | |
2 | -use yii\widgets\Breadcrumbs; | |
3 | - use yii\web\View; | |
4 | - use yii\helpers\Url; | |
5 | - | |
6 | - $this->title = (! empty($product->meta_title)) ? $product->meta_title : $product->name; | |
7 | - $this->registerMetaTag (['name' => 'description', 'content' => ((! empty($product->meta_description)) ? $product->meta_description : $product->name)]); | |
8 | - $this->registerMetaTag (['name' => 'keywords', 'content' => $product->meta_keywords]); | |
9 | - $this->registerJs (' | |
10 | - | |
11 | - var checkData = function($index) | |
12 | - { | |
13 | - var $source = $(".productLeftBar .product_mod > li").eq($index).find("a"); | |
14 | - var $target = $(".productLeftBar .cost_box"); | |
15 | - | |
16 | - $("#cost").text($source.data("cost")); | |
17 | - $("#old_cost").text($source.data("old_cost")); | |
18 | - | |
19 | - if (parseInt ($source.data("old_cost")) == 0) | |
20 | - { | |
21 | - $target.find("strike").hide(); | |
22 | - } | |
23 | - else | |
24 | - { | |
25 | - $target.find("strike").show(); | |
26 | - } | |
27 | - | |
28 | - $("#product_id").val($source.data("id")); | |
29 | - $("#art").text($source.data("art")); | |
30 | - $("#color").text($source.data("color")); | |
31 | - $("#pic").attr("src",$source.data("image")); | |
32 | - $("#picoriginal").attr("href",$source.data("imageoriginal")); | |
33 | - } | |
34 | - | |
35 | - $(".product_mod > li").click(function() | |
36 | - { | |
37 | - checkData($(this).index()); | |
38 | - | |
39 | - Shadowbox.setup($("#picoriginal")); | |
40 | - | |
41 | - return false; | |
42 | - }); | |
43 | - | |
44 | - checkData(0); | |
45 | - | |
46 | - ', View::POS_READY, 'fasovka'); | |
47 | - | |
48 | - $this->registerJs (" | |
49 | - $('#nav_product li a').addClass('active'); | |
50 | - $('#nav_product li').find('.info').toggle(); | |
51 | - | |
52 | - $('#nav_product li a').bind('click',function() | |
53 | - { | |
54 | - if($(this).parent().find('.info').css('display')=='none')$(this).addClass('active'); | |
55 | - else $(this).removeClass('active'); | |
56 | - $(this).parent().find('.info').toggle(); | |
57 | - | |
58 | - return false; | |
59 | - }); | |
60 | - ", View::POS_READY, 'nav_product'); | |
61 | - | |
62 | - $this->registerCssFile (Yii::$app->request->BaseUrl . '/js/shadowbox-3.0.3/shadowbox.css'); | |
63 | - $this->registerJsFile (Yii::$app->request->baseUrl . '/js/shadowbox-3.0.3/shadowbox.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]); | |
64 | - $this->registerJs (" | |
65 | - Shadowbox.init({ | |
66 | - | |
67 | - }); | |
68 | - ", View::POS_READY, 'Shadowbox'); | |
69 | -?> | |
70 | - | |
71 | - | |
72 | -<nav class="bread-crumbs"> | |
73 | - <?= Breadcrumbs::widget ([ | |
74 | - 'links' => [ | |
75 | - ['label' => 'Каталог', 'url' => ['catalog/all']], | |
76 | - // ['label'=>$catalog->parent->name,'url'=>['catalog/index','translit'=>$catalog->parent->translit]], | |
77 | - ['label' => $catalog->name, 'url' => ['products/index', 'translit' => $catalog->translit]], | |
78 | - $product->name, | |
79 | - ], | |
80 | - ]) ?> | |
81 | - <div class="both"></div> | |
82 | -</nav> | |
83 | -<?php if ($flash = Yii::$app->session->getFlash ('success')): ?> | |
84 | - <div class="alert-success"><?= $flash ?></div> | |
85 | -<?php endif; ?> | |
86 | -<div class="loyout"> | |
87 | - | |
88 | - | |
89 | - <div class="productLeftBar"> | |
90 | - <h1><?= $product->name ?></h1> | |
91 | - <div class="begin">Цветовые решения</div> | |
92 | - <ul class="product_mod"> | |
93 | - <?php foreach ($product->mods as $key => $item): ?> | |
94 | - <li> | |
95 | - <a id='m<?= $item->id ?>' href="#" | |
96 | - data-cost="<?= $item->cost ?>" | |
97 | - data-old_cost="<?= $item->old_cost ?>" data-id="<?= $item->id ?>" data-art="<?= $item->art ?>" | |
98 | - data-color="<?= $item->color ?>" | |
99 | - data-image="<?= Yii::$app->request->baseUrl . '/upload/mod/big/' . $item->imageAvator ?>" | |
100 | - data-imageoriginal="<?= Yii::$app->request->baseUrl . '/upload/mod/' . $item->imageAvator ?>" | |
101 | - title="<?= $item->color ?>"> | |
102 | - <img | |
103 | - src="<?= Yii::$app->request->baseUrl . '/upload/mod/ico/' . $item->imageAvator ?>" | |
104 | - alt="<?= $item->name ?>" border="0" width="40" height="40"/> | |
105 | - </a> | |
106 | - </li> | |
107 | - <?php endforeach; ?> | |
108 | - </ul> | |
109 | - <div class="both"></div> | |
110 | - | |
111 | - <div class="cost_box"> | |
112 | - <div class='params'>код: <span id='art'></span><br/> цвет: <span id='color'></span></div> | |
113 | - <div class="w"> | |
114 | - <strike><span id='old_cost'>0</span> грн.</strike><br/> | |
115 | - <span class="cost"><span id='cost'>0</span> <span class="valute">грн.</span></span> | |
116 | - </div> | |
117 | - <input type='hidden' id='product_id'/> | |
118 | - <a href="#" rel='product' class="link_buy fl">Купить</a> | |
119 | - <div class="both"></div> | |
120 | - </div> | |
121 | - | |
122 | - <div class="product_service"> | |
123 | - <ul> | |
124 | - <li class="item1"><a href="<?= Url::to (['iam/share', 'id' => $product->id]) ?>">Добавить в закладки</a> | |
125 | - </li> | |
126 | - <li class="item2"><a href="<?= Url::to (['iam/price', 'id' => $product->id]) ?>">Узнать о снижение | |
127 | - цены</a></li> | |
128 | - <li class="item3"><a href="<?= Url::to (['products/compare', 'id' => $product->id]) ?>">Добавить в | |
129 | - сравнение</a></li> | |
130 | - </ul> | |
131 | - </div> | |
132 | - | |
133 | - </div> | |
134 | - | |
135 | - <div class="productRightBar"> | |
136 | - <ul id="nav_product"> | |
137 | - <li><a href="#">Характеристики</a> | |
138 | - <div class="info"> | |
139 | - <p>Бренд: <?= $product->brend->name ?></p> | |
140 | - <?php foreach ($product->params as $key => $item): ?> | |
141 | - <p><?= $item->name ?> <?= $item->size ?></p> | |
142 | - <?php endforeach; ?> | |
143 | - </div> | |
144 | - </li> | |
145 | - <li><a href="#">Описание</a> | |
146 | - <div class="info"> | |
147 | - <?= $product->body_ru ?> | |
148 | - </div> | |
149 | - </li> | |
150 | - | |
151 | - </ul> | |
152 | - </div> | |
153 | - | |
154 | - <div class="content"> | |
155 | - | |
156 | - | |
157 | - <div class="pic"> | |
158 | - <center> | |
159 | - <a href="#" rel="shadowbox[gal]" id="picoriginal"><img id="pic" | |
160 | - src="<?= Yii::$app->request->baseUrl . '/upload/products/big/' . $product->imageAvator ?>" | |
161 | - border='0'/></a> | |
162 | - </center> | |
163 | - </div> | |
164 | - <ul class="product_colors"> | |
165 | - <?php foreach ($product->fotos as $key => $item): ?> | |
166 | - <li><a href="<?= Yii::$app->request->baseUrl . '/upload/fotos/big/' . $item->imageAvator ?>" | |
167 | - rel="shadowbox[gal]"><img | |
168 | - src="<?= Yii::$app->request->baseUrl . '/upload/fotos/ico/' . $item->imageAvator ?>" | |
169 | - border="0" width="100" height="100" alt="<?= $item->name ?>"/></a></li> | |
170 | - <?php endforeach; ?> | |
171 | - </ul> | |
172 | - | |
173 | - | |
174 | - </div> | |
175 | - <div class="both"></div> | |
176 | -</div> | |
177 | 0 | \ No newline at end of file |