Answer the question
In order to leave comments, you need to log in
Why does bitrix:catalog.smart.filter ignore filter settings?
Good afternoon!
There are hidden products in the catalog that do not need to be shown in the catalog listing. I added to the filter settings so that these products immediately disappear in the catalog, but nothing has changed in the filter,
for example, there are 10 products for one brand to show, and 2 hidden ones. The filter shows that there are 12 products for this brand.
And the brand is also displayed for which all products are generally hidden
. Catalog filter settings:
$arrFilter = array(
"!PROPERTY_HIDDEN_PRODUCT_VALUE" => 'Y',
);
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.smart.filter",
"",
array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"SECTION_ID" => $arCurSection['ID'],
"FILTER_NAME" => 'arrFilter',
//"PRICE_CODE" => $arParams["PRICE_CODE"],
"PRICE_CODE" => ["BASE"],
"CACHE_TYPE" => $arParams["CACHE_TYPE"],
"CACHE_TIME" => $arParams["CACHE_TIME"],
"CACHE_GROUPS" => $arParams["CACHE_GROUPS"],
"SAVE_IN_SESSION" => "N",
"FILTER_VIEW_MODE" => $arParams["FILTER_VIEW_MODE"],
"XML_EXPORT" => "Y",
"SECTION_TITLE" => "NAME",
"SECTION_DESCRIPTION" => "DESCRIPTION",
'HIDE_NOT_AVAILABLE' => $arParams["HIDE_NOT_AVAILABLE"],
"TEMPLATE_THEME" => 'black',
'CONVERT_CURRENCY' => $arParams['CONVERT_CURRENCY'],
'CURRENCY_ID' => $arParams['CURRENCY_ID'],
"SEF_MODE" => $arParams["SEF_MODE"],
"SEF_RULE" => $arResult["FOLDER"].$arResult["URL_TEMPLATES"]["smart_filter"],
"SMART_FILTER_PATH" => $arResult["VARIABLES"]["SMART_FILTER_PATH"],
"PAGER_PARAMS_NAME" => $arParams["PAGER_PARAMS_NAME"],
),
$component,
array('HIDE_ICONS' => 'Y')
);?>
Answer the question
In order to leave comments, you need to log in
does not know how by default, you need to add the Facet class for the smart filter
dev.1c-bitrix.ru/support/forum/messages/forum6/top...
In the new version of the component, the PREFILTER_NAME parameter has been added.
You can try this option
$smartPreFilter = [
"!PROPERTY_HIDDEN_PRODUCT_VALUE" => 'Y'
];
"PREFILTER_NAME" => "smartPreFilter",
According to the information on the Bitrix forum, life will soon become a little easier.
Concerning application to the PREFILTER_NAME task did not understand. If I pass the Id of products to the complex catalog in arrFilter, how can I pass them to start.filter so that the data for the filter is built only by the Id of the specified products?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question