$dbBasketItems = CSaleBasket::GetList(array("NAME" => "ASC","ID" => "ASC"), array("FUSER_ID" => CSaleBasket::GetBasketUserID(),"LID" => SITE_ID,"ORDER_ID" => "NULL"),
false,false,array("ID", "CALLBACK_FUNC", "MODULE", "PRODUCT_ID", "QUANTITY", "DELAY", "CAN_BUY", "PRICE", "WEIGHT"));
$price_sum = 0;
while ($arItems = $dbBasketItems->Fetch()){
if (strlen($arItems["CALLBACK_FUNC"]) > 0){
$arItems = CSaleBasket::GetByID($arItems["ID"]);
}
$price_sum = $price_sum + $arItems["QUANTITY"]*$arItems["PRICE"];
}
//$price_sum - сумма итоговая
|