Advertisement
Guest User

Untitled

a guest
Jul 16th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?
  2. function ADDTOCARTA($id,$name,$link,$price)
  3. {
  4.     if (CModule::IncludeModule("sale")) {
  5.         $arFields = array(
  6.             "PRODUCT_ID" => (int)$id,
  7.             "PRODUCT_PRICE_ID" => 0,
  8.             "PRICE" => (int)$price,
  9.             "CURRENCY" => "RUB",
  10.             "QUANTITY" => 1,
  11.             "LID" => LANG,
  12.             "DELAY" => "N",
  13.             "CAN_BUY" => "Y",
  14.             "NAME" => $name,
  15.             "CALLBACK_FUNC" => "",
  16.             "MODULE" => "my_module",
  17.             "NOTES" => "",
  18.             "ORDER_CALLBACK_FUNC" => "",
  19.             "DETAIL_PAGE_URL" => $link
  20.         );
  21.  
  22.         $arProps = array();
  23.  
  24.         $arFields["PROPS"] = $arProps;
  25.  
  26.         CSaleBasket::Add($arFields);
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement