• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/base.php
  • Класс: BitrixIblockComponentBase
  • Вызов: Base::initCatalogDiscountCache
protected function initCatalogDiscountCache()
{
	if ($this->useCatalog && $this->useDiscountCache && !empty($this->elementLinks))
	{
		foreach ($this->iblockProducts as $iblock => $products)
		{
			if ($this->storage['USE_SALE_DISCOUNTS'])
			{
				CatalogDiscountDiscountManager::preloadPriceData($products, $this->storage['PRICES_ALLOW']);
				CatalogDiscountDiscountManager::preloadProductDataToExtendOrder($products, $this->getUserGroups());
			}
			else
			{
				CCatalogDiscount::SetProductSectionsCache($products);
				CCatalogDiscount::SetDiscountProductCache($products, array('IBLOCK_ID' => $iblock, 'GET_BY_ID' => 'Y'));
			}
		}
	}
}