<?if($section['RIGHT_MARGIN'] - $section['LEFT_MARGIN'] == 1) {
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.smart.filter",
$template,
Array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"AJAX_FILTER_FLAG" => $isAjaxFilter,
"SECTION_ID" => (isset($arSection["ID"]) ? $arSection["ID"] : ''),
"FILTER_NAME" => $arParams["FILTER_NAME"],
"PRICE_CODE" => ($arParams["USE_FILTER_PRICE"] == 'Y' ? $arParams["FILTER_PRICE_CODE"] : $arParams["PRICE_CODE"]),
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"FILL_COMPACT_FILTER" => $arParams["FILL_COMPACT_FILTER"],
"CACHE_NOTES" => "",
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
"SAVE_IN_SESSION" => "N",
"XML_EXPORT" => "Y",
"SECTION_TITLE" => "NAME",
"SECTION_DESCRIPTION" => "DESCRIPTION",
"SHOW_HINTS" => $arParams["SHOW_HINTS"],
'CONVERT_CURRENCY' => $arParams['CONVERT_CURRENCY'],
'CURRENCY_ID' => $arParams['CURRENCY_ID'],
'DISPLAY_ELEMENT_COUNT' => $arParams['DISPLAY_ELEMENT_COUNT'],
"INSTANT_RELOAD" => "Y",
"VIEW_MODE" => strtolower($arTheme["FILTER_VIEW"]["VALUE"]),
"SEF_MODE" => (strlen($arResult["URL_TEMPLATES"]["smart_filter"]) ? "Y" : "N"),
"SEF_RULE" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["smart_filter"],
"SMART_FILTER_PATH" => $arResult["VARIABLES"]["SMART_FILTER_PATH"],
"HIDE_NOT_AVAILABLE" => $arParams["HIDE_NOT_AVAILABLE"],
"SORT_BUTTONS" => $arParams["SORT_BUTTONS"],
"SORT_PRICES" => $arParams["SORT_PRICES"],
"AVAILABLE_SORT" => $arAvailableSort,
"SORT" => $sort,
"SORT_ORDER" => $sort_order,
),
$component);
?>
}
?>
$arResult
Array
(
[SECTION_CODE_PATH] => elektrotovary
[SECTION_ID] => 1784
[SECTION_CODE] => elektrotovary
)
$section
Array
(
[ID] => 1784
[IBLOCK_ID] => 17
[NAME] => Электротовары
[DESCRIPTION] =>
[IBLOCK_SECTION_ID] =>
[DEPTH_LEVEL] => 1
[LEFT_MARGIN] => 1041
[RIGHT_MARGIN] => 1104
[DESCRIPTION_TYPE] => text
[UF_SECTION_DESCR] =>
$arResult
Array
(
[SECTION_CODE_PATH] => elektrotovary/kabel_i_montazh
[SECTION_ID] => 1788
[SECTION_CODE] => kabel_i_montazh
)
$section
Array
(
[ID] => 1788
[IBLOCK_ID] => 17
[NAME] => Кабель и монтаж
[DESCRIPTION] =>
[IBLOCK_SECTION_ID] => 1784
[DEPTH_LEVEL] => 2
[LEFT_MARGIN] => 1048
[RIGHT_MARGIN] => 1053
[DESCRIPTION_TYPE] => text
[UF_SECTION_DESCR] =>
[UF_OFFERS_TYPE] =>
[UF_FILTER_VIEW] =>
[UF_SECTION_TEMPLATE] =>
)
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
$this->setFrameMode(true);
use Bitrix\Main\Loader,
Bitrix\Main\ModuleManager;
Loader::includeModule("iblock");
global $arTheme, $NextSectionID, $arRegion;
$arPageParams = $arSectionFilter = $arSection = $section = array();
// get current section ID
if($arResult["VARIABLES"]["SECTION_ID"] > 0){
$arSectionFilter = array('GLOBAL_ACTIVE' => 'Y', "ID" => $arResult["VARIABLES"]["SECTION_ID"], "IBLOCK_ID" => $arParams["IBLOCK_ID"]);
}
elseif(strlen(trim($arResult["VARIABLES"]["SECTION_CODE"])) > 0){
$arSectionFilter = array('GLOBAL_ACTIVE' => 'Y', "=CODE" => $arResult["VARIABLES"]["SECTION_CODE"], "IBLOCK_ID" => $arParams["IBLOCK_ID"]);
}
if($arSectionFilter){
$section = CNextCache::CIBlockSection_GetList(array('CACHE' => array("MULTI" =>"N", "TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]))), CNext::makeSectionFilterInRegion($arSectionFilter), false, array("ID", "IBLOCK_ID", "NAME", "DESCRIPTION", "UF_SECTION_DESCR", "UF_OFFERS_TYPE", 'UF_FILTER_VIEW', $arParams["SECTION_DISPLAY_PROPERTY"], "IBLOCK_SECTION_ID", "DEPTH_LEVEL", "LEFT_MARGIN", "RIGHT_MARGIN"));
}
$typeSKU = '';
if($section){
$arSection["ID"] = $section["ID"];
$arSection["NAME"] = $section["NAME"];
$arSection["IBLOCK_SECTION_ID"] = $section["IBLOCK_SECTION_ID"];
if($section[$arParams["SECTION_DISPLAY_PROPERTY"]]){
$arDisplayRes = CUserFieldEnum::GetList(array(), array("ID" => $section[$arParams["SECTION_DISPLAY_PROPERTY"]]));
if($arDisplay = $arDisplayRes->GetNext()){
$arSection["DISPLAY"] = $arDisplay["XML_ID"];
}
}
if(strlen($section["DESCRIPTION"]))
$arSection["DESCRIPTION"] = $section["DESCRIPTION"];
if(strlen($section["UF_SECTION_DESCR"]))
$arSection["UF_SECTION_DESCR"] = $section["UF_SECTION_DESCR"];
$posSectionDescr = COption::GetOptionString("aspro.next", "SHOW_SECTION_DESCRIPTION", "BOTTOM", SITE_ID);
global $arSubSectionFilter;
$arSubSectionFilter = array(
"SECTION_ID" => $arSection["ID"],
"IBLOCK_ID" => $arParams['IBLOCK_ID'],
"ACTIVE" => "Y",
"GLOBAL_ACTIVE" => "Y",
);
$iSectionsCount = CNextCache::CIBlockSection_GetCount(array('CACHE' => array("TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]))), CNext::makeSectionFilterInRegion($arSubSectionFilter));
$catalog_available = $arParams['HIDE_NOT_AVAILABLE'];
if (!isset($arParams['HIDE_NOT_AVAILABLE']))
$catalog_available = 'N';
if ($arParams['HIDE_NOT_AVAILABLE'] != 'Y' && $arParams['HIDE_NOT_AVAILABLE'] != 'L')
$catalog_available = 'N';
if($arParams['HIDE_NOT_AVAILABLE'] == 'Y')
$catalog_available = 'Y';
$arElementFilter = array("SECTION_ID" => $arSection["ID"], "ACTIVE" => "Y", "INCLUDE_SUBSECTIONS" => $arParams["INCLUDE_SUBSECTIONS"], "IBLOCK_ID" => $arParams["IBLOCK_ID"]);
if($arParams["INCLUDE_SUBSECTIONS"] == "A")
{
$arElementFilter["INCLUDE_SUBSECTIONS"] = "Y";
$arElementFilter["SECTION_GLOBAL_ACTIVE"] = "Y";
$arElementFilter["SECTION_ACTIVE "] = "Y";
}
if($arParams['HIDE_NOT_AVAILABLE'] == 'Y')
$arElementFilter["CATALOG_AVAILABLE"] = $catalog_available;
$itemsCnt = CNextCache::CIBlockElement_GetList(array("CACHE" => array("TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]))), CNext::makeElementFilterInRegion($arElementFilter), array());