protected static function initDiscountSettings() { $saleInstalled = ModuleManager::isModuleInstalled('sale'); if (self::$useSaleDiscount === null) { self::$useSaleDiscount = $saleInstalled && (string) Option::get('sale', 'use_sale_discount_only') == 'Y'; } if (self::$getPercentFromBasePrice === null) { $moduleID = $saleInstalled ? 'sale' : 'catalog'; self::$getPercentFromBasePrice = (string) Option::get($moduleID, 'get_discount_percent_from_base_price') == 'Y'; } if (self::$existCouponsManager === null) { self::$existCouponsManager = $saleInstalled; } }
public static function ClearDiscountCache($arTypes) { if (empty($arTypes) || !is_array($arTypes)) { return; } if (isset($arTypes['PRODUCT'])) { self::$arCacheProduct = array(); } if (isset($arTypes['SECTIONS'])) { self::$arCacheProductSections = array(); } if (isset($arTypes['SECTION_CHAINS'])) { self::$arCacheProductSectionChain = array(); } if (isset($arTypes['PROPERTIES'])) { self::$arCacheProductProperties = array(); } }