• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/model/product.php
  • Класс: BitrixCatalogModelProduct
  • Вызов: Product::runDeleteExternalActions
static function runDeleteExternalActions($id): void
{
	CatalogPriceTable::deleteByProduct($id);
	CatalogMeasureRatioTable::deleteByProduct($id);
	CatalogProductGroupAccessTable::deleteByProduct($id);
	CatalogStoreProductTable::deleteByProduct($id);
	CatalogSubscribeTable::onIblockElementDelete($id);
	ExportedProductTable::deleteProduct($id);
	//TODO: replace this code
	$conn = MainApplication::getConnection();
	$helper = $conn->getSqlHelper();
	$conn->queryExecute(
		'delete from '.$helper->quote('b_catalog_product_sets').
		' where '.$helper->quote('ITEM_ID').' = '.$id.' or '.$helper->quote('OWNER_ID').' = '.$id
	);
	unset($helper, $conn);
}