Blame view

frontend/views/catalog/product.php 12.2 KB
5aa7418e   Karnovsky A   Base-product#3 fu...
1
  <?php
1f90c5f4   Karnovsky A   ArtboxImage resizer
2
3
4
  
  use common\components\artboximage\ArtboxImageHelper;
  
49b00707   Karnovsky A   ArtboxImage lightbox
5
6
7
  $this->registerCssFile(Yii::getAlias('@web/css/lightbox.css'));
  $this->registerJsFile(Yii::getAlias('@web/js/lightbox.js'));
  
5aa7418e   Karnovsky A   Base-product#3 fu...
8
9
  /** @var $this \yii\web\View */
  /** @var $dataProvider \yii\data\ActiveDataProvider */
5aa7418e   Karnovsky A   Base-product#3 fu...
10
11
  $this->title = $product->name;
  foreach($product->category->getParents()->all() as $parent) {
6fa713ca   Karnovsky A   Catalog v 1.2
12
      $this->params['breadcrumbs'][] = ['label' => $parent->categoryName->value, 'url' => ['catalog/category', 'category' => $parent]];
5aa7418e   Karnovsky A   Base-product#3 fu...
13
  }
6fa713ca   Karnovsky A   Catalog v 1.2
14
  $this->params['breadcrumbs'][] = ['label' => $product->category->categoryName->value, 'url' => ['catalog/category', 'category' => $product->category]];
5aa7418e   Karnovsky A   Base-product#3 fu...
15
16
17
18
  $this->params['breadcrumbs'][] = $product->name .' #'. $product->variant->sku;
  ?>
  <h1 class="open_card_item_title"><?= $product->name .' '. $product->variant->name?></h1>
  
290fae5b   Administrator   25.03.16 finish 1
19
  <div class="item_3_blocks_wrap" id="one_item_block" data-id="<?= $product->variant->product_variant_id?>"> <!-- flex container -->
5aa7418e   Karnovsky A   Base-product#3 fu...
20
21
22
23
24
      <div class="item_img_block"> <!-- блок с фотографиями -->
          <div class="main_img">
              <?php if (empty($product->image)) :?>
              <img src="/images/no_photo_big.png" alt="<?= $product->name?>">
              <?php else :?>
49b00707   Karnovsky A   ArtboxImage lightbox
25
26
27
                  <a href="<?= ArtboxImageHelper::getImageSrc($product->image->imageUrl, 'large')?>" data-lightbox="product-<?= $product->product_id?>" data-title="<?= $product->name?>">
                  <?= ArtboxImageHelper::getImage($product->image->imageUrl, 'product')?>
                  </a>
5aa7418e   Karnovsky A   Base-product#3 fu...
28
              <?php endif?>
290fae5b   Administrator   25.03.16 finish 1
29
  
5aa7418e   Karnovsky A   Base-product#3 fu...
30
31
32
              <!--<span class="new">НОВИНКА</span>
              <span class="top">ТОП</span>-->
          </div>
290fae5b   Administrator   25.03.16 finish 1
33
34
35
36
37
38
39
40
          <div class="product_service">
              <ul>
                  <li class="item1"><a id="add_to_bookmarks" href="#">Добавить в закладки</a>
                  </li>
                  <li class="item3"><a id="add_to_compare" href="#">Добавить в
                          сравнение</a></li>
              </ul>
          </div>
5aa7418e   Karnovsky A   Base-product#3 fu...
41
42
43
44
          <?php if (!empty($product->images)) :?>
          <div class="main_img_slide">
              <?php foreach($product->images as $image) :?>
              <div class="small_img_block active">
1f90c5f4   Karnovsky A   ArtboxImage resizer
45
                  <?= ArtboxImageHelper::getImage($image->imageUrl, 'product_trumb')?>
