Blame view

frontend/views/catalog/product.php 33.3 KB
d09f430f   Administrator   big commti
1
  <?php
7f87d6f9   Yarik   Modals.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
      
      use common\components\artboximage\ArtboxImageHelper;
      use common\models\Orders;
      use frontend\assets\FotoramaAsset;
      use frontend\widgets\Seo;
      use common\modules\comment\widgets\CommentWidget;
      use yii\bootstrap\ActiveForm;
      use yii\bootstrap\Html;
      use yii\widgets\MaskedInput;
      
      //FotoramaAsset::register($this);
      $this->params[ 'seo' ][ 'key' ] = $category->name;
      $this->params[ 'seo' ][ 'fields' ][ 'name' ] = $product->fullname;
      $this->params[ 'seo' ][ 'h1' ] = !empty( Seo::widget([ 'row' => 'h1' ]) ) ? Seo::widget([ 'row' => 'h1' ]) : $product->fullname;
      $this->title = $product->fullname;
      
      $this->params[ 'breadcrumbs' ][] = [
          'label' => $category->name,
          'url'   => [
              'catalog/category',
              'category' => $category,
          ],
      ];
      $this->params[ 'breadcrumbs' ][] = $product->fullname . ' #' . $product->enabledVariants[ 0 ]->sku;
d09f430f   Administrator   big commti
26
  ?>
7f87d6f9   Yarik   Modals.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  
  <div class="wrapper white item_container">
      <div class="container">
          <div class="product_detail">
              
              <h1 itemprop="name"><?= Seo::widget([ 'row' => 'h1' ]) ?></h1>
              <div class="product_code">Код:<?= $product->variant->sku ?></div>
              <div class="clearfix"></div>
              <!-- Image part -->
              
              <div class="img_part">
                  
                  <div class="position">
                      <div class="img_part_big">
                          <?php if(!empty( $product->images )) : ?>
                              <div class="fotorama" data-allowfullscreen="true" data-nav="thumbs">
                                  
                                  <?php foreach($product->images as $image) : ?>
                                      <a href="<?= $image->imageUrl ?>">
                                          <?= ArtboxImageHelper::getImage($image->imageUrl, 'product_trumb') ?>
e337d04a   Administrator   liniya first commit
47
                                      </a>
7f87d6f9   Yarik   Modals.
48
                                  <?php endforeach ?>
e337d04a   Administrator   liniya first commit
49
                              </div>
7f87d6f9   Yarik   Modals.
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
                          <?php else : ?>
                              <div class="fotorama" data-allowfullscreen="true" data-nav="click">
                                  
                                  <a href="<?= $product->imageUrl ?>">
                                      <?= ArtboxImageHelper::getImage($product->imageUrl, 'product_trumb') ?>
                                  </a>
                              
                              </div>
                          <?php endif ?>
                      </div>
                      
                      <div class="clearfix"></div>
                      
                      
                      <ul class="detail_main_tabs">
                          <li class="properties" data-target="characteristics">
                              <a href="#characteristics">
                                  <span class="text">Характеристики и описание</span>
                              </a>
                              <span class="icon"></span>
                              <span class="arr"></span>
                          </li>
                          
                          <li class="product_collection" data-target="collection">
                              <a href="#collection">
                                  <span class="text">Коллекция</span>
                              </a>
                              <span class="icon"></span>
                              <span class="arr"></span>
                          </li>
                          
                          <li class="comments" data-target="reviews">
                              <a href="#reviews">
                                  <span class="text">Написать отзыв</span>
                              </a>
                              <span class="icon"></span>
                              <span class="arr"></span>
                          </li>
                      </ul>
                      
                      <div class="floating_helper_block_wrapper">
                          <div class="floating_helper_block" style="visibility: visible; opacity: 1;">
                              <table>
                                  <tbody>
                                  <tr>
                                      <td>
                                          <strike><span><span id='old_cost'><?= $product->variant->price_old ?></span></span> грн.</strike>
                                          <span class="cost"><span itemprop="price"><span id='cost'><?= $product->variant->price ?></span></span> <span class="valute">грн.</span></span>
                                          <meta itemprop="priceCurrency" content="UAH">
                                      </td>
                                      <td>
                                          <!-- Купить -->
                                          <a lang="5892" class="btn btnBuy buy_button btn-large1" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm">Купить</a>
                                      </td>
                                      <td>
                                          <?php
                                              /* Compare and favorites buttons to be done
                                              ?>
                                              <ul class="wishlike_block ul">
                                                  <li class="compare">
                                                      <a class="compare compare_href" name="5892" href="javascript:return false;">К сравнению</a>
                                                      <span class="icon"></span>
                                                  </li>
                                                  <div class="clearfix"></div>
                                                  <li class="like">
                                                      <a data-toggle="modal" data-target="#myWishlist" href="#">В избранное</a>
                                                      <span class="icon"></span>
                                                  </li>
                                              </ul>
                                              */
                                          ?>
                                      </td>
                                  </tr>
                                  </tbody>
                              </table>
                              
                              <span class="arr"></span>
                              <div class="clearfix"></div>
