<? if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die();
/**
* @var CBitrixComponentTemplate $this
* @var CatalogElementComponent $component
*/
if($arResult['OFFERS']) {
$colorPropertyCode = 'MY_OFFERS';
foreach($arResult['OFFERS'] as $key => $offer) {
$colors = $arResult['SKU_PROPS'][$colorPropertyCode]['VALUES'];
$offerColorXmlId = $offer['PROPERTIES'][$colorPropertyCode]['VALUE'];
$offerColorImage = [];
foreach($colors as $color) {
if($color['XML_ID'] == $offerColorXmlId) {
if(is_array($color['PICT']) && $color['PICT']['SRC']) {
$offerColorImage = $color['PICT'];
}
break;
}
}
if($offerColorImage) {
++$arResult['OFFERS'][$key]['MORE_PHOTO_COUNT'];
array_unshift($arResult['OFFERS'][$key]['MORE_PHOTO'], $offerColorImage);
++$arResult['JS_OFFERS'][$key]['SLIDER_COUNT'];
array_unshift($arResult['JS_OFFERS'][$key]['SLIDER'], $offerColorImage);
}
}
}
$component = $this->getComponent();
$arParams = $component->applyTemplateModifications();
<? if (!empty($actualItem['MORE_PHOTO'])) {
foreach ($actualItem['MORE_PHOTO'] as $key => $photo) {
?>
<div class="product-item-detail-slider-image<?= ($key == 0 ? ' active' : '') ?>"
data-entity="image" data-id="<?= $photo['ID'] ?>">
<img src="<?= $photo['SRC'] ?>" alt="<?= $alt ?>"
title="<?= $title ?>"<?= ($key == 0 ? ' itemprop="image"' : '') ?>>
</div>
<?
}
}
в твоем варианте все файлы должны на компе хранится, а если HL то все на сервере