5aa7418e   Karnovsky A   Base-product#3 fu...
46
47
48
49
50
51
52
53
54
55
56
57
58
59
              </div>
              <?php endforeach?>
  
              <img class="slider_arrow_right" src="/images/slider_right.png" alt="">
              <img class="slider_arrow_left" src="/images/slider_left.png" alt="">
          </div>
          <?php endif?>
  
      </div> <!-- конец блока с фотографиями -->
  
  
      <div class="busket_block"> <!-- блок с счетчиком и кнопкой добавить в корзину -->
          <div class="top_code">
              <span class="code">Код: <?= $product->variant->sku?></span>
ad9b9ca9   Karnovsky A   Karnovsky-2904201...
60
              <span class="have"><img src="/images/ok_icon_green.png" alt=""><?= $product->stock !== 0 && $product->variant->price > 0 ? ' есть в наличии' : ' нет в наличии'?></span>
5aa7418e   Karnovsky A   Base-product#3 fu...
61
62
63
64
          </div>
  
          <div class="grey_bg">
              <div class="counter">
ad9b9ca9   Karnovsky A   Karnovsky-2904201...
65
66
67
68
                  <?php if ($product->variant->price > 0) :?>
                  <div class="price">
                      <?= $product->variant->price?>
                  </div>
5aa7418e   Karnovsky A   Base-product#3 fu...
69
                  <div class="sign">грн.</div>
ad9b9ca9   Karnovsky A   Karnovsky-2904201...
70
71
72
                  <?php else :?>
                      <div class="price"></div>
                  <?php endif?>
1f343d5d   Administrator   25.03.16 finish 1
73
  
5aa7418e   Karnovsky A   Base-product#3 fu...
74
                  <div class="count_block">
1f343d5d   Administrator   25.03.16 finish 1
75
                      <input type="text" name="" class="form-control buy_one_item" value="1">
5aa7418e   Karnovsky A   Base-product#3 fu...
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
                      <div class="count_buttons">
                          <div class="button_plus">+</div>
                          <div class="button_minus">-</div>
                      </div>
                  </div>
              </div>
  
              <div class="in_cart_btn">
                  <a href="#">
                      <button class="cart_btn" data-id="<?= $product->variant->product_variant_id?>"> в корзину <img src="/images/ico_basket_white.png" alt=""></button>
                  </a>
              </div>
  
              <!--<div class="to_compare_link">
                  <img src="/images/ico_scales.png" alt="">
                  <a href="#" class="add_to_compare">добавить к сравнению</a>
              </div>-->
          </div>
          <div class="quick_order">
              <form action="">
                  <span class="text">БЫСТРЫЙ ЗАКАЗ</span>
                  <input type="text" class="quick_order_phone" name="quick_order_phone" placeholder="(0XX) XXX-XX-XX">
                  <button type="submit">заказать</button>
              </form>
          </div>
  
          <div class="delivery">
              <p>
                  Доставка товара на следующий день после выставления счета. Мы доставим “День в <br> день” — уточните это у менеджера.
              </p>
              <a href="#">Подробно о доставке</a>
          </div>
  
      </div><!-- конец блока с счетчиком и кнопкой добавить в корзину -->
  
      <div class="character_block"> <!-- блок с характеристиками -->
          <?php if (!empty($properties)) :?>
          <h3>Характеристики</h3>
          <ul>
              <?php foreach($properties as $group) :?>
              <li>
                  <div class="each">
                      <div class="title"><?= $group->name?></div>
                      <div class="tech">
                      <?php foreach($group->_options as $option) :?>&nbsp;<?= $option->ValueRenderHTML?><?php endforeach?>
                      </div>
                  </div>
              </li>
              <?php endforeach?>
          </ul>
          <?php endif?>
  
          <!--<div class="tech_links">
              <a href="#">Описание</a>
              <a href="#">Видео</a>
              <a href="#">Отзывы(12)</a>
          </div>-->
  
      </div><!-- закрытие блока с характеристиками -->
