<?php
//Получаем заказы текущего пользователя
static function getOrdersByUser(){
if (CModule::IncludeModule('sale'))
{
global $USER;
$result = array();
$arFilter = Array(
"USER_ID" => $USER->GetID(),
"DATE_CANCELED" => ""
);
$db_sales = CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
while ($ar_sales = $db_sales->Fetch())
{
$result[] = $ar_sales;
}
return $result;
}
}
//Получаем свойства заказа по ID
static function GetPropsOfOrder($order_id){
$arrResult = array();
$obBasket = \Bitrix\Sale\Basket::getList(array('filter' => array('ORDER_ID' => $order_id)));
while($bItem = $obBasket->Fetch()){
$arrResult[] = $bItem;
}
return $arrResult;
}
?>
Parse error: syntax error, unexpected 'getOrdersByUser' (T_STRING), expecting '(' in /components/bitrix/sale.personal.section/bootstrap_v5/template.php on line 596
static function getOrdersByUser(){
if (CModule::IncludeModule('sale'))
{
global $USER;
$result = array();
$arFilter = Array(
"USER_ID" => $USER->GetID(),
"DATE_CANCELED" => ""
);
$db_sales = CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
while ($ar_sales = $db_sales->Fetch())
{
$result[] = $ar_sales;
}
return $result;
}
} //-- Вот тут