main.php
24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<?php
use yii\helpers\Html;
use yii\helpers\Url;
use frontend\assets\AppAsset;
use yii\web\View;
use frontend\components\Text;
use frontend\components\BgWidget;
// use frontend\components\CompareWidget;
use frontend\components\HreflangWidget;
use common\models\Subscribe;
use yii\widgets\ActiveForm;
use common\modules\product\models\Category;
use frontend\widgets\Seo;
use yii\widgets\Breadcrumbs;
AppAsset::register ($this);
$this->registerJs("
$('.login-span').replaceWith (
function (){
return'<a href=\"'+$(this).data('link')+'\" id=\"login\" rel=\"nofollow\">'+$(this).html()+'</a>';
}
);
$('.seo-span').replaceWith (
function (){
return'<a href=\"'+$(this).data('link')+'\" rel=\"nofollow\">'+$(this).html()+'</a>';
}
);
", View::POS_READY);
$this->registerJs ("
$('.phone .more').bind('click',function(){
$('.phone .more_block').toggle();
});
", View::POS_READY, 'phone');
//$this->registerCssFile(Yii::$app->request->BaseUrl.'/css/style.css');
$this->registerJsFile (Yii::$app->request->baseUrl . '/js/basket.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);
$this->registerJs ("
$('#basket').basket();
", View::POS_READY, 'basket');
$this->registerJsFile (Yii::$app->request->baseUrl . '/js/call.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);
$this->registerJs ("
$('#call').call({token:'" . Yii::$app->request->getCsrfToken () . "'});
", View::POS_READY, 'call');
$this->registerJsFile (Yii::$app->request->baseUrl . '/js/fix_height.js', ['position' => View::POS_END, 'depends' => ['yii\web\JqueryAsset']]);
$this->registerJs ("
var activeTab = $('.social li:first a').attr('id');
$('.'+activeTab+'_box').show();
$('.social li').click(function(){
$('.hide').hide();
var activeTab = $(this).find('a').attr('id');
//alert(activeTab);
$('.'+activeTab+'_box').show();
return false;
});
", View::POS_READY, 'social');
// AssetBundle jcarousel :D
// jquery-migrate
$this->registerJsFile('http://code.jquery.com/jquery-migrate-1.3.0.js',[
'position' => View::POS_END,
'depends' => ['yii\web\JqueryAsset']
]);
// jcarousel
$this->registerCssFile(Yii::$app->request->BaseUrl.'/js/jsor-jcarousel-7bb2e0a/skins/tango/skin.css');
$this->registerJsFile(Yii::$app->request->baseUrl.'/js/jsor-jcarousel-7bb2e0a/lib/jquery.jcarousel.min.js',[
'position' => View::POS_END,
'depends' => ['yii\web\JqueryAsset']
]);
$this->registerJs("
$('.jcarousel').jcarousel({
vertical: true,
scroll: 1
});
", View::POS_READY);
// AssetBundle jcarousel :D [close]
?>
<?php $this->beginPage () ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>"/>
<?= Html::csrfMetaTags () ?>
<title><?= Seo::widget([ 'row'=>'title'])?></title>
<?= Seo::widget([ 'row'=>'description'])?>
<?= Seo::widget([ 'row'=>'meta'])?>
<?php $this->registerLinkTag(['rel' => 'canonical', 'href' => substr(Yii::$app->urlManager->baseUrl.Yii::$app->request->url, 0, strpos(Yii::$app->urlManager->baseUrl.Yii::$app->request->url, '?')) ]); ?>
<link rel="shortcut icon" href="<?= Yii::$app->urlManager->baseUrl ?>/img/favicon.ico" type="image/x-icon"/>
<?php $this->head () ?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-75674711-1', 'auto');
ga('set', 'dimension1', 'custom value for dimension1');
ga('send', 'pageview');
</script>
<meta name="google-site-verification" content="nhtT875UmqvahUciPoVq1YGt2X-p0vqvi8t1NVM6Ul0" />
</head>
<body>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5KPBHP"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5KPBHP');</script>
<!-- End Google Tag Manager -->
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter37829115 = new Ya.Metrika({
id:37829115,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = "https://mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/37829115" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<?php $this->beginBody () ?>
<?= BgWidget::widget () ?>
<?= $this->render ('/basket/_popup') ?>
<nav class="top">
<div class="wrap">
<div class="fl">
<ul>
<li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'oplata-i-dostavka']) ?>">Оплата и
доставка</span></li>
<li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">О магазине</span></li>
<li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'help']) ?>" ><span>Возврат - Обмен</span></span></li>
</ul>
<div class="both"></div>
</div>
<div class="search">
<form method="get" action="/search">
<input type="text" name="word" value='<?= ! empty($_GET['word']) ? Html::encode ($_GET['word']) : '' ?>'/><input
type="submit" value=" "/>
</form>
</div>
<div class="fr">
<?php if (Yii::$app->user->isGuest): ?>
<span class="login-span" data-link="<?= Url::to (['login/index']) ?>" id='login'><span>Личный кабинет</span></span>
<?php else: ?>
<a href="<?= Url::to (['iam/index']) ?>"><?= Text::getShort (Yii::$app->user->identity->username, 20) ?></a>
<a href="<?= Url::to (['login/logout']) ?>" class='logout'>Выход</a>
<?php endif; ?>
</div>
<div class="both"></div>
</div>
</nav>
<div class="wrap br f">
<div class="header">
<div>
<div class="phone">
<div class="tel">
<!-- <span>(044) 303 90 15</span><br/> -->
<span>(093) 911 05 03</span><br/>
<span>(095) 004 56 55</span><br/>
<span>(068) 083 62 01</span>
</div>
<a href="mailto:order@rukzachok.com.ua">order@rukzachok.com.ua</a>
<!-- <a href="#" id='call'>Обратный звонок</a>-->
</div>
</div>
<div class="basket">
<div id="basket" class="info">Корзина <span>0</span></div>
<span class="more"></span>
<div class="both"></div>
<div class="compare"><?php /*= CompareWidget::widget () */?></div>
<div class="basket_hovered">
<div class="basket_hovered_white"></div>
<div class="basket_items">
Загрузка...
</div>
<div style="float:right;"><a href="<?= Url::to (['basket/index']) ?>" class="submit4 bottom3"
style="color: #ffffff;">Оформить заказ</a></div>
</div>
</div>
<div class="header-time">
<table>
<tr>
<td>
<table>
<tr>
<td><span>Режим работы:</span></td>
</tr>
<tr>
<td>пн-пт с 10.00 - 19.00</td>
</tr>
<tr>
<td>сб с 10.00 - 17.00</td>
</tr>
<tr>
<td>вс выходной</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="logo"><a href="<?= Url::to (['site/index']) ?>" title="Рюкзачок"><span>Рюкзачок</span></a></div>
<div class="both"></div>
</div>
<div class="menu">
<?= $this->render('main-menu')?>
<div class="both"></div>
</div>
<div class="wrapper_all">
<?php if(isset ($this->params['breadcrumbs'])):?>
<nav class="bread-crumbs">
<?php
$links = $this->params['breadcrumbs'];
foreach($links as $index => $link) {
if(is_array($link)) {
$links[$index]['template'] = "<li itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>{link}<meta itemprop='position' content='".($index + 2)."' /></li>";
$links[$index]['itemprop'] = 'item';
} else {
$links[$index] = [
'label' => $link,
'template' => "<li itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>{link}<meta itemprop='position' content='".($index + 2)."' /><meta itemprop='item' content='".Url::to('', true)."'></li>",
'itemprop' => 'item',
];
}
}
echo Breadcrumbs::widget ([
'homeLink' => [
'label' => '<span itemprop="name">Главная</span>',
'url' => ['/'],
'template' => "<li itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>{link}<meta itemprop='position' content='1' /></li>",
'itemprop' => 'item',
],
'links' => $links,
'encodeLabels' => false,
'options' => [
'itemscope' => true,
'itemtype' => 'http://schema.org/BreadcrumbList',
],
])
?>
<div class="both"></div>
</nav>
<?php endif; ?>
<?= $content ?>
</div>
</div>
<div class="bottom">
<div class="wrap">
<div class="rightbar2">
<ul class="social" style="margin-top: 10px !important;">
<li><a class="vk" id="vk" target="_blank">vk.com</a></li>
<li><a class="fb" id="fb">facebook.com</a></li>
<li><a class="ok" id="ok" target="_blank">odnoklassniki.ru</a></li>
<li><a class="gp" id="gp" href="https://plus.google.com/+ArtwebUaAgency" target="_blank">plus.google.com</a>
</li>
</ul>
<div class="socialbox">
<div class="vk_box hide">
<script type="text/javascript" src="//vk.com/js/api/openapi.js?116"></script>
<!-- VK Widget -->
<div id="vk_groups"></div>
<script type="text/javascript">
VK.Widgets.Group("vk_groups", {
mode: 0,
width: "320",
height: "213",
color1: 'FFFFFF',
color2: '2B587A',
color3: '5B7FA6'
}, 99037905);
</script>
</div>
<div class="fb_box hide">
<div id="fb-root"></div>
<script>(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/ru_RU/sdk.js#xfbml=1&version=v2.4";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-page" data-href="https://www.facebook.com/pages/Rukzachokcomua/1031766016856430"
data-width="320" data-height="213" data-small-header="false"
data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"
data-show-posts="true">
<div class="fb-xfbml-parse-ignore">
<blockquote cite="https://www.facebook.com/pages/Rukzachokcomua/1031766016856430"><a
href="https://www.facebook.com/pages/Rukzachokcomua/1031766016856430">Rukzachok.com.ua</a>
</blockquote>
</div>
</div>
</div>
<div class="gp_box hide">
<script src="https://apis.google.com/js/platform.js" async defer>
{
lang: 'ru'
}
</script>
<div class="g-page" data-href="https://plus.google.com/106638911242676218673"
data-rel="publisher"></div>
</div>
<div class="ok_box hide">
<div id="ok_group_widget"></div>
<script>
!function (d, id, did, st) {
var js = d.createElement("script");
js.src = "http://connect.ok.ru/connect.js";
js.onload = js.onreadystatechange = function () {
if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
if (!this.executed) {
this.executed = true;
setTimeout(function () {
OK.CONNECT.insertGroupWidget(id, did, st);
}, 0);
}
}
}
d.documentElement.appendChild(js);
}(document, "ok_group_widget", "52719911305396", "{width:320,height:213}");
</script>
</div>
<div class="tw_box hide">Пока нет!</div>
</div>
<?php
/*
echo '<p class="txts">';
$ids = ViewProduct::listView ();
if (! empty($ids))
{
$products = Products::find ()->where (['id' => ViewProduct::listView ()])->all ();
echo 'Вы просматривали';
}
else
{
$products = Products::find ()->where (['new' => '1'])->orderBy ('id DESC')->innerJoinWith (['cost'])->groupBy ('id')->limit (4)->all ();
echo 'Товары со скидкой';
}
echo '</p>';
echo '
<div class="view_carousel">
<ul class="view_products jcarousel-skin-tango2">';
foreach ($products as $item)
{
if (! empty ($item->cost))
{
echo '
<li>
<div class="bg-img-foot-wr">
<a class="bg-img-foot" 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->imageAvator.'" border="0"/></a>
</div>
<a href="'. Url::to (['products/show', 'translit_rubric' => $item->catalog->translit, 'translit' => $item->translit, 'id' => $item->id]) .'" class="name">'.$item->name.'</a>
<p class="cost">'.$item->cost->cost.' грн.</p>
<div class="both"></div>
</li>';
}
}
echo '
</ul>
</div>';
*/
?>
</div>
<div itemscope itemtype="http://schema.org/LocalBusiness">
<div class="leftbar">
<ul>
<li><a href="<?= Url::to (['articles/index']) ?>">Блог</a></li>
<li><a href="<?= Url::to (['text/index', 'translit' => 'oplata-i-dostavka']) ?>">Оплата и
доставка</a></li>
<li><span class="seo-span" data-link="<?= Url::to (['iam/index']) ?>">Личный кабинет</span></li>
<li><a href="<?= Url::to (['event/index']) ?>">Акции</a></li>
<li><span class="seo-span" data-link="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">О магазине</span></li>
</ul>
<div class="phones">
<!-- <span itemprop="telephone">(044) 303 90 15</span><br/> -->
<span itemprop="telephone">(093) 911 05 03</span><br/>
<span itemprop="telephone">(095) 004 56 55</span><br/>
<span itemprop="telephone">(068) 083 62 01</span>
</div>
<a class="footer-mail" href="mailto:order@rukzachok.com.ua" itemprop="email">order@rukzachok.com.ua</a>
</div>
<div class="content2">
<p class="txts">Подписаться на акции</p>
<?php
$subscribe = new Subscribe;
$form = ActiveForm::begin (['action' => '/subscribe']);
?>
<?php echo $form->field ($subscribe, 'email')->textInput (['placeholder' => 'E-mail', 'enableAjaxValidation' => true])->label (false); ?>
<?= $form->field ($subscribe, 'sale')->dropDownList (['10' => '10%', '20' => '20%'], ['prompt' => 'Скидка', 'enableAjaxValidation' => true])->label (false); ?>
<div class="saletxt">укажите желаемый размер скидки</div>
<?php echo Html::submitButton (' Подписаться ', ['class' => 'submit4m']); ?>
<?php ActiveForm::end (); ?>
<div class="header-time footer_time">
<table>
<tr>
<td>
<table>
<tr>
<td><span>Режим работы:</span></td>
</tr>
<tr>
<td itemprop="openingHours" datetime="Mo-Fr 10:00-19:00">пн-пт с 10.00 - 19.00</td>
</tr>
<tr>
<td itemprop="openingHours" datetime="Sa 10:00-17:00">сб с 10.00 - 17.00</td>
</tr>
<tr>
<td>вс выходной</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="both"></div>
</div>
</div>
<div class="both"></div>
</div>
</div>
<div class="fotter">
<div class="wrap">
<div class="fl">© <?= date('Y')?> Rukzachok. Все права защищены.</div>
<div class="fr"><a href="http://artweb.ua" target="_blank">Создание сайтов</a> <img
src="<?= Yii::$app->request->baseUrl ?>/img/artweb.png" width="58" height="17" alt="ArtWeb Studio"/>
</div>
<div class="both"></div>
</div>
</div>
<?php $this->endBody () ?>
<!-- SOCIAL ICON -->
<script type="text/javascript" src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js" charset="utf-8"></script>
<script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script>
<!-- SOCIAL ICON -->
</body>
</html>
<?php $this->endPage () ?>