<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="catalog-section">
<?if($arParams["DISPLAY_TOP_PAGER"]):?>
<p><?=$arResult["NAV_STRING"]?></p>
<?endif?>
<!---ИСПОЛНЯЮЩИЙ СКРИПТ----->
<script>
function cost(){
var cost_p=document.getElementById('cost_p').innerHTML;
var amount_p=document.getElementById('amount_p').value;
document.getElementById('cost_out').innerHTML=cost_p*amount_p;
}
</script>
<!-------------------------->
<hr noshade color="indigo"></hr>
<table class="data-table" cellspacing="0" cellpadding="0" border="0" width="100%">
<thead>
<tr>
<td><b><?=GetMessage("CATALOG_TITLE")?></b></td>
<?if(count($arResult["ITEMS"]) > 0):
foreach($arResult["ITEMS"][0]["DISPLAY_PROPERTIES"] as $arProperty):?>
<td><?=$arProperty["NAME"]?></td>
<?endforeach;
endif;?>
<?foreach($arResult["PRICES"] as $code=>$arPrice):?>
<td><b><?=$arPrice["TITLE"]?></b></td>
<?endforeach?>
<?if(count($arResult["PRICES"]) > 0):?>
<?endif?>
<td><b>Количество</b></td>
<td><b>Сумма</b></td>
</tr>
</thead>
<?foreach($arResult["ITEMS"] as $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')));
?>
<tr id="<?=$this->GetEditAreaId($arElement['ID']);?>">
<td>
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><?=$arElement["NAME"]?></a>
<?if(count($arElement["SECTION"]["PATH"])>0):?>
<?foreach($arElement["SECTION"]["PATH"] as $arPath):?>
/<a href="<?=$arPath["SECTION_PAGE_URL"]?>"><?=$arPath["NAME"]?></a>
<?endforeach?>
<?endif?>
</td>
<?foreach($arElement["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<td>
<?if(is_array($arProperty["DISPLAY_VALUE"]))
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
elseif($arProperty["DISPLAY_VALUE"] === false)
echo " ";
else
echo $arProperty["DISPLAY_VALUE"];?>
</td>
<?endforeach?>
<?foreach($arResult["PRICES"] as $code=>$arPrice):?>
<td>
<?if($arPrice = $arElement["PRICES"][$code]):?>
<?if($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"]):?>
<s><?=$arPrice["PRINT_VALUE"]?></s><br /><span class="catalog-price"><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span>
<?else:?>
<!---------ОПРЕДЕЛЯЕМ ПЕРЕМЕННУЮ ЦЕНЫ---------->
<div id=cost_p><span class="catalog-price"><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span></div>
<!---------------------------------------------->
<?endif?>
<?else:?>
<?endif;?>
</td>
<?endforeach;?>
<?if(count($arResult["PRICES"]) > 0):?>
<td>
<!---------------ПОЛЕ ДЛЯ ВВОДА КОЛИЧЕСТВА------------>
<form>
<input onkeyup=cost(); id=amount_p style='text-align:right;border:1px solid #999999' type="text" name="kolvo" value="0" size="1">
</form>
<!---------------------------------------------------->
</td>
<td>
<!-----------------ЗДЕСЬ ВЫВОДИМ СУММУ---------------->
<div id=cost_out>0</div>
<!---------------------------------------------------->
</td>
|