Answer the question
In order to leave comments, you need to log in
How to Get data from Order Parameters tab?
I need to create a checkout event handler. Which I will write in init.php. In it, I will receive the last created order and check the value of the "Order source" property.
How can I get this property?
Answer the question
In order to leave comments, you need to log in
\Bitrix\Main\Loader::includeModule('sale');
$orderId = 1;
$dbRes = \Bitrix\Sale\Internals\OrderTable::getList(array(
'filter' => array(
'ORDER_ID' => $orderId
),
'select' => array('SOURCE_NAME' => 'TRADING_PLATFORM.NAME')
));
if($tpOrder = $dbRes->fetch())
$sourceName = $tpOrder['SOURCE_NAME'];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question