S
S
Sergey2020-10-27 16:11:20
1C-Bitrix
Sergey, 2020-10-27 16:11:20

Bitrix I pass an array of IDs in the filter, but the output of the component has a different sorting - why?

Good afternoon.

I formed an array of element IDs and I want to set them as a filter on the component - so that bitrix:catalog.section would be displayed and displayed.
I planned - that he would output them in the same order, but he outputs them in a completely different way.

I reset the parameters: ELEMENT_SORT_FIELD and ELEMENT_SORT_ORDER = did not help.

Can you tell me what is wrong and how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Emelyanov, 2020-10-27
@oldzas

To sort by ID array:

"ELEMENT_SORT_FIELD" => "ID",
"ELEMENT_SORT_ORDER" => $arElements,

In the component, this sorting can be used since update 18.6.900 for iblock

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question