3f2bc3d0
Administrator
first commit
|
1
|
<?php
|
90a6ed1a
Administrator
basket
|
2
|
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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;
AppAsset::register ($this);
$this->registerJs ("
|
3f2bc3d0
Administrator
first commit
|
17
18
19
20
21
|
$('.phone .more').bind('click',function(){
$('.phone .more_block').toggle();
});
", View::POS_READY, 'phone');
//$this->registerCssFile(Yii::$app->request->BaseUrl.'/css/style.css');
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
22
23
|
$this->registerJsFile (Yii::$app->request->baseUrl . '/js/basket.js', ['position' => View::POS_HEAD, 'depends' => ['yii\web\JqueryAsset']]);
$this->registerJs ("
|
3f2bc3d0
Administrator
first commit
|
24
25
|
$('#basket').basket();
", View::POS_READY, 'basket');
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
26
27
|
$this->registerJsFile (Yii::$app->request->baseUrl . '/js/call.js', ['position' => View::POS_HEAD, 'depends' => ['yii\web\JqueryAsset']]);
$this->registerJs ("
|
3f2bc3d0
Administrator
first commit
|
28
29
|
$('#call').call({token:'" . Yii::$app->request->getCsrfToken () . "'});
", View::POS_READY, 'call');
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
30
|
$this->registerJs ("
|
3f2bc3d0
Administrator
first commit
|
31
32
33
34
35
36
37
38
39
40
41
42
43
|
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
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
44
45
46
47
48
|
// jquery-migrate
$this->registerJsFile('http://code.jquery.com/jquery-migrate-1.3.0.js',[
'position' => View::POS_HEAD,
'depends' => ['yii\web\JqueryAsset']
]);
|
3f2bc3d0
Administrator
first commit
|
49
|
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
50
51
52
53
54
55
|
// 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_HEAD,
'depends' => ['yii\web\JqueryAsset']
]);
|
3f2bc3d0
Administrator
first commit
|
56
|
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
57
|
$this->registerJs("
|
3f2bc3d0
Administrator
first commit
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
$('.jcarousel').jcarousel({
vertical: true,
scroll: 2
});
", 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><?= Html::encode ($this->title) ?></title>
<link rel="shortcut icon" href="<?= Yii::$app->request->baseUrl ?>/img/favicon.ico" type="image/x-icon"/>
<?= HreflangWidget::widget ([]) ?>
<?php $this->head () ?>
</head>
<body>
|
3f2bc3d0
Administrator
first commit
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
<?php $this->beginBody () ?>
<?= BgWidget::widget () ?>
<?= $this->render ('/basket/_popup') ?>
<nav class="top">
<div class="wrap">
<div class="fl">
<ul>
<li><a href="<?= Url::to (['text/index', 'translit' => 'oplata_i_dostavka']) ?>">Оплата и
доставка</a></li>
<li><a href="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">Контакты</a></li>
<li><a href="<?= Url::to (['text/index', 'translit' => 'help']) ?>"
id='help'><span>Помощь</span></a></li>
</ul>
<div class="both"></div>
</div>
<div class="search">
|
c34b3aa0
Karnovsky A
-
|
100
101
|
<form method="get" action="/catalog">
<input type="text" name="word" value='<?= ! empty($_GET['word']) ? Html::encode ($_GET['word']) : '' ?>'/><input
|
3f2bc3d0
Administrator
first commit
|
102
103
104
105
|
type="submit" value=" "/>
</form>
</div>
<div class="fr">
|
90a6ed1a
Administrator
basket
|
106
|
<?php if (Yii::$app->user->isGuest): ?>
|
3f2bc3d0
Administrator
first commit
|
107
|
<a href="<?= Url::to (['login/index']) ?>" id='login'><span>Личный кабинет</span></a>
|
90a6ed1a
Administrator
basket
|
108
|
<?php else: ?>
|
3f2bc3d0
Administrator
first commit
|
109
110
|
<a href="<?= Url::to (['iam/index']) ?>"><?= Text::getShort (Yii::$app->user->identity->username, 20) ?></a>
<a href="<?= Url::to (['login/logout']) ?>" class='logout'>Выход</a>
|
90a6ed1a
Administrator
basket
|
111
|
<?php endif; ?>
|
3f2bc3d0
Administrator
first commit
|
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
</div>
<div class="both"></div>
</div>
</nav>
<div class="wrap br f">
<div class="header">
<div class="phone">
<div class="tel">
(044) 303 90 15 <!--span class="more"></span-->
<div class="more_block">
(044) 303-90-10<br/>
(044) 428-65-38<br/>
(050) 382-03-00
</div>
</div>
<a href="#" id='call'>Обратный звонок</a>
</div>
<div class="basket">
<div id="basket" class="info">Корзина <span>0</span></div>
<span class="more"></span>
<div class="both"></div>
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
136
|
<div class="compare"><?php /*= CompareWidget::widget () */?></div>
|
3f2bc3d0
Administrator
first commit
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
<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="logo"><a href="<?= Url::to (['site/index']) ?>" title="Рюкзачок"><span>Рюкзачок</span></a></div>
<div class="both"></div>
</div>
<div class="menu">
|
84b2aead
Administrator
add active menu
|
157
|
<?= $this->render('main-menu', Category::find ()->all())?>
|
3f2bc3d0
Administrator
first commit
|
158
159
|
<div class="both"></div>
</div>
|
3f2bc3d0
Administrator
first commit
|
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
|
<?= $content ?>
</div>
<div class="bottom">
<div class="wrap">
<div class="rightbar2">
<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
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
/*
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)
|
7ba4acc5
Administrator
after marge
|
267
|
{
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
268
269
270
271
272
273
274
275
276
277
278
279
280
|
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>';
}
|
7ba4acc5
Administrator
after marge
|
281
|
}
|
7ba4acc5
Administrator
after marge
|
282
|
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
283
284
285
286
|
echo '
</ul>
</div>';
*/
|
3f2bc3d0
Administrator
first commit
|
287
288
289
290
291
292
293
294
295
296
|
?>
</div>
<div class="leftbar">
<ul>
<li><a href="<?= Url::to (['text/index', 'translit' => 'contacts']) ?>">Контакты</a></li>
<li><a href="<?= Url::to (['articles/index']) ?>">Блог</a></li>
<li><a href="<?= Url::to (['text/index', 'translit' => 'oplata_i_dostavka']) ?>">Оплата и
доставка</a></li>
<li><a href="<?= Url::to (['iam/index']) ?>">Личный кабинет</a></li>
|
84b2aead
Administrator
add active menu
|
297
|
<li><a href="<?= Url::to (['event/index']) ?>">Акции</a></li>
|
3f2bc3d0
Administrator
first commit
|
298
299
300
301
302
303
304
305
306
307
308
309
310
|
<li><a href="<?= Url::to (['text/index', 'translit' => 'about']) ?>">О магазине</a></li>
</ul>
<div class="phones">
(044) 303 90 15
</div>
</div>
<div class="content2">
<p class="txts">Подписаться на акции</p>
<?php
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
311
312
|
$subscribe = new Subscribe;
$form = ActiveForm::begin (['action' => '/subscribe']);
|
3f2bc3d0
Administrator
first commit
|
313
|
?>
|
90a6ed1a
Administrator
basket
|
314
315
|
<?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); ?>
|
3f2bc3d0
Administrator
first commit
|
316
317
318
319
320
321
322
323
324
325
326
327
328
329
|
<div class="saletxt">укажите желаемый размер скидки</div>
<?php echo Html::submitButton (' Подписаться ', ['class' => 'submit4m']); ?>
<?php ActiveForm::end (); ?>
<div class="both"></div>
<br><br><br>
<ul class="social">
<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="both"></div>
|
ccc7a9d3
Karnovsky A
Karnovsky 12052016
|
330
|
|
3f2bc3d0
Administrator
first commit
|
331
332
333
334
335
336
337
338
339
340
341
|
</div>
<div class="both"></div>
</div>
</div>
<div class="fotter">
<div class="wrap">
|
90a6ed1a
Administrator
basket
|
342
|
<div class="fl">© <?= date('Y')?> Rukzachok. Все права защищены.</div>
|
3f2bc3d0
Administrator
first commit
|
343
344
345
346
347
348
349
350
|
<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 () ?>
|
3f2bc3d0
Administrator
first commit
|
351
352
353
|
</body>
</html>
<?php $this->endPage () ?>
|