e337d04a   Administrator   liniya first commit
128
                          </div>
7f87d6f9   Yarik   Modals.
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
                      </div>
                  </div>
              </div><!-- EOF Image part -->
              
              <!-- Info table -->
              
              <div class="info" style="height: auto; opacity: 1;">
                  
                  <table class="info_table">
                      <colgroup>
                          <col style="width: 280px;">
                          <col style="width: 35px;">
                          <col>
                      </colgroup>
                      <tbody>
                      <tr>
                          <td class="left_count available">
                              под заказ
                          </td>
                          <td rowspan="2" class="spacer">&nbsp;</td>
                          <td class="right_block" rowspan="2">
                              <table>
                                  <tbody>
                                  <tr>
                                      <td class="warranty_block">
                                          <div class="">
                                              <ul class="ul">
                                                  <li class="delivery">
                                                      <div class="title">Быстрая доставка</div>
                                                      <div class="descr">
                                                          <p>В любой уголок
                                                              <span class="strong black">Украины:</span><br>
                                                              — Самовывоз Новая Почта - 55 грн.<br>
                                                              — Курьер Новая Почта - 88 грн.<br>
                                                              — Курьер «ИнТайм» - 60 грн.</p>
                                                          
                                                          <p>
                                                              <span class="strong black">Киев</span>:<br>
                                                              — Курьер - <s>50 грн.</s>
                                                              <span class="bold black up">бесплатно!</span>
                                                              <span class="star_info">*</span><br>
                                                              — Самовывоз -
                                                              <span class="up bold black">бесплатно!</span><br>
                                                              — Пункт Новой Почты - <s>55 грн.</s>
                                                              <span class="bold black up">бесплатно!</span>
                                                              <span class="star_info">*</span></p>
                                                          
                                                          <p>
                                                              <span class="star_info">* Стоимость расчитана для оформляемого заказа</span>
                                                          </p>
                                                          <span class="icon"></span>
                                                      </div>
                                                  </li>
                                                  <li class="product_back">
                                                      <div class="title">14 дней на обмен</div>
                                                      <div class="descr">без лишних вопросов. Почитайте
                                                          <span class="ajax_link" data-toggle="modal" data-target="#returnСonditions" onclick="">условия возврата</span>
                                                      </div>
                                                      <span class="icon"></span>
                                                  </li>
                                                  <li class="warranty">
                                                      <div class="title">12 месяцев гарантии</div>
                                                      <div class="descr">официальной от производителя</div>
                                                      <span class="icon"></span>
                                                  </li>
                                                  <li>
                                                      <div class="title">Условия доставки люстра
                                                          Elstead
                                                          : Киев и вся Украина
                                                      </div>
                                                      <div class="descr">
                                                          Лінія світла - электронный магазин, который обеспечит доставку товаров раздела - люстра Элстед жителям городов: Херсон, а так же др. города Украины.
                                                      </div>
                                                  </li>
                                              </ul>
                                          </div>
                                      </td>
                                  </tr>
                                  </tbody>
                              </table>
                          </td>
                      </tr>
                      
                      <tr>
                          <td class="price_block">
                              <div class="price_block_container">
                                  
                                  
                                  <div class="price">
d09f430f   Administrator   big commti
218
219
                                              <span class="main">
                                                  <span itemprop="price" class="price"><?= $product->variant->price ?></span>
e337d04a   Administrator   liniya first commit
220
                                                  <span class="currency">&nbsp;грн.</span>
d09f430f   Administrator   big commti
221
                                              </span>
