<?=$arResult["DESCRIPTION"];?>
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
if (count($arResult['ITEMS']) < 1)
return;
?>
<div class="catalog-item-list">
<?
foreach ($arResult['ITEMS'] as $key => $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('CATALOG_ELEMENT_DELETE_CONFIRM')));
$bHasPicture = is_array($arElement['PREVIEW_IMG']);
$sticker = "";
if (array_key_exists("PROPERTIES", $arElement) && is_array($arElement["PROPERTIES"]))
{
foreach (Array("SPECIALOFFER", "NEWPRODUCT", "SALELEADER") as $propertyCode)
if (array_key_exists($propertyCode, $arElement["PROPERTIES"]) && intval($arElement["PROPERTIES"][$propertyCode]["PROPERTY_VALUE_ID"]) > 0)
$sticker .= " <span class=\"sticker\">".$arElement["PROPERTIES"][$propertyCode]["NAME"]."</span>";
}
?>
<pre><?php //print_r( $arElement) ?></pre>
<div class="catalog-item<?if (!$bHasPicture):?> no-picture-mode<?endif;?>" id="<?=$this->GetEditAreaId($arElement['ID']);?>">
<div class="catalog-item-info">
<?if($bHasPicture):?>
<div class="catalog-item-image">
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><img src="<?=$arElement["PREVIEW_IMG"]["SRC"]?>" width="<?=$arElement["PREVIEW_IMG"]["WIDTH"]?>" height="<?=$arElement["PREVIEW_IMG"]["HEIGHT"]?>" alt="<?=$arElement["NAME"]?>" title="<?=$arElement["NAME"]?>" id="catalog_list_image_<?=$arElement['ID']?>" /></a>
</div>
<?endif;?>
<div class="catalog-item-desc">
<div class="catalog-item-title"><a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><?=$arElement["NAME"]?></a><?=$sticker?></div>
<div class="catalog-item-preview-text"><?=$arElement['PREVIEW_TEXT']?></div>
<?if(is_array($arElement["OFFERS"]) && !empty($arElement["OFFERS"])):?>
<div class="catalog-item-offers">
<?$i=0;?>
<?foreach($arElement["OFFERS"] as $arOffer):?>
<?if($i != 0):?>
<div class="catalog-detail-line"></div>
<?endif;?>
<?$i++;?>
<div class="catalog-item-links">
<?if($arOffer["CAN_BUY"]):?>
<a href="<?echo $arOffer["ADD_URL"]?>" class="catalog-item-buy<?/*catalog-item-in-the-cart*/?>" rel="nofollow" onclick="return addToCart(this, 'catalog_list_image_<?=$arElement['ID']?>', 'list', '<?=GetMessage("CATALOG_IN_CART")?>');" id="catalog_add2cart_link_ofrs_<?=$arOffer['ID']?>"><?echo GetMessage("CATALOG_ADD")?></a>
<?elseif(count($arResult["PRICES"]) > 0):?>
<span class="catalog-item-not-available"><?=GetMessage("CATALOG_NOT_AVAILABLE")?></span>
<?endif?>
<?if($arParams["DISPLAY_COMPARE"]):?>
<a href="<?echo $arOffer["COMPARE_URL"]?>" class="catalog-item-compare" onclick="return addToCompare(this, '<?=GetMessage("CATALOG_IN_COMPARE")?>');" rel="nofollow" id="catalog_add2compare_link_ofrs_<?=$arOffer['ID']?>"><?echo GetMessage("CATALOG_COMPARE")?></a>
|