if($arParams['USE_FILTER']=='Y'){
if(CModule::IncludeModule('iblock') && COption::GetOptionString('eshop', 'catalogSmartFilter', 'Y', SITE_ID)=='Y'){
$arFilter = array(
'ACTIVE' => 'Y',
'GLOBAL_ACTIVE' => 'Y',
'IBLOCK_ID' => $arParams['IBLOCK_ID'],
);
if(strlen($arResult['VARIABLES']['SECTION_CODE'])>0){
$arFilter['=CODE'] = $arResult['VARIABLES']['SECTION_CODE'];
}
elseif($arResult['VARIABLES']['SECTION_ID']>0){
$arFilter['ID'] = $arResult['VARIABLES']['SECTION_ID'];
}
$obCache = new CPHPCache;
if($obCache->InitCache(36000, serialize($arFilter), '/iblock/catalog')){
$arCurSection = $obCache->GetVars();
}
else{
$arCurSection = array();
$dbRes = CIBlockSection::GetList(array(), $arFilter, false, array('ID'));
$dbRes = new CIBlockResult($dbRes);
if(defined('BX_COMP_MANAGED_CACHE')){
global $CACHE_MANAGER;
$CACHE_MANAGER->StartTagCache('/iblock/catalog');
if($arCurSection = $dbRes->GetNext()){
$CACHE_MANAGER->RegisterTag('iblock_id_'.$arParams['IBLOCK_ID']);
}
$CACHE_MANAGER->EndTagCache();
}
else{
if(!$arCurSection = $dbRes->GetNext())
$arCurSection = array();
}
$obCache->EndDataCache($arCurSection);
}
$APPLICATION->IncludeComponent(
"bitrix:catalog.smart.filter",
"catalog",
Array(
'IBLOCK_TYPE' => $arParams['IBLOCK_TYPE'],
'IBLOCK_ID' => $arParams['IBLOCK_ID'],
'SECTION_ID' => $arParams['SECTION_ID'],
'FILTER_NAME' => $arParams['FILTER_NAME'],
'PRICE_CODE' => $arParams['FILTER_PRICE_CODE'],
'CACHE_TYPE' => $arParams['CACHE_TYPE'],
'CACHE_TIME' => $arParams['CACHE_TIME'],
'CACHE_GROUPS' => $arParams['CACHE_GROUPS'],
'SAVE_IN_SESSION' => 'N',
'XML_EXPORT' => 'Y',
'SECTION_TITLE' => 'NAME',
'SECTION_DESCRIPTION' => 'DESCRIPTION',
'HIDE_NOT_AVAILABLE' => $arParams['HIDE_NOT_AVAILABLE'],
),
$component
);
}
}
?></div><?
?></div><?