Skip to content

Instantly share code, notes, and snippets.

@anoriar
Created November 14, 2018 14:40
Show Gist options
  • Save anoriar/4e1e2d8074faa2af7f5477568fae72ef to your computer and use it in GitHub Desktop.
Save anoriar/4e1e2d8074faa2af7f5477568fae72ef to your computer and use it in GitHub Desktop.
saleOrders + saleOrders props
$arOrders = [];
//Берем все заказы
$arFilter = Array("PROPERTY_VAL_BY_CODE_UPLOAD_SUZ" => "N", "ID" => 86589);
$rsSales = CSaleOrder::GetList(array("DATE_INSERT" => "DESC"), $arFilter, false, false, array("*"));
while ($arSales = $rsSales->Fetch()) {
$arOrders[$arSales["ID"]] = $arSales;
}
//берем все свойства заказов по их кодам
$orderProps = [];
$db_props = CSaleOrderPropsValue::GetList(
array("DATE_INSERT" => "DESC"), ["ORDER_ID" => array_keys($arOrders)], false, false, array("*")
);
while ($arProps = $db_props->Fetch()) {
$orderProps[$arProps["ID"]] = $arProps;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment