Answer the question
In order to leave comments, you need to log in
How to send data on an order after placing it in Bitrix?
I want information about this order to be sent to the delivery service after placing an order, but how can I do this? I'm trying to send via this:
use Bitrix\Main;
Main\EventManager::getInstance()->addEventHandler(
'sale',
'OnSaleOrderSaved',
'sendOrder'
);
function sendOrder(Main\Event $event)
{
/** @var Order $order */
$order = $event->getParameter("ENTITY");
$oldValues = $event->getParameter("VALUES");
$isNew = $event->getParameter("IS_NEW");
if ($isNew)
{
var_dump($order);
}
}
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