Answer the question
In order to leave comments, you need to log in
Bitrix: Selecting a section for a standard search page, how to implement it?
Bitrix has a "Standard search page" component. I want to customize it so that it is possible to select a search by sections.
Example: There are sections: smartphones, tablets, computers.
If you do not select a section during the search, then you should search everywhere. And if you select the smartphones section, it should search for products only from the smartphones section, and should not display products from other sections.
It looks like this:
Photo 1:
Photo 2:
I tried to do this:
<?
global $searchFilter;
$searchFilter = Array("section_id"=>"5");
?>
<?$APPLICATION->IncludeComponent("bitrix:search.page", ".default", array(
"USE_FILTER" => "Y",
"FILTER_NAME" => "searchFilter",
));?>
"section_id"=>"5"
- this is the id of the "Smartphones" section, for example. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question