E
E
Evgeny Nikolaev2019-05-27 12:44:05
1C-Bitrix
Evgeny Nikolaev, 2019-05-27 12:44:05

Bitrix search module. How to make the results show products if the searched item is included in the name of the section (section)?

Hello! The question is probably close to this - How to limit the search in Bitrix only by elements, excluding sections?
Task: the bitrix search module searches now only for the information block of the catalog with goods. The elements of this directory are in sections (sections). It is required, for example, when searching for the word "lingerie" so that the result includes products in the name of the section of which includes lingerie. For example, a set of bed linen. How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2019-05-27
@nikolaevevge

In that question, you yourself gave an example of an array that is returned by the bitrix:search.page component:

Array
(
    [6197] => S1076
    [6181] => S1024
    [7345] => S1237
    [6192] => S1067
    [7455] => S1158
    [8831] => 7386
    [8830] => 7385
    [8829] => 7384
    [8828] => 7383
)

These elements describe sections:
[6197] => S1076
[6181] => S1024
[7345] => S1237
[6192] => S1067
[7455] => S1158
Make a separate request via CIblockElement::GetList to get the product IDs from these sections. Then drop the resulting IDs into the original array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question