<div class="row fotorama-popup__item"> <?php $hasOneImage = count($product->images) > 1 ? false : true; ?> <div class="col-xs-8 fotorama-popup__item-images"> <?php echo Html::img($sourceImageUrl, ['alt' => $product->fullname, 'data-source' => $imageUrl, 'class' => 'fotorama-popup__item-main-image']); ?> <div class="fotorama-popup__item-opt-images"> <?php $app->imageFilter->setThumbnailSettings(['mode' => 'inset', 'width' => 250, 'height' => 200]); foreach ($product->images as $image) { $img = $app->imageFilter->filterImages([basename($image->filePath)]); $app->imageFilter->setThumbnailSettings(['mode' => 'origin']); $sourceImg = $app->imageFilter->filterImages([basename($image->filePath)]); echo Html::img($img[0]['url'], ['alt' => $product->fullname, 'data-source-image' => $sourceImg[0]['url'], 'class' => 'fotorama-popup__item-opt-image']); } ?> </div> </div> <div class="col-xs-4"> <div class=""> <h4 class="fotorama-popup__item-title"> <?php echo ProductHelper::name($product->name); ?> </h4> <?php if ($product->description) { ?> <div class="fotorama-popup__item-description"> <?php