• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/delivery/extra_services/enum.php
  • Класс: BitrixSaleDeliveryExtraServicesEnum
  • Вызов: Enum::createOptions
protected function createOptions()
{
	$this->params["OPTIONS"] = [];

	if (empty($this->params["PRICES"]) || !is_array($this->params["PRICES"]))
	{
		return;
	}

	foreach ($this->params["PRICES"] as $key => $price)
	{
		if (!is_array($price))
		{
			continue;
		}
		$priceTitle = trim((string)($price['TITLE'] ?? ''));
		if ($priceTitle === '')
		{
			continue;
		}

		$priceVal = (float)($price['PRICE'] ?? 0);
		$this->params['OPTIONS'][$key] =
			htmlspecialcharsbx($price['TITLE'])
			. ' ('
			. strip_tags(
				SaleFormatCurrency(
					$this->convertToOperatingCurrency($priceVal),
					$this->operatingCurrency,
					false
				)
			)
			. ')'
		;
	}
}