7f87d6f9   Yarik   Modals.
222
223
224
225
                                  </div>
                                  
                                  <div class="follow_price">
                                      <?php /* Lower price notify
e337d04a   Administrator   liniya first commit
226
                                              <a href="#" onclick="" data-toggle="modal" data-target="#price_drop">Узнать о снижении цены</a>
7f87d6f9   Yarik   Modals.
227
228
229
230
231
232
233
234
235
236
237
238
239
240
                                               */ ?>
                                  </div>
                                  
                                  <div class="buy_button">
                                      <a href="#" class="btn btn-large buy_button" data-toggle="modal" data-id="<?php echo $product->variant->product_variant_id; ?>" data-target="#buyForm" lang="5892">Купить</a>
                                      <?php
                                          /* Payment by Visa and Webmoney
                                          ?>
                                          <div class="payment_visa">
                                              Оплатить
                                              <a href="payment.htm#privat" target="_blank">
                                                  <span class="visa" onclick="" data-toggle1="modal" data-target1="#buyForm"></span>
                                              </a>
                                              <span class="webmoney" onclick="" data-toggle="modal" data-target="#buyForm"></span>
e337d04a   Administrator   liniya first commit
241
                                          </div>
7f87d6f9   Yarik   Modals.
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
                                          */
                                      ?>
                                      <div class="clearfix"></div>
                                  </div>
                                  
                                  <div class="follow_price">
                                      <?php
                                          /* Where buy
                                          ?>
                                          <a href="#" data-toggle="modal" data-target="#where_buy">где купить?</a>
                                          */
                                      ?>
                                  </div>
                                  
                                  <div class="follow_price">
                                      <?php
                                          /* Find cheaper form
                                          ?>
                                          <a href="#" data-toggle="modal" data-target="#found_cheaper">нашли дешевле?</a>
                                          */
                                      ?>
                                  </div>
                              
                              </div>
                              <?php
                                  /*
                                  ?>
                                  <ul class="wishlike_block ul  hidden">
                                      <li class="compare">
                                          <a class="compare compare_href" name="5892" href="javascript:return false;">К сравнению</a>
                                          <span class="icon"></span>
                                      </li>
                                      <li class="like">
                                          <a data-toggle="modal" data-target="#myWishlist" class="like" href="#">В избранное</a>
                                          <span class="icon"></span>
                                      </li>
                                  </ul>
                                  */
                              ?>
                          </td>
                      </tr>
                      
                      <tr>
                          <td>
                              <?php
                                  if($product->variant->price > 0 && $product->variant->stock > 0) {
                                      ?>
e337d04a   Administrator   liniya first commit
289
290
                                      <div class="fast_order_form">
                                          <div class="error_text"></div>
7f87d6f9   Yarik   Modals.
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
                                          <?php
                                              $quickbuy = new Orders([
                                                  'scenario' => Orders::SCENARIO_QUICK,
                                              ]);
                                              $form = ActiveForm::begin([
                                                  'id' => 'quickbuy-form',
                                              ]);
                                              echo Html::hiddenInput('product_variant_id', $product->variant->product_variant_id);
                                              echo $form->field($quickbuy, 'phone')
                                                        ->widget(MaskedInput::className(), [
                                                            'mask'    => '+38(999)999-99-99',
                                                            'options' => [
                                                                'type'  => 'tel',
                                                                'class' => 'input phone',
                                                            ],
                                                        ])
                                                        ->label(false);
                                              echo Html::submitInput('Заказать в 1 клик', [ 'class' => 'btn' ]);
                                              $form::end();
                                          ?>
e337d04a   Administrator   liniya first commit
311
312
                                          <div class="clearfix"></div>
                                      </div>
7f87d6f9   Yarik   Modals.
313
314
315
316
317
318
319
320
321
322
323
                                      <?php
                                  }
                              ?>
                          </td>
                      </tr>
                      
                      <tr>
                          <td>
                              <?php
                                  if(!empty( $product->averageRating )) {
                                      ?>
e337d04a   Administrator   liniya first commit
324
                                      <div class="rating">
7f87d6f9   Yarik   Modals.
325
326
327
328
329
330
331
                                          <div class="rateit" data-rateit-value="<?php echo $product->averageRating->value; ?>" data-rateit-ispreset="true" data-rateit-readonly="true"></div>
                                          рейтинг: <span id="product_rate_avg"><?=$product->averageRating->value?></span>&nbsp;&nbsp;
                                          голосов: <span id="product_vote_count">
                                              <?php
                                                  echo count($product->comments);
                                              ?>
                                              </span>
e337d04a   Administrator   liniya first commit
332
333
                                          <span class="rating_description" id="rating_description"></span>
                                      </div>
7f87d6f9   Yarik   Modals.
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
                                      <?php
                                  }
                              ?>
                          </td>
                          <td></td>
                      </tr>
                      </tbody>
                  </table>
                  
                  <div class="clearfix"></div>
                  
                  
                  <div class="detail_tabs_content">
                      Мы рекомендуем выбрать люстра Элстед по самой лучшей цене среди интернет каталогов светильников и других осветительных систем в Киеве и Украине
                      <div class="clear properties tab_div">
                          <h2 id="characteristics">
                              Характеристики люстра Elstead FE/LEILA6
                          </h2>
                          
                          <!-- Nav tabs -->
                          <ul class="nav nav-tabs property_show_tabs" role="tablist">
                              <li role="presentation" class="active">
                                  <a href="#tab1" aria-controls="home" role="tab" data-toggle="tab">
                                      <span>Все характеристики</span>
                                  </a>
                              </li>
                              <li role="presentation">
                                  <a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab">
                                      <span style="color:#909090">Описание</span>
                                  </a>
                              </li>
                          </ul>
                          
                          <!-- Tab panes -->
                          <div class="tab-content">
                              <div role="tabpanel" class="tab-pane active" id="tab1">
                                  
                                  <table>
                                      <tbody>
                                      <tr class="full short gray">
                                          <td class="name">ID</td>
                                          <td class="value"><?= $product->variant->sku ?> </td>
                                      </tr>
                                      <tr class="full short">
                                          <td class="name">Бренд</td>
                                          <td class="value"><?= $product->brand->name ?></td>
                                      </tr>
                                      <?php foreach($product->getActiveProperties($category->category_id) as $group): ?>
                                          <tr class="full short gray">
                                              <td class="name"><?= $group->name ?></td>
                                              <td class="value"><?php foreach($group->_options as $option) : ?>&nbsp;<?= $option->ValueRenderHTML ?><?php endforeach ?></td>
                                          </tr>
                                      <?php endforeach; ?>
                                      
                                      </tbody>
                                  </table>
                              </div>
                              <div role="tabpanel" class="tab-pane" id="tab2">
                                  
                                  <div class="block-100">
                                      <?= $product->description ?>
                                  </div>
                              
                              </div>
                          </div>
                          
