• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/component/usestore.php
  • Класс: BitrixCatalogComponentUseStore
  • Вызов: UseStore::disableQuantityTraceMainTypes
static function disableQuantityTraceMainTypes(): void
{
	$mainTypes = implode(
		', ',
		[
			ProductTable::TYPE_PRODUCT,
			ProductTable::TYPE_OFFER,
			ProductTable::TYPE_FREE_OFFER,
		]
	);

	Application::getConnection()->queryExecute("
		update b_catalog_product
		set
			QUANTITY_TRACE = '" . ProductTable::STATUS_DEFAULT . "',
			CAN_BUY_ZERO = '" . ProductTable::STATUS_DEFAULT . "',
			NEGATIVE_AMOUNT_TRACE = '" . ProductTable::STATUS_DEFAULT . "',
			AVAILABLE = '" . ProductTable::STATUS_YES . "'
		where
			TYPE in (" . $mainTypes . ")
	");
}