Commit ca5d1992b6065fe1c52eadd964118b874a74014a
1 parent
c5b9ba3b
Веталь
Showing
2 changed files
with
17 additions
and
5 deletions
Show diff stats
common/modules/product/widgets/views/product_smart.php
@@ -12,6 +12,19 @@ use yii\helpers\Url; | @@ -12,6 +12,19 @@ use yii\helpers\Url; | ||
12 | <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'list')?> | 12 | <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'list')?> |
13 | </a> | 13 | </a> |
14 | </div> | 14 | </div> |
15 | + <?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?> | ||
16 | + <ul class="product-special"> | ||
17 | + <?php if(!empty($product->is_top)) :?> | ||
18 | + <li class="top"><div>top</div></li> | ||
19 | + <?php endif?> | ||
20 | + <?php if(!empty($product->is_new)) :?> | ||
21 | + <li class="new"><div>new</div></li> | ||
22 | + <?php endif?> | ||
23 | + <?php if(!empty($product->akciya)) :?> | ||
24 | + <li class="promo"><div>promo</div></li> | ||
25 | + <?php endif?> | ||
26 | + </ul> | ||
27 | + <?php endif?> | ||
15 | <a href="<?= Url::to([ | 28 | <a href="<?= Url::to([ |
16 | 'catalog/product', | 29 | 'catalog/product', |
17 | 'product' => $product]) | 30 | 'product' => $product]) |
common/modules/product/widgets/views/products_block.php
1 | <?php | 1 | <?php |
2 | use yii\web\View; | 2 | use yii\web\View; |
3 | ?> | 3 | ?> |
4 | +<?php if(!empty($products)) :?> | ||
4 | <div class="_prd_spec-wr"> | 5 | <div class="_prd_spec-wr"> |
5 | - <div class="special-products products<?= | ||
6 | - | ||
7 | - (!empty($class) ? ' '. $class : '')?>"> | 6 | + <div class="special-products products<?= (!empty($class) ? ' '. $class : '')?>"> |
8 | <h3><?= $title?></h3> | 7 | <h3><?= $title?></h3> |
9 | <div class="owl-carousel"> | 8 | <div class="owl-carousel"> |
10 | <?php foreach($products as $product) :?> | 9 | <?php foreach($products as $product) :?> |
@@ -14,7 +13,7 @@ | @@ -14,7 +13,7 @@ | ||
14 | <div class="both"></div> | 13 | <div class="both"></div> |
15 | </div> | 14 | </div> |
16 | </div> | 15 | </div> |
17 | - | ||
18 | <?php $js = '$(".owl-carousel").owlCarousel()'; | 16 | <?php $js = '$(".owl-carousel").owlCarousel()'; |
19 | $this->registerJs($js, View::POS_READY); | 17 | $this->registerJs($js, View::POS_READY); |
20 | -?> | ||
21 | \ No newline at end of file | 18 | \ No newline at end of file |
19 | +?> | ||
20 | +<?php endif?> |