Commit ed1bbc0141d83aaca5c3f1c8ec9795c35ae27d9e
1 parent
e5cce627
26.05.16 change image download (git strange error, pay attention for this)
Showing
1 changed file
with
9 additions
and
2 deletions
Show diff stats
frontend/views/catalog/product_smart.php
1 | <?php | 1 | <?php |
2 | /** @var \common\modules\product\models\Product $product */ | 2 | /** @var \common\modules\product\models\Product $product */ |
3 | - | 3 | +use common\components\artboximage\ArtboxImageHelper; |
4 | ?> | 4 | ?> |
5 | <div class="my_custom_card"> | 5 | <div class="my_custom_card"> |
6 | <!--<div class="new">АКЦИЯ</div> | 6 | <!--<div class="new">АКЦИЯ</div> |
7 | <div class="top">Toп</div>--> | 7 | <div class="top">Toп</div>--> |
8 | - <a href="<?= \yii\helpers\Url::to(['catalog/product', 'product' => $product])?>" class="item_link"><div class="pic"><img src="/images/no_photo.png"></div> | 8 | + <a href="<?= \yii\helpers\Url::to(['catalog/product', 'product' => $product])?>" class="item_link"> |
9 | + <div class="pic"> | ||
10 | + <?php if (empty($product->image)) :?> | ||
11 | + <img src="/images/no_photo.png"> | ||
12 | + <?php else :?> | ||
13 | + <?= ArtboxImageHelper::getImage($product->image->imageUrl, 'product_list')?> | ||
14 | + <?php endif?> | ||
15 | + </div> | ||
9 | <div class="title_item"><?= $product->name?></div></a> | 16 | <div class="title_item"><?= $product->name?></div></a> |
10 | <?php if ($product->brand) :?> | 17 | <?php if ($product->brand) :?> |
11 | <div class="brand">Бренд: <span><?= $product->brand->name?></span></div> | 18 | <div class="brand">Бренд: <span><?= $product->brand->name?></span></div> |