bf807468
Alex Savenko
first commit
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
<?php
/**
* Created by PhpStorm.
* User: timur
* Date: 29.05.18
* Time: 3:32
*/
/**
* @var \app\models\Products $item
*/
use yii\helpers\Url;
?>
<li class="product_item">
<div class="status_items-wr">
<!--порядок вывода если несколько статусов оставить как тут-->
<? if ($item->new == 1): ?>
<div><p class="staus_new">Новинка<span></span></p></div>
<? endif; ?>
<? if ($item->akciya == 1): ?>
<div><p class="staus_sale">Акция<span></span></p></div>
<? endif; ?>
<? if ($item->top == 1): ?>
<div><p class="staus_hit">Топ<span></span></p></div>
<? endif; ?>
<!-- ------------------------------- -->
</div>
<!-- <div>-->
<!-- <div class="p_new"></div>-->
<!-- <div class="p_top"></div>-->
<!-- <div class="p_action"></div>-->
<!-- </div>-->
<a 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->image ?>" width="180" height="240" border="0"/></a>
<?php
if ($item->out_of_stock == 0) {
echo "<div class=\"t_stock\">в наличии</div>";
} else if ($item->out_of_stock == 1) {
echo "<div class=\"t_stock t_no_stock\">нет в наличии</div>";
}
?>
<p class="rubric"><?= $item->catalog->name ?></p>
<a href="<?= Url::to(
[
'products/show',
'translit_rubric' => $item->catalog->translit,
'translit' => $item->translit,
'id' => $item->id,
]
) ?>" class="name"><?= $item->name ?></a>
<div class="cost">цена <?= $item->cost->cost ?> грн</div>
<a
href="<?= Url::to(
[
'products/show',
'translit_rubric' => $item->catalog->translit,
'translit' => $item->translit,
'id' => $item->id,
]
) ?>"
class="buy t_buy_btn"
>
Купить
</a>
</li>
|