EventManager::getInstance()->addEventHandler(
'sale',
'OnSaleOrderSaved',
'myFunction'
);
function myFunction(\Main\Event $event)
{
/** @var Order $order */
$order = $event->getParameter("ENTITY");
$oldValues = $event->getParameter("VALUES");
$isNew = $event->getParameter("IS_NEW");
if ($isNew)
{
$sum = $order->getPrice();
// . . .
}
}
/*
!/bitrix
/bitrix/*
!/bitrix/templates
/bitrix/templates/*
!/bitrix/templates/bitrix24
function printDiv() {
var divToPrint = document.getElementById('printArea');
var newWin = window.open('URL', 'print', params);
newWin.document.close();
newWin.focus();
newWin.print();
newWin.close();
}