$retStr = "";
$resBasketItems = 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", "NAME",
"DETAIL_PAGE_URL")
);
while ($arItems = $resBasketItems->Fetch())
{
if (strlen($arItems["CALLBACK_FUNC"]) > 0)
{
CSaleBasket::UpdatePrice($arItems["ID"],
$arItems["CALLBACK_FUNC"],
$arItems["MODULE"],
$arItems["PRODUCT_ID"],
$arItems["QUANTITY"]);
$arItems = CSaleBasket::GetByID($arItems["ID"]);
}
if ($arItems["CAN_BUY"]=="Y" && $arItems["DELAY"]=="N")
{
$arStrForMail .= $retStr." - ".$arItems["QUANTITY"]." шт.\n";
}
} |