if (CModule::IncludeModule("sale"))
{
$arFields = array(
"PRODUCT_ID" =>$PRODUCT_ID,
"PRODUCT_PRICE_ID" => 1,
"NOTES" => 1,
"PRICE" => $arFields[PROPERTY_5_VALUE],
"CURRENCY" => "RUB",
"QUANTITY" => 1,
"CAN_BUY" => "Y",
"NAME" => "$arFields[NAME]",
"CALLBACK_FUNC" => "MyBasketCallback",
"MODULE" => "my_module",
"NOTES" => "",
"ORDER_CALLBACK_FUNC" => "MyBasketOrderCallback",
"DETAIL_PAGE_URL" => "/catalogs/detail.php?ID=$PRODUCT_ID"
);
CSaleBasket::Add($arFields);
}
|