Answer the question
In order to leave comments, you need to log in
How to trigger event in bitrix sale order ajax?
Upon successful checkout, you need to call the code that sends data to crm, as I understand it, can this be done by registering an event? I myself am not friends with Bitrix, I smoke mana.
Answer the question
In order to leave comments, you need to log in
Use the event to save the order OnSaleOrderSaved
$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler('sale', 'OnSaleOrderSaved', 'OnSaleOrderSavedHandler');
function OnSaleOrderSavedHandler(\Bitrix\Main\Event $event) {
$order = $event->getParameter('ENTITY');
$oldValues = $event->getParameter('VALUES');
$isNew = $event->getParameter('IS_NEW');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question