namespace Bitrix\MyOrder;
use Bitrix\Main;
use Bitrix\Sale\Order;
class Util
{
public static function OnSaleOrderBeforeSaved(Main\Event $event)
{
define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/log.txt");
/** @var Order $order */
$order = $event->getParameter("ENTITY");
$order->setField('COMMENTS', 'New comments');
$event->addResult(
new Main\EventResult(
Main\EventResult::SUCCESS, $order
)
);
AddMessage2Log('Module is work','scrm.tet');
}
public function tet(Main\Event $event)
{
define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/log.txt");
AddMessage2Log('Module is work','scrm.tet');
}
}