Finalizing recalculation
You can use order final recalculation events for solving individual objectives in cases when an order is at "consistent" state, i. e. field data was already calculated based on the available order information.
Event | Description and parameters | ||||||
---|---|---|---|---|---|---|---|
OnBeforeSaleOrderFinalAction | Triggered directly before final calculation.
Parameters
| ||||||
OnAfterSaleOrderFinalAction | Triggered when order is fully calculated.
Parameters
|
Example
//example of event OnAfterSaleOrderFinalAction \Bitrix\Main\EventManager::getInstance()->addEventHandler( 'sale', 'OnAfterSaleOrderFinalAction', 'myFunction' ); //handler receives total amount used for specific next actions: function myFunction(\Bitrix\Main\Event $event) { /** @var \Bitrix\Sale\Order $order */ $order = $event->getParameter('ENTITY'); $sum = $order->getPrice(); // . . . }
© «Bitrix24», 2001-2024