- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/helper.php
- Класс: BitrixSaleTradingPlatformHelper
- Вызов: Helper::getBitrixStatuses
static function getBitrixStatuses($siteId)
{
$result = array(
"CANCELED" => Loc::getMessage("SALE_EBAY_HLP_FLAG_CANCELED"),
"ALLOW_DELIVERY" => Loc::getMessage("SALE_EBAY_HLP_FLAG_DELIVERY"),
"PAYED" => Loc::getMessage("SALE_EBAY_HLP_FLAG_PAYED"),
"DEDUCTED" => Loc::getMessage("SALE_EBAY_HLP_FLAG_DEDUCTED"),
);
if ($siteId == '')
throw new ArgumentNullException("siteId");
$dbRes = SiteTable::getList(array(
'filter' => array(
'LID' => $siteId,
),
'select' => array("LANGUAGE_ID"),
));
if ($site = $dbRes->fetch())
$langId = $site["LANGUAGE_ID"];
else
throw new SystemException("Site with id: "" . $siteId . "" not found!");
$dbRes = StatusLangTable::getList(array(
'filter' => array(
'LID' => $langId,
'STATUS.TYPE' => 'O',
),
'order' => array(
"STATUS.SORT" => "ASC",
"NAME" => "ASC",
),
'select' => array(
"ID" => "STATUS.ID", "NAME",
),
));
while ($row = $dbRes->fetch())
$result[$row['ID']] = Loc::getMessage("SALE_EBAY_HLP_STATUS") . " " . $row['NAME'] . ' [' . $row['ID'] . ']';
return $result;
}