a3144a8f   Karnovsky A   Some-fixes
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
      <hr>
  
      <h1 class="with_this">С этим товаром покупают</h1>
  
      <div class="flex_container"><!-- блок - с этим также покупают -->
  
          <div class="my_custom_card">
              <div class="new">АКЦИЯ</div>
              <div class="top">Toп</div>
              <a href="#" class="item_link"><div class="pic"><img src="/images/no_photo.png"></div>
                  <div class="title_item">Штукатурка гипсовая Кнауф Ротбанд 30 кг белая</div></a>
              <div class="brand">Бренд: <span>Knauf</span></div>
              <div class="type">Штукатурки</div>
              <div class="price">102.05 <span>грн.</span></div>
              <button class="basket_add_but">в корзину</button>
              <a href="#" class="compare_add_but"><span>добавить к сравнению</span></a>
d094e3f1   Karnovsky A   Some-fixes
151
              <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt="">
a3144a8f   Karnovsky A   Some-fixes
152
          </div>
5aa7418e   Karnovsky A   Base-product#3 fu...
153
  
a3144a8f   Karnovsky A   Some-fixes
154
155
156
157
158
159
160
161
162
163
          <div class="my_custom_card">
              <div class="new">АКЦИЯ</div>
              <div class="top">Toп</div>
              <a href="#" class="item_link"><div class="pic"><img src="/images/no_photo.png"></div>
                  <div class="title_item">Штукатурка гипсовая Кнауф Ротбанд 30 кг белая</div></a>
              <div class="brand">Бренд: <span>Knauf</span></div>
              <div class="type">Штукатурки</div>
              <div class="price">102.05 <span>грн.</span></div>
              <button class="basket_add_but">в корзину</button>
              <a href="#" class="compare_add_but"><span>добавить к сравнению</span></a>
d094e3f1   Karnovsky A   Some-fixes
164
              <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt="">
a3144a8f   Karnovsky A   Some-fixes
165
166
167
168
169
170
171
172
173
174
175
176
          </div>
  
          <div class="my_custom_card">
              <div class="new">АКЦИЯ</div>
              <div class="top">Toп</div>
              <a href="#" class="item_link"><div class="pic"><img src="/images/no_photo.png"></div>
                  <div class="title_item">Штукатурка гипсовая Кнауф Ротбанд 30 кг белая</div></a>
              <div class="brand">Бренд: <span>Knauf</span></div>
              <div class="type">Штукатурки</div>
              <div class="price">102.05 <span>грн.</span></div>
              <button class="basket_add_but">в корзину</button>
              <a href="#" class="compare_add_but"><span>добавить к сравнению</span></a>
d094e3f1   Karnovsky A   Some-fixes
177
              <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt="">
a3144a8f   Karnovsky A   Some-fixes
178
179
180
181
182
183
184
185
186
187
188
189
          </div>
  
          <div class="my_custom_card">
              <div class="new">АКЦИЯ</div>
              <div class="top">Toп</div>
              <a href="#" class="item_link"><div class="pic"><img src="/images/no_photo.png"></div>
                  <div class="title_item">Штукатурка гипсовая Кнауф Ротбанд 30 кг белая</div></a>
              <div class="brand">Бренд: <span>Knauf</span></div>
              <div class="type">Штукатурки</div>
              <div class="price">102.05 <span>грн.</span></div>
              <button class="basket_add_but">в корзину</button>
              <a href="#" class="compare_add_but"><span>добавить к сравнению</span></a>
d094e3f1   Karnovsky A   Some-fixes
190
              <img class="item_bottom_img" src="/images/nc_item_bottom.png" alt="">
a3144a8f   Karnovsky A   Some-fixes
191
192
193
          </div>
  
      </div> <!-- конец блока - с этим также покупают -->
5aa7418e   Karnovsky A   Base-product#3 fu...
194
195
196
      <div class="tabs_block"> <!-- Табы с описанием видео и отзывами -->
          <div class="ionTabs" id="tabs_1" data-name="Tabs_Group_name">
              <ul class="ionTabs__head">
c91d116e   Karnovsky A   Some-fixes
197
                  <?php if (!empty($properties)) :?>
