• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/component/usestore.php
  • Класс: BitrixCatalogComponentUseStore
  • Вызов: UseStore::createCatalogStores
static function createCatalogStores(): void
{
	$codeList = self::getCodesStoreByZone();

	if (!empty($codeList))
	{
		foreach ($codeList as $code)
		{
			$title = Loc::getMessage('CATALOG_USE_STORE_' . $code);

			$row = CatalogStoreTable::getRow([
				'select' => [
					'CODE',
				],
				'filter' => [
					'=CODE' => $code,
				],
			]);
			if (empty($row))
			{
				CatalogStoreTable::add([
					'TITLE' => $title,
					'ADDRESS' => $title,
					'CODE' => $code,
				]);
			}
		}
	}
}