From f0b521d0949612d0c060cd0fbfa5312facad1f5e Mon Sep 17 00:00:00 2001 From: Веталь Date: Mon, 24 Oct 2016 11:55:53 +0300 Subject: [PATCH] - --- frontend/views/catalog/_product_item.php | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/frontend/views/catalog/_product_item.php b/frontend/views/catalog/_product_item.php index 9839470..e638121 100755 --- a/frontend/views/catalog/_product_item.php +++ b/frontend/views/catalog/_product_item.php @@ -13,7 +13,20 @@ use yii\helpers\Url; name, Url::to(['catalog/product', 'product' => $model->alias]), ['class'=>'btn-product-details'] )?>
- events as $event){ + if($event->banner){ + echo \common\components\artboximage\ArtboxImageHelper::getImage($event->getImageUrl('banner'), 'banner_list',[ + 'class' => 'banner-in-list' + ]); + } + } + + ?> + + href=" $model->alias ]) ?>"> @@ -27,7 +40,7 @@ use yii\helpers\Url; } ?> - enabledVariants[ 0 ]->imageUrl, 'list', [ + variant->imageUrl, 'list', [ 'alt' => $model->category->name . ' ' . $model->name, 'title' => $model->category->name . ' ' . $model->name, 'class' => 'selected' @@ -108,11 +121,11 @@ use yii\helpers\Url; // есть скидка echo '

'; - if($model->enabledVariants[ 0 ]->price_old != 0 && $model->enabledVariants[ 0 ]->price_old != $model->enabledVariants[ 0 ]->price) { - echo '' . $model->enabledVariants[0]->price_old . ' грн. '; - echo $model->enabledVariants[0]->price . ' грн.

'; + if($model->variant->price_old != 0 && $model->variant->price_old != $model->variant->price) { + echo '' . $model->variant->price_old . ' грн. '; + echo $model->variant->price . ' грн.

'; } else { - echo ''.$model->enabledVariants[0]->price . ' грн.

'; + echo ''.$model->variant->price . ' грн.

'; } echo ''; echo '
'; -- libgit2 0.21.4