function OnBuildSaleMenu(&$arGlobalMenu, &$arModuleMenu) { if (defined("BX_CATALOG_UNINSTALLED")) return; global $USER; if (!CCatalog::IsUserExists()) return; if (!Loader::includeModule("sale")) return; if (!defined("BX_SALE_MENU_CATALOG_CLEAR") || BX_SALE_MENU_CATALOG_CLEAR != 'Y') return; self::$catalogRead = $USER->CanDoOperation('catalog_read'); self::$catalogGroup = $USER->CanDoOperation('catalog_group'); self::$catalogPrice = $USER->CanDoOperation('catalog_price'); self::$catalogMeasure = $USER->CanDoOperation('catalog_measure'); self::$catalogDiscount = $USER->CanDoOperation('catalog_discount'); self::$catalogVat = $USER->CanDoOperation('catalog_vat'); self::$catalogExtra = $USER->CanDoOperation('catalog_extra'); self::$catalogStore = $USER->CanDoOperation('catalog_store'); self::$catalogExportEdit = $USER->CanDoOperation('catalog_export_edit'); self::$catalogExportExec = $USER->CanDoOperation('catalog_export_exec'); self::$catalogImportEdit = $USER->CanDoOperation('catalog_import_edit'); self::$catalogImportExec = $USER->CanDoOperation('catalog_import_exec'); CCatalogAdmin::OnBuildSaleMenuItem($arModuleMenu); }