<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<table class="table-basket-line">
<?
if (IntVal($arResult["NUM_PRODUCTS"])>0)
{
if (CModule::IncludeModule("sale"))
{
$arBasketItems = array();
$dbBasketItems = CSaleBasket::GetList(
array(
"NAME" => "ASC",
"ID" => "ASC"
),
array(
"FUSER_ID" => CSaleBasket::GetBasketUserID(),
"LID" => SITE_ID,
"ORDER_ID" => "NULL"
),
false,
false,
array("ID", "QUANTITY", "PRICE")
);
while ($arItems = $dbBasketItems->Fetch())
{
if (strlen($arItems["CALLBACK_FUNC"]) > 0)
{
CSaleBasket::UpdatePrice($arItems["ID"],
X $arItems["QUANTITY"]);
$arItems = CSaleBasket::GetByID($arItems["ID"]);
}
$arBasketItems[] = $arItems;
}
$summ = 0;
for ($i=0;$i<=$arResult["NUM_PRODUCTS"];$i++){
$summ = $summ + $arBasketItems[$i]["PRICE"]*$arBasketItems[$i]["QUANTITY"];
}
}
?>
<tr>
<td><a href="<?=$arParams["PATH_TO_BASKET"]?>" class="basket-line-basket"></a></td>
<td style="font-size:80%"><a href="<?=$arParams["PATH_TO_BASKET"]?>"> на сумму <?=$summ?> руб.</a></td>
</tr>
<?
}
else
{
?><tr>
<td><div class="basket-line-basket"></div></td>
<td><?=$arResult["ERROR_MESSAGE"]?></td>
</tr><?
}
?>
</table> |