<?
if (CModule::IncludeModule("iblock") && COption::GetOptionString("eshop", "catalogSmartFilter", "Y", SITE_ID)=="Y")
{
$arFilter = array(
"ACTIVE" => "Y",
"GLOBAL_ACTIVE" => "Y",
"IBLOCK_ID" => 2,//$arParams["IBLOCK_ID"],
);
$ii=explode("/", $APPLICATION->getCurPage());
$arFilter["=CODE"] = $ii[2];
$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(
"b1team:catalog.smart.filter",
"",
Array(
"IBLOCK_TYPE" => "tcatalog",//$arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => "2",//$arParams["IBLOCK_ID"],
"SECTION_ID" => $arCurSection["ID"],
"FILTER_NAME" => "arrFilter",//$arParams["FILTER_NAME"],
"PRICE_CODE" => array("rub"),//$arParams["PRICE_CODE"],
"CACHE_TYPE" => "A",
"CACHE_TIME" => "3600",
"CACHE_GROUPS" => "Y",
"SAVE_IN_SESSION" => "N",
"OFFERS_PROPERTY_CODE" => array("CML2_LINK"),
"IS_SEF" => "N"
),
false
); ?>
<? Global $arrFilter; ?>
<?}?>