Answer the question
In order to leave comments, you need to log in
How to take into account the rules of the cart when placing an order through the API?
Checkout via API (not D7) works like this:
$arFields =
array(
'LID' => mr,
'PERSON_TYPE_ID' => 3,
'PAYED' => "N",
'CANCELED' => "N",
'STATUS_ID' => "N",
'ALLOW_DELIVERY' => 'N',
'PRICE' => $allik,
'CURRENCY' => "RUR",
'USER_ID' => $userId,
'PAY_SYSTEM_ID' => $_POST["pay"],
'DELIVERY_ID' => $_POST["DELIVERY"],
'PRICE_DELIVERY' => $_POST["autodos"],
);
$order_id = CSaleOrder::Add($arFields);
CSaleBasket::OrderBasket($order_id, $FUSER_ID, SITE_ID);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question