product_smart.php
2.45 KB
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
<?php
/** @var \common\modules\product\models\Product $product */
use yii\helpers\Url;
?>
<div class="item">
<div class="boxitem">
<div class="pixbox">
<a href="<?= Url::to([
'catalog/product',
'product' => $product,
'#' => 'm' .$product->variant->product_variant_id])
?>">
<?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'list')?>
</a>
</div>
<?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?>
<ul class="product-special">
<?php if(!empty($product->is_top)) :?>
<li class="top"><div>top</div></li>
<?php endif?>
<?php if(!empty($product->is_new)) :?>
<li class="new"><div>new</div></li>
<?php endif?>
<?php if(!empty($product->akciya)) :?>
<li class="promo"><div>promo</div></li>
<?php endif?>
</ul>
<?php endif?>
<a href="<?= Url::to([
'catalog/product',
'product' => $product])
?>" class="name"><?= $product->name ?>
</a>
<?php
echo '<div class="cost-block">';
echo '<p class="cost">';
// есть скидка
if ($product->variant->price_old != 0 && $product->variant->price_old != $product->variant->price)
{
echo '<strike><span id=\'old_cost\'>'.$product->variant->price_old.'</span> грн.</strike> ';
}
echo $product->variant->price.' <span>грн.</span></p>';
echo '</div>';
?>
</div>
<a href="<?= Url::to([
'catalog/product',
'product' => $product,
'#' => 'm' .$product->variant->product_variant_id])
?>" class="link_buy">Купить</a>
<div class="mycarousel">
<ul class="jcarousel jcarousel-skin-tango">
<?php foreach ($product->variants as $variant) : ?>
<li>
<a href="<?= Url::to([
'catalog/product',
'product' => $product,
'#' => 'm' . $variant->product_variant_id]) ?>">
<?= \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant')?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>