Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- function ADDTOCARTA($id,$name,$link,$price)
- {
- if (CModule::IncludeModule("sale")) {
- $arFields = array(
- "PRODUCT_ID" => (int)$id,
- "PRODUCT_PRICE_ID" => 0,
- "PRICE" => (int)$price,
- "CURRENCY" => "RUB",
- "QUANTITY" => 1,
- "LID" => LANG,
- "DELAY" => "N",
- "CAN_BUY" => "Y",
- "NAME" => $name,
- "CALLBACK_FUNC" => "",
- "MODULE" => "my_module",
- "NOTES" => "",
- "ORDER_CALLBACK_FUNC" => "",
- "DETAIL_PAGE_URL" => $link
- );
- $arProps = array();
- $arFields["PROPS"] = $arProps;
- CSaleBasket::Add($arFields);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement