Answer the question
In order to leave comments, you need to log in
Why sorting in Bitrix works only on the current page, but not on the entire result (during pagination)?
Pagination is enabled on the search page. Sorting of the search result works, but only on the current page. When you switch to the 2nd page, everything is sorted there only for this page. Is it possible to sort the entire result at once?
$arParams["ELEMENT_SORT_FIELD"] = "CATALOG_PRICE_".$codepr;
$APPLICATION->IncludeComponent(
"bitrix:catalog.section",
"",
array(
"ELEMENT_SORT_FIELD" => $arParams["ELEMENT_SORT_FIELD"],
"ELEMENT_SORT_ORDER" => $arParams["ELEMENT_SORT_ORDER"],
"ELEMENT_SORT_FIELD2" => $arParams["ELEMENT_SORT_FIELD2"],
"ELEMENT_SORT_ORDER2" => $arParams["ELEMENT_SORT_ORDER2"],
...
<?=$APPLICATION->ShowViewContent("search_pagination");?>
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