Commit f0a8acb530ca6c4825cf2c68f83cfad634be9b8c
1 parent
be9d05ee
add sort function to goods index page
Showing
6 changed files
with
525 additions
and
134 deletions
Show diff stats
frontend/config/main.php
... | ... | @@ -60,6 +60,7 @@ return [ |
60 | 60 | 'events/view/<translit:[\w-]+>'=>'events/view', |
61 | 61 | 'standard-services/view/<translit:[\w-]+>'=>'standard-services/view', |
62 | 62 | 'f/<filter:([\w\=\;\/\-\_]+)?>'=>'stone/ajax-filter', |
63 | + 'goods/<name:.+>'=>'goods/index', // переделать | |
63 | 64 | 'search'=>'site/search', |
64 | 65 | 'contact'=>'site/contact', |
65 | 66 | 'about'=>'site/about', | ... | ... |
frontend/controllers/GoodsController.php
... | ... | @@ -8,19 +8,125 @@ |
8 | 8 | |
9 | 9 | namespace frontend\controllers; |
10 | 10 | |
11 | +use common\components\CustomVarDamp; | |
11 | 12 | use Yii; |
13 | +use yii\data\SqlDataProvider; | |
12 | 14 | use yii\web\Controller; |
13 | 15 | |
14 | 16 | class GoodsController extends Controller { |
15 | 17 | public $layout = '/internal'; |
16 | 18 | |
17 | - public function actionIndex() | |
19 | + public function actionIndex($name = '') | |
18 | 20 | { |
19 | 21 | |
20 | - return $this->render('index'); | |
22 | + $query = $this->getQuery(); | |
23 | + | |
24 | + $provider = new SqlDataProvider([ | |
25 | + 'sql' => $query, | |
26 | + 'pagination' => false, | |
27 | + // 'params' => [':status' => 1], | |
28 | + 'sort' => [ | |
29 | + 'attributes' => [ | |
30 | + 'box', | |
31 | + 'delivery', | |
32 | + 'price' | |
33 | + ], | |
34 | + ], | |
35 | + ]); | |
36 | + | |
37 | + | |
38 | + return $this->render('index',[ | |
39 | + 'dataProvider' => $provider | |
40 | + ]); | |
21 | 41 | } |
22 | 42 | |
23 | 43 | |
44 | + private function getQuery(){ | |
45 | + $query = <<< MySQL | |
46 | + select straight_join `w_details`.`ARTICLE` as `name`, | |
47 | + `w_details`.`BRAND` as `brand`, | |
48 | + `w_details`.`BOX` as `box`, | |
49 | + `w_details`.`ADD_BOX` as `add_box`, | |
50 | + `w_details`.`IMPORT_ID` as `importer_id`, | |
51 | + `w_importers`.`name` as `importer_name`, | |
52 | + `w_importers`.`delivery`, | |
53 | + if (`w_details_description`.`description` = '', | |
54 | + if (`w_details_description`.`tecdoc_description` = '', | |
55 | + `w_details_description`.`supplier_description`, | |
56 | + `w_details_description`.`tecdoc_description` | |
57 | + ), | |
58 | + `w_details_description`.`description` | |
59 | + ) as `description`, | |
60 | + | |
61 | + if (`w_details_description`.`tecdoc_article` = '', | |
62 | + if (`w_details_description`.`article` = '', | |
63 | + if (`w_details`.`FULL_ARTICLE` = '', | |
64 | + `w_details`.`ARTICLE`, | |
65 | + `w_details`.`FULL_ARTICLE` | |
66 | + ), | |
67 | + `w_details_description`.`article` | |
68 | + ), | |
69 | + `w_details_description`.`tecdoc_article` | |
70 | + ) as `article`, | |
71 | + `w_details`.`ID`, | |
72 | + if (`w_details_description`.`image` = '', | |
73 | + if (`w_details_description`.`tecdoc_image` = '', | |
74 | + '', | |
75 | + concat('ital_origin/images/tecdoc/big/',`w_details_description`.`tecdoc_image`) | |
76 | + ), | |
77 | + concat('ital_origin/images/goods/big/',`w_details_description`.`image`) | |
78 | + ) as `image`, | |
79 | + `w_details_description`.`tecdoc_id`, | |
80 | + round(if(`w_margins_groups`.`koef` is not null, | |
81 | + `w_details`.`PRICE`*`w_margins_groups`.`koef`, | |
82 | + if (`w_margins_importers`.`koef` is not null, | |
83 | + `w_details`.`PRICE`*`w_margins_importers`.`koef`, | |
84 | + `w_details`.`PRICE`*`w_margins`.`koef` | |
85 | + ) | |
86 | + )*`t`.`rate`/`w_currency`.`rate`,2) as `price`, | |
87 | + | |
88 | + round(if(`input_groups`.`koef` is not null, | |
89 | + `w_details`.`PRICE`*`input_groups`.`koef`, | |
90 | + `w_details`.`PRICE` | |
91 | + )*`t`.`rate`/`w_currency`.`rate`,2) as `input_price`, | |
92 | + | |
93 | + round(if(`input_groups`.`koef` is not null, | |
94 | + `w_details`.`PRICE`*`input_groups`.`koef`, | |
95 | + `w_details`.`PRICE` | |
96 | + )*`t`.`rate`/`default`.`rate`,2) as `input_price_default`, | |
97 | + | |
98 | + round(if(`w_margins_groups`.`koef` is not null, | |
99 | + `w_details`.`PRICE`*`w_margins_groups`.`koef`, | |
100 | + if (`w_margins_importers`.`koef` is not null, | |
101 | + `w_details`.`PRICE`*`w_margins_importers`.`koef`, | |
102 | + `w_details`.`PRICE`*`w_margins`.`koef` | |
103 | + ) | |
104 | + )*`t`.`rate`/`default`.`rate`,2) as `price_default`, | |
105 | + | |
106 | + `w_brands`.`ID` as `brand_id` | |
107 | +from `w_details` | |
108 | + inner join `w_brands` on `w_brands`.`BRAND` = `w_details`.`BRAND` | |
109 | + left join `w_details_description` on `w_details_description`.`name` = `w_details`.`ARTICLE` and | |
110 | + `w_details_description`.`brand` = `w_details`.`BRAND` | |
111 | + inner join `w_importers` on `w_importers`.`id` = `w_details`.`IMPORT_ID` and | |
112 | + `w_importers`.`active` = 1 | |
113 | + inner join `w_margins` on `w_margins`.`id` = 1 | |
114 | + left join `w_margins_importers` on `w_margins_importers`.`importer_id` = `w_details`.`IMPORT_ID` and | |
115 | + `w_margins_importers`.`margin_id` = 1 | |
116 | + left join `w_margins_groups` on `w_margins_groups`.`importer_id` = `w_details`.`IMPORT_ID` and | |
117 | + `w_margins_groups`.`margin_id` = 1 and | |
118 | + `w_margins_groups`.`group` = `w_details`.`group` | |
119 | + inner join `w_currency` on `w_currency`.`id` = 1 | |
120 | + inner join `w_currency` as `t` on `t`.`id` = `w_importers`.`currency_id` | |
121 | + inner join `w_currency` as `default` on `default`.`is_default` = 1 | |
122 | + left join `w_margins_groups` as `input_groups` on `input_groups`.`importer_id` = `w_details`.`IMPORT_ID` and | |
123 | + `input_groups`.`margin_id` = 8 and | |
124 | + `input_groups`.`group` = `w_details`.`group` | |
125 | +where `w_details`.`ARTICLE` = '0092S40090' and `w_details`.`BRAND` = 'BOSCH' and (`w_details`.`BOX` > 0 or `w_details`.`ADD_BOX`) | |
126 | +MySQL; | |
127 | + | |
128 | + return $query; | |
129 | +} | |
24 | 130 | |
25 | 131 | |
26 | 132 | } |
27 | 133 | \ No newline at end of file | ... | ... |
frontend/views/goods/index.php
... | ... | @@ -15,67 +15,65 @@ $this->params['breadcrumbs'][] = $this->title; |
15 | 15 | <a href="" class='navigation'>Акамуляторы(АКБ)</a> |
16 | 16 | <img src="/images/arrow_dots.png"> |
17 | 17 | <span>Аккумулятор<span class='detail_name'> 0 092 S30 120: BOSCH</span></span> |
18 | - <p class="vin_article">Аккумулятор 0 092 S30 120: BOSCH</p> | |
19 | - <img src="/images/lonh_line.png" class='line'> | |
20 | 18 | |
21 | - <div class="search_span zapchasti"> | |
19 | + <p class="vin_article">Аккумулятор 0 092 S30 120: BOSCH</p> | |
20 | + <div class="tovar_card"> | |
21 | + <div class="search_span zapchasti"> | |
22 | 22 | |
23 | - <img src="/images/car1.png" id="zapchasti_car"> | |
24 | - <p>Укажите свой автомобиль | |
25 | - и мы предложим вам | |
26 | - еще Аккумуляторы (АКБ)</p> | |
27 | - <div class="selectize_item2"> | |
23 | + <img src="/images/car1.png" id="zapchasti_car"> | |
24 | + <p>Укажите свой автомобиль | |
25 | + и мы предложим вам | |
26 | + еще Аккумуляторы (АКБ)</p> | |
27 | + <div class="selectize_item2"> | |
28 | 28 | |
29 | 29 | |
30 | - <select class="area"> | |
31 | - <option value="" disabled="" selected="">Марка</option> | |
32 | - <option value="2">Выбери меня!</option> | |
33 | - <option value="3">Выбери меня!</option> | |
34 | - <option value="5">Меня!</option> | |
35 | - <option value="4">Меня</option> | |
36 | - </select> | |
30 | + <select class="area"> | |
31 | + <option value="" disabled="" selected="">Марка</option> | |
32 | + <option value="2">Выбери меня!</option> | |
33 | + <option value="3">Выбери меня!</option> | |
34 | + <option value="5">Меня!</option> | |
35 | + <option value="4">Меня</option> | |
36 | + </select> | |
37 | 37 | |
38 | + </div> | |
39 | + <button class="purple">Есть еще?</button> | |
40 | + </div> | |
41 | + <div class='note'> | |
42 | + <span id="modal_close_tip"><img src="/images/close_form.png"></span> | |
43 | + <p> | |
44 | + У нас есть еще<br> | |
45 | + 45 Аккумуляторы (АКБ)<br> | |
46 | + Возможно что-то вам<br> | |
47 | + подойдет | |
48 | + </p> | |
38 | 49 | </div> |
39 | - <button class="purple">Есть еще?</button> | |
40 | - </div> | |
41 | - <div class='note'> | |
42 | - <span id="modal_close_tip"><img src="/images/close_form.png"></span> | |
43 | - <p> | |
44 | - У нас есть еще<br> | |
45 | - 45 Аккумуляторы (АКБ)<br> | |
46 | - Возможно что-то вам<br> | |
47 | - подойдет | |
48 | - </p> | |
49 | - </div> | |
50 | - | |
51 | - <table class='detail'> | |
52 | - <tr> | |
53 | - <td> | |
54 | - <img src="/images/acamulator_big.png"> | |
55 | - <img src="/images/small_plus.png"> | |
56 | - </td> | |
57 | 50 | |
51 | + <table class='detail'> | |
52 | + <tr> | |
53 | + <td> | |
54 | + <img src="/images/acamulator_big.png"> | |
55 | + <img src="/images/small_plus.png"> | |
56 | + </td> | |
58 | 57 | |
59 | - <td> | |
60 | - <p class='bold_line'>0 092 S30 120: BOSCH</p> | |
61 | - <p class="thin_line">12V 88Ah 740A</p> | |
62 | - <p class='bold_line space'>Емкость, А/Ч:<span class='thin_line'> 88</span></p> | |
63 | - <p class="bold_line">Полярность: Правая (-/+)</p> | |
64 | - </td> | |
65 | - </tr> | |
66 | - <tr class="galery"> | |
67 | - <td><img src="/images/acamulator_small_gallery.png"><img src="/images/acamulator_small_gallery.png"></td> | |
68 | - </tr> | |
69 | - </table> | |
70 | - <img src="/images/arrow_rounded.png" class='arrow_rounded'> | |
71 | 58 | |
59 | + <td> | |
60 | + <p class='bold_line'>0 092 S30 120: BOSCH</p> | |
61 | + <p class="thin_line">12V 88Ah 740A</p> | |
62 | + <p class='bold_line space'>Емкость, А/Ч:<span class='thin_line'> 88</span></p> | |
63 | + <p class="bold_line">Полярность: Правая (-/+)</p> | |
64 | + </td> | |
65 | + </tr> | |
66 | + <tr class="galery"> | |
67 | + <td><img src="/images/acamulator_small_gallery.png"><img src="/images/acamulator_small_gallery.png"></td> | |
68 | + </tr> | |
69 | + </table> | |
70 | + <img src="/images/arrow_rounded.png" class='arrow_rounded'> | |
71 | + </div> | |
72 | 72 | |
73 | 73 | |
74 | 74 | </div> |
75 | 75 | <div class="vin href"> |
76 | - <p class="button_grey" style="font-size: 14px; | |
77 | - margin-right: 12px; | |
78 | -">Скрыть карточку товара</p> | |
76 | + <p class="button_grey" id="button_grey_card">Скрыть карточку товара</p> | |
79 | 77 | </div> |
80 | 78 | <div class="vin tables"> |
81 | 79 | |
... | ... | @@ -176,7 +174,7 @@ $this->params['breadcrumbs'][] = $this->title; |
176 | 174 | |
177 | 175 | </div> |
178 | 176 | <div class="second_section"> |
179 | - <p class="bold_line">12V 88Ah 740A Bosch 0092s30120</p> | |
177 | + <p class="bold_line">Замены искомого производителя</p> | |
180 | 178 | <p class="currency1 opposite1" id="dollars">грн</p> |
181 | 179 | <p class="currency1 active_button_purple11" id="grivna">$</p> |
182 | 180 | <table class="tovar_table" cellspacing="0" cellpadding="0" border="0"> |
... | ... | @@ -274,9 +272,46 @@ $this->params['breadcrumbs'][] = $this->title; |
274 | 272 | </tbody></table> |
275 | 273 | |
276 | 274 | </td> |
277 | - <td class="right_large">3</td> | |
278 | - <td class="right_small">1 дн.</td> | |
279 | - <td class="right_medium">103.75</td> | |
275 | + <td class="right_large"> | |
276 | + <table class="inner_table" cellspacing="0" cellpadding="0" border="0" style="border-bottom: 0; | |
277 | + border-top: 0;"> | |
278 | + <tbody> | |
279 | + <tr> | |
280 | + <td>3</td> | |
281 | + </tr> | |
282 | + <tr> | |
283 | + <td>3</td> | |
284 | + </tr> | |
285 | + </tbody> | |
286 | + </table> | |
287 | + | |
288 | + </td> | |
289 | + <td class="right_small"> | |
290 | + <table class="inner_table" cellspacing="0" cellpadding="0" border="0" style="border-bottom: 0; | |
291 | + border-top: 0;"> | |
292 | + <tbody> | |
293 | + <tr> | |
294 | + <td>1 дн.</td> | |
295 | + </tr> | |
296 | + <tr> | |
297 | + <td>1 дн.</td> | |
298 | + </tr> | |
299 | + </tbody> | |
300 | + </table> | |
301 | + </td> | |
302 | + <td class="right_medium"> | |
303 | + <table class="inner_table" cellspacing="0" cellpadding="0" border="0" style="border-bottom: 0; | |
304 | + border-top: 0;"> | |
305 | + <tbody> | |
306 | + <tr> | |
307 | + <td>103.75</td> | |
308 | + </tr> | |
309 | + <tr> | |
310 | + <td>103.75</td> | |
311 | + </tr> | |
312 | + </tbody> | |
313 | + </table> | |
314 | + </td> | |
280 | 315 | </tr> |
281 | 316 | <tr> |
282 | 317 | <td class="small_width">BOSH</td> |
... | ... | @@ -401,9 +436,46 @@ $this->params['breadcrumbs'][] = $this->title; |
401 | 436 | </tbody></table> |
402 | 437 | |
403 | 438 | </td> |
404 | - <td class="right_large">3</td> | |
405 | - <td class="right_small">1 дн.</td> | |
406 | - <td class="right_medium">103.75</td> | |
439 | + <td class="right_large"> | |
440 | + <table class="inner_table" cellspacing="0" cellpadding="0" border="0" style="border-bottom: 0; | |
441 | + border-top: 0;"> | |
442 | + <tbody> | |
443 | + <tr> | |
444 | + <td>3</td> | |
445 | + </tr> | |
446 | + <tr> | |
447 | + <td>3</td> | |
448 | + </tr> | |
449 | + </tbody> | |
450 | + </table> | |
451 | + | |
452 | + </td> | |
453 | + <td class="right_small"> | |
454 | + <table class="inner_table" cellspacing="0" cellpadding="0" border="0" style="border-bottom: 0; | |
455 | + border-top: 0;"> | |
456 | + <tbody> | |
457 | + <tr> | |
458 | + <td>1 дн.</td> | |
459 | + </tr> | |
460 | + <tr> | |
461 | + <td>1 дн.</td> | |
462 | + </tr> | |
463 | + </tbody> | |
464 | + </table> | |
465 | + </td> | |
466 | + <td class="right_medium"> | |
467 | + <table class="inner_table" cellspacing="0" cellpadding="0" border="0" style="border-bottom: 0; | |
468 | + border-top: 0;"> | |
469 | + <tbody> | |
470 | + <tr> | |
471 | + <td>103.75</td> | |
472 | + </tr> | |
473 | + <tr> | |
474 | + <td>103.75</td> | |
475 | + </tr> | |
476 | + </tbody> | |
477 | + </table> | |
478 | + </td> | |
407 | 479 | </tr> |
408 | 480 | |
409 | 481 | </tbody></table> |
... | ... | @@ -412,81 +484,17 @@ $this->params['breadcrumbs'][] = $this->title; |
412 | 484 | </div> |
413 | 485 | </div> |
414 | 486 | </div> |
415 | -<div class="slider_block1"> | |
416 | - <div class="tovars"> | |
417 | - <p style="display:inline-block">Наши проекты</p> | |
418 | - <span><img src="/images/arrow_slider_back.png"></span> | |
419 | - <span class="number_of">1/</span> | |
420 | - <span class="general_number">5</span> | |
421 | - <span><img src="/images/arrow_slider_go.png"></span> | |
422 | - <div class="slider_tovars"> | |
423 | - | |
424 | - <table class="block_project"> | |
425 | - <tbody><tr><td> | |
426 | - <img src="/images/logo-lr-small.png"> | |
427 | - </td></tr> | |
428 | - <tr><td> | |
429 | - <a href="">lr.italauto.com.ua</a> | |
430 | - </td></tr> | |
431 | - <tr><td> | |
432 | - <ul> | |
433 | - <h4>Запчасти на Land Rover<br> и Range Rover</h4> | |
434 | - <li>Оригинальные запчасти</li> | |
435 | - <li>Сертифицированый продавец</li> | |
436 | - <li>Более 300 000 товаров</li> | |
437 | - </ul> | |
438 | - </td></tr> | |
439 | - </tbody></table> | |
440 | - <table class="block_project"> | |
441 | - <tbody><tr><td> | |
442 | - <img src="/images/logo-mersedes-small.png"> | |
443 | - </td></tr> | |
444 | - <tr><td> | |
445 | - <a href="">lr.italauto.com.ua</a> | |
446 | - </td></tr> | |
447 | - <tr><td> | |
448 | - <ul> | |
449 | - <h4>Запчасти на<br> Mercedes Benz</h4> | |
450 | - <li>Оригинальные запчасти</li> | |
451 | - <li>Сертифицированый продавец</li> | |
452 | - <li>Более 300 000 товаров</li> | |
453 | - </ul> | |
454 | - </td></tr> | |
455 | - </tbody></table> | |
456 | - <table class="block_project"> | |
457 | - <tbody><tr><td> | |
458 | - <img src="/images/logo-fiat-small.png"> | |
459 | - </td></tr> | |
460 | - <tr><td> | |
461 | - <a href="">lr.italauto.com.ua</a> | |
462 | - </td></tr> | |
463 | - <tr><td> | |
464 | - <ul> | |
465 | - <h4>Запчасти на FIAT</h4> | |
466 | - <li>Оригинальные запчасти</li> | |
467 | - <li>Сертифицированый продавец</li> | |
468 | - <li>Более 300 000 товаров</li> | |
469 | - </ul> | |
470 | - </td></tr> | |
471 | - </tbody></table> | |
472 | - <table class="block_project"> | |
473 | - <tbody><tr><td> | |
474 | - <img src="/images/logo-lr-small.png"> | |
475 | - </td></tr> | |
476 | - <tr><td> | |
477 | - <a href="">lr.italauto.com.ua</a> | |
478 | - </td></tr> | |
479 | - <tr><td> | |
480 | - <ul> | |
481 | - <h4>Запчасти на Land Rover<br> и Range Rover</h4> | |
482 | - <li>Оригинальные запчасти</li> | |
483 | - <li>Сертифицированый продавец</li> | |
484 | - <li>Более 300 000 товаров</li> | |
485 | - </ul> | |
486 | - </td></tr> | |
487 | - </tbody></table> | |
488 | - | |
489 | - </div> | |
490 | 487 | |
491 | - </div> | |
492 | -</div> | |
493 | 488 | \ No newline at end of file |
489 | +</div> | |
490 | +<script type="text/javascript"> | |
491 | + function changeText() { | |
492 | + e = document.getElementById('button_grey_card'); | |
493 | + e.innerHTML = e.innerHTML == "Скрыть карточку товара" ? "Открыть карточку товара" : "Скрыть карточку товара"; | |
494 | + } | |
495 | + $('#button_grey_card').click(function(){ | |
496 | + changeText(); | |
497 | + $(this).toggleClass('change_b'); | |
498 | + $('.tovar_card').toggleClass('tovar_card_visible'); | |
499 | + $('.table').toggleClass('table_height'); | |
500 | + }); | |
501 | +</script> | |
494 | 502 | \ No newline at end of file | ... | ... |
1 | +<?php | |
2 | +use yii\data\Sort; | |
3 | +use \yii\helpers\Html; | |
4 | + | |
5 | +$sort = new Sort([ | |
6 | + 'attributes' => [ | |
7 | + 'box' => ['label' => 'Наличие'], | |
8 | + 'delivery' => ['label' => 'Срок'], | |
9 | + 'price' => ['label' => 'Цена'], | |
10 | + ], | |
11 | +]); | |
12 | +$this->registerCssFile('/css/BC2_catalog_zapchasti.css'); | |
13 | +$this->params['breadcrumbs'][] = $this->title; | |
14 | +\yii\widgets\Pjax::begin(); | |
15 | +?> | |
16 | + | |
17 | +<div class='vin table '> | |
18 | + <a href="" class='navigation'>Италавто</a> | |
19 | + <img src="/images/arrow_dots.png"> | |
20 | + <a href="" class='navigation'>Расходные материалы</a> | |
21 | + <img src="/images/arrow_dots.png"> | |
22 | + <a href="" class='navigation'>Электрооборудование</a> | |
23 | + <img src="/images/arrow_dots.png"> | |
24 | + <a href="" class='navigation'>Акамуляторы(АКБ)</a> | |
25 | + <img src="/images/arrow_dots.png"> | |
26 | + <span>Аккумулятор<span class='detail_name'> 0 092 S30 120: BOSCH</span></span> | |
27 | + <p class="vin_article">Аккумулятор 0 092 S30 120: BOSCH</p> | |
28 | + <img src="/images/lonh_line.png" class='line'> | |
29 | + | |
30 | + <div class="search_span zapchasti"> | |
31 | + | |
32 | + <img src="/images/car1.png" id="zapchasti_car"> | |
33 | + <p>Укажите свой автомобиль | |
34 | + и мы предложим вам | |
35 | + еще Аккумуляторы (АКБ)</p> | |
36 | + <div class="selectize_item2"> | |
37 | + | |
38 | + | |
39 | + <select class="area"> | |
40 | + <option value="" disabled="" selected="">Марка</option> | |
41 | + <option value="2">Выбери меня!</option> | |
42 | + <option value="3">Выбери меня!</option> | |
43 | + <option value="5">Меня!</option> | |
44 | + <option value="4">Меня</option> | |
45 | + </select> | |
46 | + | |
47 | + </div> | |
48 | + <button class="purple">Есть еще?</button> | |
49 | + </div> | |
50 | + <div class='note'> | |
51 | + <span id="modal_close_tip"><img src="/images/close_form.png"></span> | |
52 | + <p> | |
53 | + У нас есть еще<br> | |
54 | + 45 Аккумуляторы (АКБ)<br> | |
55 | + Возможно что-то вам<br> | |
56 | + подойдет | |
57 | + </p> | |
58 | + </div> | |
59 | + | |
60 | + <table class='detail'> | |
61 | + <tr> | |
62 | + <td> | |
63 | + <img src="/images/acamulator_big.png"> | |
64 | + <img src="/images/small_plus.png"> | |
65 | + </td> | |
66 | + | |
67 | + | |
68 | + <td> | |
69 | + <p class='bold_line'>0 092 S30 120: BOSCH</p> | |
70 | + <p class="thin_line">12V 88Ah 740A</p> | |
71 | + <p class='bold_line space'>Емкость, А/Ч:<span class='thin_line'> 88</span></p> | |
72 | + <p class="bold_line">Полярность: Правая (-/+)</p> | |
73 | + </td> | |
74 | + </tr> | |
75 | + <tr class="galery"> | |
76 | + <td><img src="/images/acamulator_small_gallery.png"><img src="/images/acamulator_small_gallery.png"></td> | |
77 | + </tr> | |
78 | + </table> | |
79 | + <img src="/images/arrow_rounded.png" class='arrow_rounded'> | |
80 | + | |
81 | + | |
82 | + | |
83 | +</div> | |
84 | +<div class="vin href"> | |
85 | + <p class="button_grey" style="font-size: 14px; | |
86 | + margin-right: 12px; | |
87 | +">Скрыть карточку товара</p> | |
88 | +</div> | |
89 | +<div class="vin tables"> | |
90 | + | |
91 | + <div class="first_section"> | |
92 | + <p class="bold_line">12V 88Ah 740A Bosch 0092s30120</p> | |
93 | + <p class="currency opposite" id="dollars">грн</p> | |
94 | + <p class="currency active_button_purple1" id="grivna">$</p> | |
95 | + <table class="tovar_table" cellspacing="0" cellpadding="0" border="0"> | |
96 | + <tbody><tr class="name"> | |
97 | + <td class="small_width row_name">Фирма</td> | |
98 | + <td class="medium_width row_name">Номер детали</td> | |
99 | + <td class="large_width row_name">Описание</td> | |
100 | + <td class="row_select1 row_name"></td> | |
101 | + <td class="right_large row_name"><?=$sort->link('box')?><img src="/images/icon2.png" class="sort"></td> | |
102 | + <td class="right_small row_name"><?=$sort->link('delivery')?><img src="/images/icon2.png" class="sort"></td> | |
103 | + <td class="right_medium row_name"><?=$sort->link('price')?><img src="/images/icon2.png" class="sort"></td> | |
104 | + | |
105 | + </tr> | |
106 | + <?php | |
107 | + echo \yii\widgets\ListView::widget( [ | |
108 | + 'dataProvider' => $dataProvider, | |
109 | + 'itemView'=>'one_item', | |
110 | + 'summary'=>'', | |
111 | + ] ); | |
112 | + ?> | |
113 | + | |
114 | + | |
115 | + </tbody></table> | |
116 | + | |
117 | + | |
118 | + </div> | |
119 | + | |
120 | +</div> | |
121 | +<div class="slider_block1"> | |
122 | + <div class="tovars"> | |
123 | + <p style="display:inline-block">Наши проекты</p> | |
124 | + <span><img src="/images/arrow_slider_back.png"></span> | |
125 | + <span class="number_of">1/</span> | |
126 | + <span class="general_number">5</span> | |
127 | + <span><img src="/images/arrow_slider_go.png"></span> | |
128 | + <div class="slider_tovars"> | |
129 | + | |
130 | + <table class="block_project"> | |
131 | + <tbody><tr><td> | |
132 | + <img src="/images/logo-lr-small.png"> | |
133 | + </td></tr> | |
134 | + <tr><td> | |
135 | + <a href="">lr.italauto.com.ua</a> | |
136 | + </td></tr> | |
137 | + <tr><td> | |
138 | + <ul> | |
139 | + <h4>Запчасти на Land Rover<br> и Range Rover</h4> | |
140 | + <li>Оригинальные запчасти</li> | |
141 | + <li>Сертифицированый продавец</li> | |
142 | + <li>Более 300 000 товаров</li> | |
143 | + </ul> | |
144 | + </td></tr> | |
145 | + </tbody></table> | |
146 | + <table class="block_project"> | |
147 | + <tbody><tr><td> | |
148 | + <img src="/images/logo-mersedes-small.png"> | |
149 | + </td></tr> | |
150 | + <tr><td> | |
151 | + <a href="">lr.italauto.com.ua</a> | |
152 | + </td></tr> | |
153 | + <tr><td> | |
154 | + <ul> | |
155 | + <h4>Запчасти на<br> Mercedes Benz</h4> | |
156 | + <li>Оригинальные запчасти</li> | |
157 | + <li>Сертифицированый продавец</li> | |
158 | + <li>Более 300 000 товаров</li> | |
159 | + </ul> | |
160 | + </td></tr> | |
161 | + </tbody></table> | |
162 | + <table class="block_project"> | |
163 | + <tbody><tr><td> | |
164 | + <img src="/images/logo-fiat-small.png"> | |
165 | + </td></tr> | |
166 | + <tr><td> | |
167 | + <a href="">lr.italauto.com.ua</a> | |
168 | + </td></tr> | |
169 | + <tr><td> | |
170 | + <ul> | |
171 | + <h4>Запчасти на FIAT</h4> | |
172 | + <li>Оригинальные запчасти</li> | |
173 | + <li>Сертифицированый продавец</li> | |
174 | + <li>Более 300 000 товаров</li> | |
175 | + </ul> | |
176 | + </td></tr> | |
177 | + </tbody></table> | |
178 | + <table class="block_project"> | |
179 | + <tbody><tr><td> | |
180 | + <img src="/images/logo-lr-small.png"> | |
181 | + </td></tr> | |
182 | + <tr><td> | |
183 | + <a href="">lr.italauto.com.ua</a> | |
184 | + </td></tr> | |
185 | + <tr><td> | |
186 | + <ul> | |
187 | + <h4>Запчасти на Land Rover<br> и Range Rover</h4> | |
188 | + <li>Оригинальные запчасти</li> | |
189 | + <li>Сертифицированый продавец</li> | |
190 | + <li>Более 300 000 товаров</li> | |
191 | + </ul> | |
192 | + </td></tr> | |
193 | + </tbody></table> | |
194 | + | |
195 | + </div> | |
196 | + | |
197 | + </div> | |
198 | +</div> | |
199 | +<?php | |
200 | +\yii\widgets\Pjax::end(); | |
201 | + ?> | |
0 | 202 | \ No newline at end of file | ... | ... |
1 | +<?php | |
2 | +use \yii\helpers\Html; | |
3 | + | |
4 | +$this->registerCssFile('/css/BC2_catalog_zapchasti.css'); | |
5 | +?> | |
6 | + | |
7 | + | |
8 | + | |
9 | + <tr> | |
10 | + <td class="small_width">$model->brand</td> | |
11 | + <td class="medium_width">0$model->article | |
12 | + <img src="/images/favourite_notactive.png" class="favourite"> | |
13 | + <img src="/images/favourite.png" class="pose"> | |
14 | + </td> | |
15 | + <td class="large_width">$model->description | |
16 | + <a href=""><img src="/images/gear.png"></a> | |
17 | + <a href="" id="go_photo"><img src="/images/icon_cam.png"></a> | |
18 | + </td> | |
19 | + <td class="right"> | |
20 | + <table class="tovar_table right" cellspacing="0" cellpadding="0" border="0" style="border: 0;"> | |
21 | + <tbody> | |
22 | + <tr class="one" style="border-bottom: 0; | |
23 | + border-top: 0;"> | |
24 | + <td class="row_select" style="border-bottom: 0; | |
25 | + border-top: 0;"> | |
26 | + <div class="lend-tovar-cart-left"> | |
27 | + <input type="text" class="lend-tovar-cart-number" value="1"> | |
28 | + <div class="arrow-cart-lend-wr"> | |
29 | + <img class="arrow-cart-lend-1" src="/images/arrow-cart-up.png" width="9" height="6" alt=""> | |
30 | + <img class="arrow-cart-lend-2" src="/images/arrow-cart-down1.png" width="9" height="6" alt=""> | |
31 | + </div> | |
32 | + </div> | |
33 | + <button class="purple">В корзину</button> | |
34 | + </td> | |
35 | + | |
36 | + </tr> | |
37 | + </tbody></table> | |
38 | + | |
39 | + </td> | |
40 | + <td class="right_large"> | |
41 | + <table class="inner" border='0' style='border-top:0; border-left:0'> | |
42 | + <tr border='0' style='border-top:0; border-left:0'><td border='0' style='border-top:0; border-left:0'><?= $model['box'] ?></td></tr> | |
43 | + | |
44 | + </table> | |
45 | + </td> | |
46 | + <td class="right_small"><table class="inner" border='0' style='border-top:0; border-left:0'> | |
47 | + <tr border='0' style='border-top:0; border-left:0'><td border='0' style='border-top:0; border-left:0'><?= $model['delivery']?> дн.</td></tr> | |
48 | + | |
49 | + </table></td> | |
50 | + <td class="right_medium"><table class="inner" border='0' style='border-top:0; border-left:0'> | |
51 | + <tr border='0' style='border-top:0; border-left:0'><td border='0' style='border-top:0; border-left:0'><?= $model['price']?></td></tr> | |
52 | + | |
53 | + </table></td> | |
54 | + </tr> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +use yii\helpers\Html; | |
4 | +use yii\grid\GridView; | |
5 | + | |
6 | +/* @var $this yii\web\View */ | |
7 | +/* @var $searchModel common\models\BrandsReplaceSearch */ | |
8 | +/* @var $dataProvider yii\data\ActiveDataProvider */ | |
9 | + | |
10 | +$this->title = 'Test'; | |
11 | +$this->params['breadcrumbs'][] = $this->title; | |
12 | +?> | |
13 | +<div class="brands-replace-index"> | |
14 | + | |
15 | + <h1><?= Html::encode($this->title) ?></h1> | |
16 | + | |
17 | + <?= GridView::widget([ | |
18 | + 'dataProvider' => $dataProvider, | |
19 | + ]); ?> | |
20 | + | |
21 | +</div> | ... | ... |