• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/store.php
  • Класс: BitrixCatalogStoreTable
  • Вызов: StoreTable::getDefaultStoreId
static function getDefaultStoreId(): ?int
{
	$row = self::getRow([
		'select' => [
			'ID',
		],
		'filter' => [
			'=IS_DEFAULT' => 'Y',
		],
		'cache' => ['ttl' => 86400],
	]);
	$defaultStoreId = (int)($row['ID'] ?? 0);

	return ($defaultStoreId > 0 ? $defaultStoreId : null);
}