Answer the question
In order to leave comments, you need to log in
Bitrix does not create orders from a specific group?
Guys, I need to create orders through Bitrix API.
Everything almost works.
The problem is that orders from a specific group are not created. I have it called suppliers.
CModule::IncludeModule("catalog");//подключаем класс каталога
if(CModule::IncludeModule("sale")){ //подключаем класс корзины
//создаем заказ на сайте автос
// CSaleBasket::DeleteAll(CSaleBasket::GetBasketUserID());
Add2BasketByProductID(
'251',
'1',
array(),
array()
);
$arFields = array(
"LID" => SITE_ID,
"PERSON_TYPE_ID" => 10, //с этой группой заказы не создаются
"PAYED" => "N", //флаг (Y/N) оплачен ли заказ;
"CANCELED" => "N", //флаг (Y/N) отменён ли заказ;
"STATUS_ID" => "N", //код статуса заказа;
"CURRENCY" => "RUB",
"USER_ID" => IntVal($tmp['ID']), //id - пользователя
"USER_DESCRIPTION" => "описание заказа заказчиком" // описание заказа заказчиком;
);
Answer the question
In order to leave comments, you need to log in
You seem to be confusing user groups with payer types. In PERSON_TYPE_ID, you need to pass the payer type, not the user group. Most likely, the type of payer with identifiers 10 simply does not exist for you, which is why the order is not created. You can view the types of payers in the settings Store -> Settings -> Types of payers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question