- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/component/usestore.php
- Класс: BitrixCatalogComponentUseStore
- Вызов: UseStore::disable
static function disable(): bool
{
if (!self::isCrmExists())
{
return false;
}
Option::set('catalog', 'default_use_store_control', 'N');
Option::set('catalog', 'default_quantity_trace', 'N');
if (self::shouldManageQuantityTrace())
{
self::disableQuantityTraceMainTypes();
self::disableQuantityTraceSku();
self::disableQuantityTraceEmptySku();
self::disableQuantityTraceSets();
}
self::deactivateRealizationDocumentTradingPlatform();
self::unRegisterEventsHandlers();
if (Loader::includeModule('pull'))
{
CPullWatch::AddToStack(
'CATALOG_INVENTORY_MANAGEMENT_CHANGED',
[
'module_id' => 'crm',
'command' => 'onCatalogInventoryManagementDisabled',
],
);
}
return true;
}