e337d04a   Administrator   liniya first commit
400
                          <div class="clearfix"></div>
7f87d6f9   Yarik   Modals.
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
                          <div class="collection">
                              <br/>
                              <h2 id="collection">
                                  Коллекция светильников <!--ДЕКОРА-->
                              </h2>
                              <?php /* Collection products begin (should be reworked) */ ?>
                              <div class="catalog_product_list view_table">
                                  <div class="catalog_item">
                                      <div class="wrapper">
                                          <div class="item_container">
                                              <div class="title">
                                                  <a href="http://www.linija-svitla.ua/lyustra-elstead-fe-leila3-5893.htm">люстра FE/LEILA3</a>
                                              </div>
                                              <div class="img">
                                                  <a href="http://www.linija-svitla.ua/lyustra-elstead-fe-leila3-5893.htm">
                                                      <img src="http://www.linija-svitla.ua/gallery/prod/fe_leila3/5893_5.jpg" alt="люстра FE/LEILA3" class="selected">
                                                  </a>
                                                  <div class="info_icons">
                                                      <a href="#" class="btn btnBuy buy_button" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm" lang="5893">Купить светильник</a>
                                                      <ul class="ul wishlike_block">
                                                          <li class="compare">
                                                              <a onclick="add2compare(); return false;" class="compare compare_text_link_5893" lang="5893" href="#">К сравнению</a>
                                                              <span class="icon"></span>
                                                          </li>
                                                          <li class="like">
                                                              <a class="like like_text_link_5893" lang="5893" href="#">В избранное</a><span class="icon"></span>
                                                          </li>
                                                      </ul>
                                                  </div>
                                              </div>
                                              <div class="price">
                                                  <div class="dlexfduinxipi">
                                                      Цена:
                                                      <span class="main"> 25794.00 <span class="currency">грн</span>
                                                          </span>
                                                  </div>
                                              </div>
                                              <div class="additional_info params">
                                              </div>
                                              <div class="opacity_bg"></div>
d09f430f   Administrator   big commti
441
                                          </div>
d09f430f   Administrator   big commti
442
443
                                      </div>
                                  </div>
7f87d6f9   Yarik   Modals.
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
                                  <div class="catalog_item">
                                      <div class="wrapper">
                                          <div class="item_container">
                                              <div class="title">
                                                  <a href="http://www.linija-svitla.ua/elstead-fe-leila1c-6991.htm"> FE/LEILA1C</a>
                                              </div>
                                              <div class="img">
                                                  <a href="http://www.linija-svitla.ua/elstead-fe-leila1c-6991.htm">
                                                      <img src="http://www.linija-svitla.ua/gallery/prod/fe_leila1c/6991_5.jpg" alt=" FE/LEILA1C" class="selected">
                                                  </a>
                                                  <div class="info_icons">
                                                      <a href="#" class="btn btnBuy buy_button" data-toggle="modal" data-id="<?php echo $product->variant->product_variant_id; ?>" data-target="#buyForm" lang="6991">Купить светильник</a>
                                                      <ul class="ul wishlike_block">
                                                          <li class="compare">
                                                              <a onclick="add2compare(); return false;" class="compare compare_text_link_6991" lang="6991" href="#">К сравнению</a>
                                                              <span class="icon"></span>
                                                          </li>
                                                          <li class="like">
                                                              <a class="like like_text_link_6991" lang="6991" href="#">В избранное</a><span class="icon"></span>
                                                          </li>
                                                      </ul>
