Подскажите, гуру.
В торговом каталоге добавляю картинки (не картинка анонса или детальная) в новый элемент.
Добавляются они корректно, но вот выводятся в реальном размере.
Максимально нужная мне ширина 500 пикселей
как скорректировать код вывода детального описания чтобы если размер > 500 то происходило масштабирование.
Ну или на крайний случай всегда масштабировало бы при выводе на -30%
[CODE]<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="catalog-element">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<?if(is_array($arResult["PREVIEW_PICTURE"]) || is_array($arResult["DETAIL_PICTURE"])):?>
<td width="0%" valign="top">
<?if(is_array($arResult["PREVIEW_PICTURE"]) && is_array($arResult["DETAIL_PICTURE"])):?>
<img border="0" src="<?=$arResult["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arResult["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arResult["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["PREVIEW_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>" style="display:block;cursor:pointer;cursor: hand;" OnClick="document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='block'" />
<img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["DETAIL_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>" style="display:none;cursor:pointer; cursor: hand;" OnClick="document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='block'" />
<?elseif(is_array($arResult["DETAIL_PICTURE"])):?>
<img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["DETAIL_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" />
<?elseif(is_array($arResult["PREVIEW_PICTURE"])):?>
<img border="0" src="<?=$arResult["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arResult["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arResult["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["PREVIEW_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" />
<?endif?>
<?if(count($arResult["MORE_PHOTO"])>0):?>
<br /><a href="#more_photo"><?=GetMessage("CATALOG_MORE_PHOTO")?></a>
<?endif;?>
</td>
<?endif;?>
<td width="100%" valign="top">
<?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<?=$arProperty["NAME"]?>:<b> <?
if(is_array($arProperty["DISPLAY_VALUE"])):
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
elseif($pid=="MANUAL"):
?><a href="<?=$arProperty["VALUE"]?>"><?=GetMessage("CATALOG_DOWNLOAD")?></a><?
else:
echo $arProperty["DISPLAY_VALUE"];?>
<?endif?></b><br />
<?endforeach?>
</td>
</tr>
</table>
<?foreach($arResult["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"]):?>
<?endforeach;?>
<?if(is_array($arResult["PRICE_MATRIX"])):?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="data-table">
<thead>
<tr>
<?if(count($arResult["PRICE_MATRIX"]["ROWS"]) >= 1 && ($arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_FROM"] > 0 || $arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_TO"] > 0)):?>
<td><?= GetMessage("CATALOG_QUANTITY") ?></td>
<?endif;?>
<?foreach($arResult["PRICE_MATRIX"]["COLS"] as $typeID => $arType):?>
<td><?= $arType["NAME_LANG"] ?></td>
<?endforeach?>
</tr>
</thead>
<?foreach ($arResult["PRICE_MATRIX"]["ROWS"] as $ind => $arQuantity):?>
<tr>
<?if(count($arResult["PRICE_MATRIX"]["ROWS"]) > 1 || count($arResult["PRICE_MATRIX"]["ROWS"]) == 1 && ($arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_FROM"] > 0 || $arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_TO"] > 0)):?>
<th nowrap>
<?if(IntVal($arQuantity["QUANTITY_FROM"]) > 0 && IntVal($arQuantity["QUANTITY_TO"]) > 0)
echo str_replace("#FROM#", $arQuantity["QUANTITY_FROM"], str_replace("#TO#", $arQuantity["QUANTITY_TO"], GetMessage("CATALOG_QUANTITY_FROM_TO")));
elseif(IntVal($arQuantity["QUANTITY_FROM"]) > 0)
echo str_replace("#FROM#", $arQuantity["QUANTITY_FROM"], GetMessage("CATALOG_QUANTITY_FROM"));
elseif(IntVal($arQuantity["QUANTITY_TO"]) > 0)
echo str_replace("#TO#", $arQuantity["QUANTITY_TO"], GetMessage("CATALOG_QUANTITY_TO"));
?>
</th>
<?endif;?>
<?foreach($arResult["PRICE_MATRIX"]["COLS"] as $typeID => $arType):?>
<td>
<?if($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["DISCOUNT_PRICE"] < $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"])
echo '<s>'.FormatCurrency($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"], $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"]).'</s> <span class="catalog-price">'.FormatCurrency($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["DISCOUNT_PRICE"], $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"])."</span>";
else
echo '<span class="catalog-price">'.FormatCurrency($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"], $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"])."</span>";
?>
</td>
<?endforeach?>
</tr>
<?endforeach?>
</table><br />
<?endif?>
<?if($arResult["CAN_BUY"]):?>
<?elseif((count($arResult["PRICES"]) > 0) || is_array($arResult["PRICE_MATRIX"])):?>
<?=GetMessage("CATALOG_NOT_AVAILABLE")?>
<?endif?>
<br />
<?if($arResult["DETAIL_TEXT"]):?>
<br /><?=$arResult["DETAIL_TEXT"]?><br />
<?elseif($arResult["PREVIEW_TEXT"]):?>
<br /><?=$arResult["PREVIEW_TEXT"]?><br />
<?endif;?>
<?if(count($arResult["LINKED_ELEMENTS"])>0):?>
<a name="buy"></a>
<table class="data-table">
<thead>
<?if(is_array($arParams["OFFERS_FIELDS"])):?>
<?foreach($arParams["OFFERS_FIELDS"] as $FIELD_CODE):?>
<?if($FIELD_CODE):?>
<td><?echo GetMessage("IBLOCK_FIELD_".$FIELD_CODE)?> </td>
<?endif;?>
<?endforeach;?>
<?endif?>
<?foreach($arResult["LINKED_ELEMENTS"][0]["DISPLAY_PROPERTIES"] as $arProperty):?>
<td><?echo $arProperty["NAME"];?> </td>
<?endforeach;?>
<?foreach($arResult["LINKED_ELEMENTS"][0]["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"]):?>
<td><?echo $arResult["CAT_PRICES"][$code]["TITLE"];?> </td>
<?endif;?>
<?endforeach;?>
<td><?echo GetMessage("CT_BCE_ACTION")?></td>
</thead>
<?foreach($arResult["LINKED_ELEMENTS"] as $arElement):?>
<tr>
<?if(is_array($arParams["OFFERS_FIELDS"])):?>
<?foreach($arParams["OFFERS_FIELDS"] as $FIELD_CODE):?>
<?if($FIELD_CODE):?>
<td><?echo $arElement[$FIELD_CODE]?> </td>
<?endif;?>
<?endforeach;?>
<?endif?>
<?foreach($arElement["DISPLAY_PROPERTIES"] as $arProperty):?>
<td>
<?if(is_array($arProperty["DISPLAY_VALUE"])):
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
elseif($arProperty["DISPLAY_VALUE"]===false):
echo " ";
else:
echo $arProperty["DISPLAY_VALUE"];?>
<?endif?>
</td>
<?endforeach;?>
<?foreach($arElement["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"]):?>
<td align="right">
<?if($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]):?>
<s><?=$arPrice["PRINT_VALUE"]?></s> <span class="catalog-price"><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span>
<?else:?>
<span class="catalog-price"><?=$arPrice["PRINT_VALUE"]?></span>
<?endif?>
</td>
<?endif;?>
<?endforeach;?>
<td>
<?if($arElement["CAN_BUY"]):?>
<a href="<?echo $arElement["BUY_URL"]?>"><?echo GetMessage("CATALOG_BUY")?></a>
<a href="<?echo $arElement["ADD_URL"]?>"><?echo GetMessage("CATALOG_ADD_TO_BASKET")?></a>
<?elseif((count($arElement["PRICES"]) > 0) || is_array($arElement["PRICE_MATRIX"])):?>
<?=GetMessage("CATALOG_NOT_AVAILABLE")?>
<?endif?>
</td>
</tr>
<?endforeach;?>
</table>
<?endif?>
<?
// additional photos
$LINE_ELEMENT_COUNT = 2; // number of elements in a row
if(count($arResult["MORE_PHOTO"])>0):?>
<a name="more_photo"></a>
<?foreach($arResult["MORE_PHOTO"] as $PHOTO):?>
<img border="0" src="<?=$PHOTO["SRC"]?>" width="<?=$PHOTO["WIDTH"]?>" height="<?=$PHOTO["HEIGHT"]?>" alt="<?=$PHOTO["ALT"]?>" title="<?=$arResult["NAME"]?>" /><br />
<?endforeach?>
<?endif?>
<img src="/images/readon.gif" alt="<?= GetMessage("CATALOG_ADD_TO_BASKET") ?>" title="<?= GetMessage("CATALOG_ADD_TO_BASKET") ?>" OnClick="window.location='<?=$arResult["ADD_URL"]?>#buy'" />
<?if(is_array($arResult["SECTION"])):?>
<br /><a href="<?=$arResult["SECTION"]["SECTION_PAGE_URL"]?>"><?=GetMessage("CATALOG_BACK")?></a>
<?endif?>
</div>
[/CODE]
В торговом каталоге добавляю картинки (не картинка анонса или детальная) в новый элемент.
Добавляются они корректно, но вот выводятся в реальном размере.
Максимально нужная мне ширина 500 пикселей
как скорректировать код вывода детального описания чтобы если размер > 500 то происходило масштабирование.
Ну или на крайний случай всегда масштабировало бы при выводе на -30%
[CODE]<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="catalog-element">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<?if(is_array($arResult["PREVIEW_PICTURE"]) || is_array($arResult["DETAIL_PICTURE"])):?>
<td width="0%" valign="top">
<?if(is_array($arResult["PREVIEW_PICTURE"]) && is_array($arResult["DETAIL_PICTURE"])):?>
<img border="0" src="<?=$arResult["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arResult["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arResult["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["PREVIEW_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>" style="display:block;cursor:pointer;cursor: hand;" OnClick="document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='block'" />
<img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["DETAIL_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>" style="display:none;cursor:pointer; cursor: hand;" OnClick="document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='block'" />
<?elseif(is_array($arResult["DETAIL_PICTURE"])):?>
<img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["DETAIL_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" />
<?elseif(is_array($arResult["PREVIEW_PICTURE"])):?>
<img border="0" src="<?=$arResult["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arResult["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arResult["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["PREVIEW_PICTURE"]["DESCRIPTION"]?>" title="<?=$arResult["NAME"]?>" />
<?endif?>
<?if(count($arResult["MORE_PHOTO"])>0):?>
<br /><a href="#more_photo"><?=GetMessage("CATALOG_MORE_PHOTO")?></a>
<?endif;?>
</td>
<?endif;?>
<td width="100%" valign="top">
<?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<?=$arProperty["NAME"]?>:<b> <?
if(is_array($arProperty["DISPLAY_VALUE"])):
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
elseif($pid=="MANUAL"):
?><a href="<?=$arProperty["VALUE"]?>"><?=GetMessage("CATALOG_DOWNLOAD")?></a><?
else:
echo $arProperty["DISPLAY_VALUE"];?>
<?endif?></b><br />
<?endforeach?>
</td>
</tr>
</table>
<?foreach($arResult["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"]):?>
<?=$arResult["CAT_PRICES"][$code]["TITLE"];?>:
<?if($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]):?>
<s><?=$arPrice["PRINT_VALUE"]?></s> <span class="catalog-price"><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span>
<?else:?>
<span class="catalog-price"><?=$arPrice["PRINT_VALUE"]?></span>
<?endif?>
<?endforeach;?>
<?if(is_array($arResult["PRICE_MATRIX"])):?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="data-table">
<thead>
<tr>
<?if(count($arResult["PRICE_MATRIX"]["ROWS"]) >= 1 && ($arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_FROM"] > 0 || $arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_TO"] > 0)):?>
<td><?= GetMessage("CATALOG_QUANTITY") ?></td>
<?endif;?>
<?foreach($arResult["PRICE_MATRIX"]["COLS"] as $typeID => $arType):?>
<td><?= $arType["NAME_LANG"] ?></td>
<?endforeach?>
</tr>
</thead>
<?foreach ($arResult["PRICE_MATRIX"]["ROWS"] as $ind => $arQuantity):?>
<tr>
<?if(count($arResult["PRICE_MATRIX"]["ROWS"]) > 1 || count($arResult["PRICE_MATRIX"]["ROWS"]) == 1 && ($arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_FROM"] > 0 || $arResult["PRICE_MATRIX"]["ROWS"][0]["QUANTITY_TO"] > 0)):?>
<th nowrap>
<?if(IntVal($arQuantity["QUANTITY_FROM"]) > 0 && IntVal($arQuantity["QUANTITY_TO"]) > 0)
echo str_replace("#FROM#", $arQuantity["QUANTITY_FROM"], str_replace("#TO#", $arQuantity["QUANTITY_TO"], GetMessage("CATALOG_QUANTITY_FROM_TO")));
elseif(IntVal($arQuantity["QUANTITY_FROM"]) > 0)
echo str_replace("#FROM#", $arQuantity["QUANTITY_FROM"], GetMessage("CATALOG_QUANTITY_FROM"));
elseif(IntVal($arQuantity["QUANTITY_TO"]) > 0)
echo str_replace("#TO#", $arQuantity["QUANTITY_TO"], GetMessage("CATALOG_QUANTITY_TO"));
?>
</th>
<?endif;?>
<?foreach($arResult["PRICE_MATRIX"]["COLS"] as $typeID => $arType):?>
<td>
<?if($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["DISCOUNT_PRICE"] < $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"])
echo '<s>'.FormatCurrency($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"], $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"]).'</s> <span class="catalog-price">'.FormatCurrency($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["DISCOUNT_PRICE"], $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"])."</span>";
else
echo '<span class="catalog-price">'.FormatCurrency($arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["PRICE"], $arResult["PRICE_MATRIX"]["MATRIX"][$typeID][$ind]["CURRENCY"])."</span>";
?>
</td>
<?endforeach?>
</tr>
<?endforeach?>
</table><br />
<?endif?>
<?if($arResult["CAN_BUY"]):?>
<?elseif((count($arResult["PRICES"]) > 0) || is_array($arResult["PRICE_MATRIX"])):?>
<?=GetMessage("CATALOG_NOT_AVAILABLE")?>
<?endif?>
<br />
<?if($arResult["DETAIL_TEXT"]):?>
<br /><?=$arResult["DETAIL_TEXT"]?><br />
<?elseif($arResult["PREVIEW_TEXT"]):?>
<br /><?=$arResult["PREVIEW_TEXT"]?><br />
<?endif;?>
<?if(count($arResult["LINKED_ELEMENTS"])>0):?>
<a name="buy"></a>
<table class="data-table">
<thead>
<?if(is_array($arParams["OFFERS_FIELDS"])):?>
<?foreach($arParams["OFFERS_FIELDS"] as $FIELD_CODE):?>
<?if($FIELD_CODE):?>
<td><?echo GetMessage("IBLOCK_FIELD_".$FIELD_CODE)?> </td>
<?endif;?>
<?endforeach;?>
<?endif?>
<?foreach($arResult["LINKED_ELEMENTS"][0]["DISPLAY_PROPERTIES"] as $arProperty):?>
<td><?echo $arProperty["NAME"];?> </td>
<?endforeach;?>
<?foreach($arResult["LINKED_ELEMENTS"][0]["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"]):?>
<td><?echo $arResult["CAT_PRICES"][$code]["TITLE"];?> </td>
<?endif;?>
<?endforeach;?>
<td><?echo GetMessage("CT_BCE_ACTION")?></td>
</thead>
<?foreach($arResult["LINKED_ELEMENTS"] as $arElement):?>
<tr>
<?if(is_array($arParams["OFFERS_FIELDS"])):?>
<?foreach($arParams["OFFERS_FIELDS"] as $FIELD_CODE):?>
<?if($FIELD_CODE):?>
<td><?echo $arElement[$FIELD_CODE]?> </td>
<?endif;?>
<?endforeach;?>
<?endif?>
<?foreach($arElement["DISPLAY_PROPERTIES"] as $arProperty):?>
<td>
<?if(is_array($arProperty["DISPLAY_VALUE"])):
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
elseif($arProperty["DISPLAY_VALUE"]===false):
echo " ";
else:
echo $arProperty["DISPLAY_VALUE"];?>
<?endif?>
</td>
<?endforeach;?>
<?foreach($arElement["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"]):?>
<td align="right">
<?if($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]):?>
<s><?=$arPrice["PRINT_VALUE"]?></s> <span class="catalog-price"><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span>
<?else:?>
<span class="catalog-price"><?=$arPrice["PRINT_VALUE"]?></span>
<?endif?>
</td>
<?endif;?>
<?endforeach;?>
<td>
<?if($arElement["CAN_BUY"]):?>
<a href="<?echo $arElement["BUY_URL"]?>"><?echo GetMessage("CATALOG_BUY")?></a>
<a href="<?echo $arElement["ADD_URL"]?>"><?echo GetMessage("CATALOG_ADD_TO_BASKET")?></a>
<?elseif((count($arElement["PRICES"]) > 0) || is_array($arElement["PRICE_MATRIX"])):?>
<?=GetMessage("CATALOG_NOT_AVAILABLE")?>
<?endif?>
</td>
</tr>
<?endforeach;?>
</table>
<?endif?>
<?
// additional photos
$LINE_ELEMENT_COUNT = 2; // number of elements in a row
if(count($arResult["MORE_PHOTO"])>0):?>
<a name="more_photo"></a>
<?foreach($arResult["MORE_PHOTO"] as $PHOTO):?>
<img border="0" src="<?=$PHOTO["SRC"]?>" width="<?=$PHOTO["WIDTH"]?>" height="<?=$PHOTO["HEIGHT"]?>" alt="<?=$PHOTO["ALT"]?>" title="<?=$arResult["NAME"]?>" /><br />
<?endforeach?>
<?endif?>
<img src="/images/readon.gif" alt="<?= GetMessage("CATALOG_ADD_TO_BASKET") ?>" title="<?= GetMessage("CATALOG_ADD_TO_BASKET") ?>" OnClick="window.location='<?=$arResult["ADD_URL"]?>#buy'" />
<?if(is_array($arResult["SECTION"])):?>
<br /><a href="<?=$arResult["SECTION"]["SECTION_PAGE_URL"]?>"><?=GetMessage("CATALOG_BACK")?></a>
<?endif?>
</div>
[/CODE]