beginCache('_item_list'.$model->id,[ 'variations' => [\Yii::$app->language], 'id' => $model->id, 'duration' => 3600 *24 ])){ $fullname = $model->fullName; if(!empty($model->enabledVariants)) { $variant = $model->enabledVariants[ 0 ]; } else { $variant = $model->variant; } $imageMap = ArrayHelper::map($model->enabledVariants, 'sku', 'images', 'lang.title'); $firstImage = [ 'sku' => $variant->sku, 'image' => '', ]; $firstIteration = true; foreach ($imageMap as $key => $item) { $imageMap[ $key ] = array_filter($item); foreach ($imageMap[ $key ] as $subKey => $subValue) { foreach ($subValue as $subSubValue) { if (!empty( $subSubValue )) { $imageMap[ $key ][ $subKey ] = $subSubValue->imageUrl; if ($firstIteration) { $firstImage = [ 'sku' => $subKey, 'image' => $subSubValue->imageUrl, ]; } $firstIteration = false; break; } } } } ?>
is_discount) { echo Html::tag( 'div', Html::tag('span', \Yii::t('app', 'акция')), [ 'class' => 'sale_bg', ] ); } if ($model->is_top) { echo Html::tag( 'div', Html::tag('span', \Yii::t('app', 'top')), [ 'class' => 'top_bg', ] ); } if ($model->is_new) { echo Html::tag( 'div', Html::tag('span', \Yii::t('app', 'new')), [ 'class' => 'new_bg', ] ); } ?>
$fullname, 'title' => $fullname, ], 90, true ), [ 'catalog/product', 'product' => $model->lang->alias, 'variant' => $firstImage[ 'sku' ], ], [ 'data-pjax' => 0, 'title' => $fullname, ] ); ?>
$model->lang->alias, 'variant' => $variant->sku, ], [ 'class' => 'style title_cat', 'data-pjax' => 0, 'title' => $model->lang->title, ] ); ?>

brand) ?$model->brand->lang->title:''; ?>

price_old )) { ?>

price_old; ?> price; ?> грн.

-price * 100 / $variant->price_old )); ?> %

price; ?>

$model->lang->alias, 'variant' => $variant->sku, ], [ 'class' => 'btn_view_cat', 'data-pjax' => 0, ] ); ?> stock) { ?>

$model->lang->alias, 'variant' => $variant->sku, '#' => 'video', ], [ 'class' => 'videos_btn' . ( empty( $model->videos ) ? ' disabled' : '' ), ] ) ?>
    "> $model->lang->title, 'title' => $model->lang->title, 'class' => 'artbox-lazy-event', 'data-original' => ArtboxImageHelper::getImageSrc(current($item), 'category_thumb', null, 90), ], 10 ), [ 'catalog/product', 'product' => $model->lang->alias, 'variant' => key($item), ], [ 'data-pjax' => 0, ] ) ); } } ?>
endCache(); }?>