5aa7418e   Karnovsky A   Base-product#3 fu...
198
199
                  <li class="ionTabs__tab" data-target="Tab_1_name">Характеристики</li>
                  <?php endif?>
5232ce80   Karnovsky A   fish-tests and fi...
200
                  <?php if (TRUE || !empty($product->description)) :?>
5aa7418e   Karnovsky A   Base-product#3 fu...
201
202
                  <li class="ionTabs__tab" data-target="Tab_2_name">Описание</li>
                  <?php endif?>
5232ce80   Karnovsky A   fish-tests and fi...
203
                  <?php if (TRUE || !empty($product->video)) :?>
5aa7418e   Karnovsky A   Base-product#3 fu...
204
205
206
207
208
209
                  <li class="ionTabs__tab" data-target="Tab_3_name">Видео</li>
                  <?php endif?>
  <!--                <li class="ionTabs__tab" data-target="Tab_4_name">Отзывы(12)</li>-->
              </ul>
              <div class="ionTabs__body">
                  <?php if (!empty($properties)) :?>
a3144a8f   Karnovsky A   Some-fixes
210
                  <div class="ionTabs__item character_block" data-name="Tab_1_name">
5aa7418e   Karnovsky A   Base-product#3 fu...
211
212
213
214
215
216
217
218
219
220
221
222
223
                          <ul>
                              <?php foreach($properties as $group) :?>
                                  <li>
                                      <div class="each">
                                          <div class="title"><?= $group->name?></div>
                                          <div class="tech">
                                              <?php foreach($group->_options as $option) :?>&nbsp;<?= $option->ValueRenderHTML?><?php endforeach?>
                                          </div>
                                      </div>
                                  </li>
                              <?php endforeach?>
                          </ul>
                  </div>
5232ce80   Karnovsky A   fish-tests and fi...
224
                  <?php else :?>
5aa7418e   Karnovsky A   Base-product#3 fu...
225
226
227
228
229
                  <?php endif?>
                  <?php if (!empty($product->description)) :?>
                  <div class="ionTabs__item" data-name="Tab_2_name">
                      <?= $product->description?>
                  </div>
5aa7418e   Karnovsky A   Base-product#3 fu...
230
231
232
233
234
                  <?php endif?>
                  <?php if (!empty($product->video)) :?>
                  <div class="ionTabs__item" data-name="Tab_3_name">
                      <?= $product->video?>
                  </div>
5aa7418e   Karnovsky A   Base-product#3 fu...
235
                  <?php endif?>
5aa7418e   Karnovsky A   Base-product#3 fu...
236
237
238
239
240
241
  
                  <div class="ionTabs__preloader"></div>
              </div>
          </div>
  
      </div> <!-- конец табов с описанием видео и отзывами -->
5232ce80   Karnovsky A   fish-tests and fi...
242
      <div style="clear: both;"></div>
5232ce80   Karnovsky A   fish-tests and fi...
243
  
ad9b9ca9   Karnovsky A   Karnovsky-2904201...
244
      <?php if(!empty($last_products)) :?>
5232ce80   Karnovsky A   fish-tests and fi...
245
      <hr>
5232ce80   Karnovsky A   fish-tests and fi...
246
247
248
      <div class="watched_block">
          <h1>Вы недавно просматривали</h1>
          <div class="flex-container">
ad9b9ca9   Karnovsky A   Karnovsky-2904201...
249
250
251
              <?php foreach($last_products as $product) :?>
              <?php require(__DIR__ .'/product_smart.php')?>
              <?php endforeach?>
5232ce80   Karnovsky A   fish-tests and fi...
252
          </div>
5232ce80   Karnovsky A   fish-tests and fi...
253
      </div>
ad9b9ca9   Karnovsky A   Karnovsky-2904201...
254
      <?php endif?>
5aa7418e   Karnovsky A   Base-product#3 fu...
255
256
  
  </div> <!-- end flex container -->