- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/component/storeamount.php
- Класс: BitrixCatalogComponentStoreAmount
- Вызов: StoreAmount::getTotalData
public function getTotalData(): array
{
$storeTotal = $this->getStoreTotal();
$quantity = '';
$quantityCommon = '';
$quantityReserved = '';
foreach ($storeTotal['QUANTITY'] as $storeQuantity)
{
$measureSymbol = htmlspecialcharsbx($this->getMeasure($storeQuantity['MEASURE_ID']));
$measureInfo =
"
{$storeQuantity['QUANTITY']}
{$measureSymbol}
";
$measureCommonInfo =
"
{$storeQuantity['QUANTITY_COMMON']}
{$measureSymbol}
";
$measureReservedInfo =
"
{$storeQuantity['QUANTITY_RESERVED']}
{$measureSymbol}
";
$quantity .= $measureInfo . '
';
$quantityCommon .= $measureCommonInfo . '
';
$quantityReserved .= $measureReservedInfo . '
';
}
$amount = '';
foreach ($storeTotal['AMOUNT'] as $storeAmount)
{
if (isset($storeAmount['CURRENCY']))
{
$amountValue =
""
. CCurrencyLang::CurrencyFormat($storeAmount['AMOUNT'], $storeAmount['CURRENCY'], false)
. "";
$amountBlock =
""
. CCurrencyLang::getPriceControl(
$amountValue,
$storeAmount['CURRENCY']
)
. "";
$amount .= $amountBlock.'
';
}
}
return [
"QUANTITY" => $quantity,
"QUANTITY_COMMON" => $quantityCommon,
"QUANTITY_RESERVED" => $quantityReserved,
"AMOUNT" => $amount,
];
}