Answer the question
In order to leave comments, you need to log in
Birtix: how to collect order data correctly?
It is required to collect in one array not only the fields that I receive in the request
$parameters = [
'filter' => [
">=DATE_INSERT" => $date
],
'order' => ["DATE_INSERT" => "ASC"]
];
$dbRes = \Bitrix\Sale\Order::loadByFilter($parameters);
$dbRes = \Bitrix\Sale\Order::getList($parameters);
$order = \Bitrix\Sale\Order::load($id);
$order_props = $order->getPropertyCollection()->getArray();
$basket = $order->getBasket();
$result = Bitrix\Sale\Order:: какой-то метод (с параметрами) ->toArray();
echo \Bitrix\Main\Web\Json::encode($result);
Answer the question
In order to leave comments, you need to log in
Perhaps this will help
use Bitrix\Sale;
$filter=[
'USER_ID' => '13627' ,
];
$user_orders = Sale\Order::getList(
[
'filter' => $filter,
'select' => [
"ID",
"BASKET.PRODUCT_ID",
"USER.ID",
"SHIPMENT.STATUS_ID",
"PAYMENT.ID"
],
]
)->fetchAll();
var_dump($user_orders);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question