Answer the question
In order to leave comments, you need to log in
How to get order object by XML_ID?
How can I get an order on D7 by XML_ID ("External order code")? I do it like this:
$order = \Bitrix\Sale\OrderBase::loadByFilter([
'filter' => ['XML_ID' => $xml]
]);
Answer the question
In order to leave comments, you need to log in
So you see the error.
[Bitrix\Main\NotImplementedException]
(140)
/bitrix/modules/sale/lib/orderbase.php:2069
#0: Bitrix\Sale\OrderBase::getList(array)
/bitrix/modules/sale/lib/orderbase.php:363
#1: Bitrix\Sale\OrderBase::loadFromDb(array)
/bitrix/modules/sale/lib/orderbase.php:292
#2: Bitrix\Sale\OrderBase::loadByFilter(array)
/test/index.php:7
$order = \Bitrix\Sale\Order::loadByFilter([
'filter' => ['XML_ID' => $xml]
]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question