Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Finding examples on the net is not so difficult, but not all examples are clear
. Here is my piece of code that I used
//https://doc.budagov.ru/class_bitrix_1_1_sale_1_1_order_history.html
$order_resave = \Bitrix\Sale\Order::load($orderID);
$historyEntityType = 'ORDER'; //Наименование - В данном случае для заказа
$historyType = 'ORDER_COMMENTED'; //Нужный тип можно посмотреть в классе \CSaleOrderChangeFormat в $operationTypes
\Bitrix\Sale\OrderHistory::addAction(
$historyEntityType,
$order_resave->getId(),
$historyType,
$order_resave->getId(),
$order_resave,
['COMMENTS' => 'Первый пересчет заказа - component.php']
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question