• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/admin/locationhelper.php
  • Класс: BitrixSaleLocationAdminLocationHelper
  • Вызов: LocationHelper::getYandexMarketExternalServiceId
static function getYandexMarketExternalServiceId(): int
{
	static $result;

	if ($result === null)
	{
		$result = 0;

		$yandexMarketEs = LocationExternalServiceTable::getList([
			'filter' => ['=CODE' => CSaleYMLocation::EXTERNAL_SERVICE_CODE]
		])->fetch();

		if ($yandexMarketEs)
		{
			$result = (int)$yandexMarketEs['ID'];
		}
	}

	return $result;
}