<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("test");
?>
<?
$arElements = array(
29,
7,
11,
28,
);
global $prefilterCustom;
$prefilterCustom = array(
"=ID" => $arElements,
);
global $smartFilterCustom;
$smartFilterCustom = [];
?>
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.smart.filter",
".default",
Array(
"CACHE_TYPE" => "N",
"CONVERT_CURRENCY" => $arParams['CONVERT_CURRENCY'],
"CURRENCY_ID" => $arParams['CURRENCY_ID'],
"FILTER_NAME" => "smartFilterCustom",
"HIDE_NOT_AVAILABLE" => "Y",
"IBLOCK_ID" => "2",
"INSTANT_RELOAD" => $arParams["INSTANT_RELOAD"],
"PAGER_PARAMS_NAME" => $arParams["PAGER_PARAMS_NAME"],
"PAGE_URL" => "/testsection.php\".\"&how=r",
"PREFILTER_NAME" => "prefilterCustom",
"PRICE_CODE" => array(0=>"Интернет магазин",),
"SAVE_IN_SESSION" => "N",
"SECTION_DESCRIPTION" => "DESCRIPTION",
"SECTION_TITLE" => "NAME",
"SEF_MODE" => $arParams["SEF_MODE"],
"TEMPLATE_THEME" => $arParams["TEMPLATE_THEME"],
"XML_EXPORT" => "Y"
),
$component,
Array(
'HIDE_ICONS' => 'Y'
)
);?>
<?
global $filter4Section;
$filter4Section = array_merge($GLOBALS['prefilterCustom'], $GLOBALS['smartFilterCustom']);
echo "<pre>";
print_r($GLOBALS['smartFilterCustom']);
echo "</pre>";
?>
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.section",
".default",
Array(
"ACTION_VARIABLE" => $arParams["ACTION_VARIABLE"],
"ADD_SECTIONS_CHAIN" => "N",
"BASKET_URL" => $arParams["BASKET_URL"],
"BROWSER_TITLE" => "",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "N",
"CACHE_TIME" => $arParams["CACHE_TIME"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CONVERT_CURRENCY" => $arParams["CONVERT_CURRENCY"],
"CURRENCY_ID" => $arParams["CURRENCY_ID"],
"DETAIL_URL" => $arParams["DETAIL_URL"],
"DISPLAY_BOTTOM_PAGER" => $arParams["DISPLAY_BOTTOM_PAGER"],
"DISPLAY_COMPARE" => $arParams["DISPLAY_COMPARE"],
"DISPLAY_TOP_PAGER" => $arParams["DISPLAY_TOP_PAGER"],
"ELEMENT_SORT_FIELD" => $arParams["ELEMENT_SORT_FIELD"],
"ELEMENT_SORT_FIELD2" => $arParams["ELEMENT_SORT_FIELD2"],
"ELEMENT_SORT_ORDER" => $arParams["ELEMENT_SORT_ORDER"],
"ELEMENT_SORT_ORDER2" => $arParams["ELEMENT_SORT_ORDER2"],
"FILTER_NAME" => "filter4Section",
"HIDE_NOT_AVAILABLE" => $arParams["HIDE_NOT_AVAILABLE"],
"HIDE_NOT_AVAILABLE_OFFERS" => $arParams["HIDE_NOT_AVAILABLE_OFFERS"],
"IBLOCK_ID" => "2",
"INCLUDE_SUBSECTIONS" => "Y",
"LINE_ELEMENT_COUNT" => $arParams["LINE_ELEMENT_COUNT"],
"META_DESCRIPTION" => "",
"META_KEYWORDS" => "",
"OFFERS_CART_PROPERTIES" => $arParams["OFFERS_CART_PROPERTIES"],
"OFFERS_FIELD_CODE" => $arParams["OFFERS_FIELD_CODE"],
"OFFERS_LIMIT" => $arParams["OFFERS_LIMIT"],
"OFFERS_PROPERTY_CODE" => $arParams["OFFERS_PROPERTY_CODE"],
"OFFERS_SORT_FIELD" => $arParams["OFFERS_SORT_FIELD"],
"OFFERS_SORT_FIELD2" => $arParams["OFFERS_SORT_FIELD2"],
"OFFERS_SORT_ORDER" => $arParams["OFFERS_SORT_ORDER"],
"OFFERS_SORT_ORDER2" => $arParams["OFFERS_SORT_ORDER2"],
"PAGER_DESC_NUMBERING" => $arParams["PAGER_DESC_NUMBERING"],
"PAGER_DESC_NUMBERING_CACHE_TIME" => $arParams["PAGER_DESC_NUMBERING_CACHE_TIME"],
"PAGER_SHOW_ALL" => $arParams["PAGER_SHOW_ALL"],
"PAGER_SHOW_ALWAYS" => $arParams["PAGER_SHOW_ALWAYS"],
"PAGER_TEMPLATE" => $arParams["PAGER_TEMPLATE"],
"PAGER_TITLE" => $arParams["PAGER_TITLE"],
"PAGE_ELEMENT_COUNT" => $arParams["PAGE_ELEMENT_COUNT"],
"PRICE_CODE" => $arParams["PRICE_CODE"],
"PRICE_VAT_INCLUDE" => $arParams["PRICE_VAT_INCLUDE"],
"PRODUCT_ID_VARIABLE" => $arParams["PRODUCT_ID_VARIABLE"],
"PRODUCT_PROPERTIES" => $arParams["PRODUCT_PROPERTIES"],
"PRODUCT_PROPS_VARIABLE" => $arParams["PRODUCT_PROPS_VARIABLE"],
"PRODUCT_QUANTITY_VARIABLE" => $arParams["PRODUCT_QUANTITY_VARIABLE"],
"PROPERTY_CODE" => $arParams["PROPERTY_CODE"],
"SECTION_ID_VARIABLE" => $arParams["SECTION_ID_VARIABLE"],
"SECTION_URL" => $arParams["SECTION_URL"],
"SET_STATUS_404" => "N",
"SET_TITLE" => "N",
"SHOW_ALL_WO_SECTION" => "Y",
"SHOW_PRICE_COUNT" => $arParams["SHOW_PRICE_COUNT"],
"USE_PRICE_COUNT" => $arParams["USE_PRICE_COUNT"],
"USE_PRODUCT_QUANTITY" => $arParams["USE_PRODUCT_QUANTITY"]
),
$arResult["THEME_COMPONENT"],
Array(
'HIDE_ICONS' => 'Y'
)
);?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
Array
(
[=ID] => Array
(
[0] => 184595
...
[10] => 202081
[11] => 202279
)
[OFFERS] => Array
(
[=PROPERTY_345] => Array
(
[0] => 4703
)
)
$arElements = array(
184595,
184596,
...
202081,
202279,
);
global $prefilterCustom;
$prefilterCustom = array(
"=ID" => $arElements,
);
global $smartFilterCustom;
$smartFilterCustom = [];
$APPLICATION->IncludeComponent(
"bitrix:catalog.smart.filter",
".default",
Array(
...
"PREFILTER_NAME" => "prefilterCustom",
"FILTER_NAME" => "smartFilterCustom",
...
)
);
$APPLICATION->IncludeComponent(
"bitrix:catalog.section",
".default",
Array(
...
"FILTER_NAME" => "smartFilterCustom",
...
)
);
(function (e) {
var c = 0, d = {}, a = 0, b = {
init: function (f) {
return this.each(function () {
d = jQuery.extend({
achieveTime: 60,
loop: 0,
eventList: "touchmove blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error",
testPeriod: 10,
useMultiMode: 1,
callBack: function (g) {
console.log("Achieved!")
},
watchEvery: 1,
counter: {test: 0, achiev: 0}
}, f);
d.watchEvery *= 1000;
if (d.useMultiMode) {
b.loadMultiData()
}
if (d.counter.achiev != -1) {
e(this).bind(d.eventList, b.eventTrigger);
b.process()
}
})
}, process: function () {
d.counter.test += 1;
if (d.counter.test == d.testPeriod) {
if (a) {
a = 0;
d.counter.achiev += d.testPeriod
}
d.counter.test = 0
}
c = setTimeout(b.process, d.watchEvery);
if (d.counter.achiev >= d.achieveTime) {
if (!d.loop) {
clearTimeout(c)
}
d.counter.achiev = d.loop ? 0 : -1;
d.callBack.call(this, d)
}
if (d.useMultiMode) {
document.cookie = "activity=" + d.counter.test + "|" + d.counter.achiev + "; path=/;"
}
}, eventTrigger: function () {
a = 1
}, loadMultiData: function () {
var h = " activity=";
var g = " " + document.cookie;
if (g.length > 0) {
if (g.indexOf(h) != -1) {
offset = g.indexOf(h) + h.length;
var f = unescape(g.substring(offset, g.indexOf(";", offset) == -1 ? g.length : g.indexOf(";", offset))).split("|");
d.counter.test = parseInt(f[0]);
d.counter.achiev = parseInt(f[1]);
return;
}
}
d.counter.test = d.counter.achiev = 0
}
};
e.fn.activity = function (f) {
if (b[f]) {
return b[f].apply(this, Array.prototype.slice.call(arguments, 1))
} else {
if (typeof f === "object" || !f) {
return b.init.apply(this, arguments)
} else {
e.error("Method " + f + " does not exist on jQuery.activity")
}
}
}
})(jQuery);
Но я не предполагал, что этот фильтр затирается, думал, что делаю то же самое...