Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Everything is very simple:
<?$res = AllProductDiscount::getFull();?>
<?
foreach($res['IDS'] as $ID) {
$sale_id[] = $ID;
}
?>
<?
$GLOBALS['searchFilter'] = array("ID"=>$sale_id);
?>
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", "CALLBACK_FUNC", "MODULE",
"PRODUCT_ID", "QUANTITY", "DELAY",
"CAN_BUY", "PRICE", "WEIGHT")
);
while ($arItem = $dbBasketItems->Fetch())
{
$arItem = CSaleBasket::GetByID($arItem["ID"]);
$arDiscounts = CCatalogDiscount::GetDiscountByProduct(
$arItem['PRODUCT_ID'],
$USER->GetUserGroupArray(),
"N",
2,
SITE_ID
);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question