- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="catalog-section">
<?if($arParams["DISPLAY_TOP_PAGER"]):?>
<?=$arResult["NAV_STRING"]?><br />
<?endif;?>
<table cellpadding="0" cellspacing="0" border="0">
<?foreach($arResult["ITEMS"] as $cell=>$arElement):?>
<?
$this->AddEditAction($arElement['ID'], $arElement['EDIT_LINK'], CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "ELEMENT_EDIT"));
$this->AddDeleteAction($arElement['ID'], $arElement['DELETE_LINK'], CIBlock::GetArrayByID($arParams["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BCS_ELEMENT_DELETE_CONFIRM')));
?>
<?if($cell%$arParams["LINE_ELEMENT_COUNT"] == 0):?>
<tr>
<?endif;?>
<td valign="top" width="<?=round(100/$arParams["LINE_ELEMENT_COUNT"])?>%" id="<?=$this->GetEditAreaId($arElement['ID']);?>">
<table cellpadding="0" cellspacing="2" border="0">
<tr>
<?if(is_array($arElement["PREVIEW_PICTURE"])):?>
<td valign="top">
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><img border="0" src="<?=$arElement["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arElement["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arElement["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arElement["NAME"]?>" title="<?=$arElement["NAME"]?>" /></a><br />
</td>
<?elseif(is_array($arElement["DETAIL_PICTURE"])):?>
<td valign="top">
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><img border="0" src="<?=$arElement["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arElement["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arElement["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arElement["NAME"]?>" title="<?=$arElement["NAME"]?>" /></a><br />
</td>
<?endif?>
<td valign="top"><a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><?=$arElement["NAME"]?></a><br />
<?foreach($arElement["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<?=$arProperty["NAME"]?>: <?
if(is_array($arProperty["DISPLAY_VALUE"]))
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
else
echo $arProperty["DISPLAY_VALUE"];?><br />
<?endforeach?>
<br />
<?=$arElement["PREVIEW_TEXT"]?>
</td>
</tr>
</table>
<?if(is_array($arElement["OFFERS"]) && !empty($arElement["OFFERS"])):?>
<?foreach($arElement["OFFERS"] as $arOffer):?>
<?foreach($arParams["OFFERS_FIELD_CODE"] as $field_code):?>
<small><?echo GetMessage("IBLOCK_FIELD_".$field_code)?>: <?
echo $arOffer[$field_code];?></small><br />
<?endforeach;?>
<?foreach($arOffer["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<small><?=$arProperty["NAME"]?>: <?
if(is_array($arProperty["DISPLAY_VALUE"]))
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
else
echo $arProperty["DISPLAY_VALUE"];?></small><br />
<?endforeach?>
<?foreach($arOffer["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"]):?>
<p><?=$arResult["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?>
</p>
<?endif;?>
<?endforeach;?>
<p>
<?if($arParams["DISPLAY_COMPARE"]):?>
<noindex>
<a href="<?echo $arOffer["COMPARE_URL"]?>" rel="nofollow"><?echo GetMessage("CATALOG_COMPARE")?></a>
</noindex>
<?endif?>
<?if($arOffer["CAN_BUY"]):?>
<?if($arParams["USE_PRODUCT_QUANTITY"]):?>
<form action="<?=POST_FORM_ACTION_URI?>" method="post" enctype="multipart/form-data">
<table border="0" cellspacing="0" cellpadding="2">
<tr valign="top">
<td><?echo GetMessage("CT_BCS_QUANTITY")?>:</td>
<td>
<input type="text" name="<?echo $arParams["PRODUCT_QUANTITY_VARIABLE"]?>" value="1" size="5">
</td>
</tr>
</table>
<input type="hidden" name="<?echo $arParams["ACTION_VARIABLE"]?>" value="BUY">
<input type="hidden" name="<?echo $arParams["PRODUCT_ID_VARIABLE"]?>" value="<?echo $arOffer["ID"]?>">
<input type="submit" name="<?echo $arParams["ACTION_VARIABLE"]."BUY"?>" value="<?echo GetMessage("CATALOG_BUY")?>">
<input type="submit" name="<?echo $arParams["ACTION_VARIABLE"]."ADD2BASKET"?>" value="<?echo GetMessage("CATALOG_ADD")?>">
</form>
<?else:?>
<noindex>
<a href="<?echo $arOffer["BUY_URL"]?>" rel="nofollow"><?echo GetMessage("CATALOG_BUY")?></a>
<a href="<?echo $arOffer["ADD_URL"]?>" rel="nofollow"><?echo GetMessage("CATALOG_ADD")?></a>
</noindex>
<?endif;?>
<?elseif(count($arResult["PRICES"]) > 0):?>
...
Пунктуация сохранена. Шаблон компонента битрикса. Шедевр лапшекода.
Комментарии (0) RSS
Добавить комментарий