Код |
---|
function getCountBasket() { CModule::IncludeModule("sale"); return CSaleBasket::GetList(false, array("FUSER_ID" => CSaleBasket::GetBasketUserID(),"LID" => SITE_ID,"ORDER_ID" => "NULL"),false,false,array("ID" ))->SelectedRowsCount(); } |
Код |
---|
function getAllPrice() { $return = 0; $dbBasketItems = CSaleBasket::GetList(false, array("FUSER_ID" => CSaleBasket::GetBasketUserID(), "LID" => SITE_ID, "ORDER_ID" => "NULL", "DELAY" => "N"), false, false, array("ID","QUANTITY", "PRICE")); while ($arItems = $dbBasketItems->Fetch()) $return += $arItems['PRICE']*$arItems['QUANTITY']; return number_format($return, 2, '.', ' '); } |