d09f430f   Administrator   big commti
465
466
                                                  </div>
                                              </div>
7f87d6f9   Yarik   Modals.
467
468
469
470
                                              <div class="price">
                                                  <div class="dlexfduinxipi">
                                                      Цена:
                                                      <span class="main"> 14330.40 <span class="currency">грн</span>
d09f430f   Administrator   big commti
471
                                                          </span>
d09f430f   Administrator   big commti
472
473
                                                  </div>
                                              </div>
7f87d6f9   Yarik   Modals.
474
475
476
                                              <div class="additional_info params">
                                              </div>
                                              <div class="opacity_bg"></div>
d09f430f   Administrator   big commti
477
                                          </div>
7f87d6f9   Yarik   Modals.
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
                                      </div>
                                  </div>
                                  <div class="catalog_item">
                                      <div class="wrapper">
                                          <div class="item_container">
                                              <div class="title">
                                                  <a href="http://www.linija-svitla.ua/nastennyy-svetilnik-elstead-fe-leila2-5894.htm">настенный светильник FE/LEILA2</a>
                                              </div>
                                              <div class="img">
                                                  <a href="http://www.linija-svitla.ua/nastennyy-svetilnik-elstead-fe-leila2-5894.htm">
                                                      <img src="http://www.linija-svitla.ua/gallery/prod/fe_leila2/5894_5.jpg" alt="настенный светильник FE/LEILA2" class="selected">
                                                  </a>
                                                  <div class="info_icons">
                                                      <a href="#" class="btn btnBuy buy_button" data-id="<?php echo $product->variant->product_variant_id; ?>" data-toggle="modal" data-target="#buyForm" lang="5894">Купить светильник</a>
                                                      <ul class="ul wishlike_block">
                                                          <li class="compare">
                                                              <a onclick="add2compare(); return false;" class="compare compare_text_link_5894" lang="5894" href="#">К сравнению</a>
                                                              <span class="icon"></span>
                                                          </li>
                                                          <li class="like">
                                                              <a class="like like_text_link_5894" lang="5894" href="#">В избранное</a><span class="icon"></span>
                                                          </li>
                                                      </ul>
                                                  </div>
                                              </div>
                                              <div class="price">
                                                  <div class="dlexfduinxipi">
                                                      Цена:
                                                      <span class="main"> 8598.00 <span class="currency">грн</span>
d09f430f   Administrator   big commti
507
                                                          </span>
d09f430f   Administrator   big commti
508
509
                                                  </div>
                                              </div>
7f87d6f9   Yarik   Modals.
510
511
512
                                              <div class="additional_info params">
                                              </div>
                                              <div class="opacity_bg"></div>
d09f430f   Administrator   big commti
513
                                          </div>
e337d04a   Administrator   liniya first commit
514
                                      </div>
e337d04a   Administrator   liniya first commit
515
                                  </div>
e337d04a   Administrator   liniya first commit
516
                              </div>
7f87d6f9   Yarik   Modals.
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
                              <div class="clearfix"></div>
                              <?php /* Collection products end (should be reworked) */ ?>
                          </div>
                          <div class="clearfix"></div>
                          <br/>
                          <h2 id="reviews">
                              Отзывы люстра Elstead FE/LEILA6
                          </h2>
                          <div class="comment-wrapper comments comments_block" style="padding-bottom:25px">
                              <?php
                                  echo CommentWidget::widget([
                                      'model' => $product,
                                  ]);
                              ?>
                              <div class="both"></div>
e337d04a   Administrator   liniya first commit
532
                          </div>
e337d04a   Administrator   liniya first commit
533
                      </div>
e337d04a   Administrator   liniya first commit
534
                  </div>
e337d04a   Administrator   liniya first commit
535
              </div>
7f87d6f9   Yarik   Modals.
536
              <!-- EOF Info table -->
e337d04a   Administrator   liniya first commit
537
          </div>
7f87d6f9   Yarik   Modals.
538
539
540
541
      </div>
  </div>
  <div class="clearfix"></div>
  <br/>