• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/shopsitescontroller.php
  • Класс: BitrixSaleShopSitesController
  • Вызов: ShopSitesController::getShops
static function getShops(): array
{
	static $shops = null;
	if (is_array($shops))
	{
		return $shops;
	}

	$shops = [];
	$siteIterator = BitrixMainSiteTable::getList([
		'select' => ['LID', 'NAME', 'SORT'],
		'order' => ['SORT' => 'ASC'],
		'cache' => ['ttl' => 86400],
	]);
	while ($site = $siteIterator->fetch())
	{
		$saleSite = BitrixMainConfigOption::get('sale', 'SHOP_SITE_'.$site['LID']);
		if ($site['LID'] === $saleSite)
		{
			$shops[] = $site;
		}
	}

	return $shops;
}