$arFields = array(
"LID" => "ru",
"PERSON_TYPE_ID" => 1,
"PAYED" => "N",
"CANCELED" => "N",
"STATUS_ID" => "N",
"PRICE" => IntVal(number_format($totalPrice * 1.18, 0, ".", "")),
"CURRENCY" => "RUR",
"USER_ID" => IntVal($_SESSION['SIGNUP']['USER']['ID']),
"PAY_SYSTEM_ID" => IntVal($_SESSION['SIGNUP']['PAYMENT']['ID']),
"PRICE_DELIVERY" => IntVal(number_format($_SESSION['SIGNUP']['DELIVERY']['PRICE']['VALUE'], 0, ".", "")),
"DELIVERY_ID" => IntVal($_SESSION['SIGNUP']['DELIVERY']['ID']),
"TAX_VALUE" => 0.0,
"USER_DESCRIPTION" => "Регистрационный заказ"
);
$ORDER_ID = CSaleOrder::Add($arFields);
if (!$ORDER_ID)
die("Заказ не добавили".var_dump($arFields));
else
echo $ORDER_ID;
$ORDER_ID = IntVal($ORDER_ID);
|