Answer the question
In order to leave comments, you need to log in
Change the conditions for sorting goods in Bitrix?
Good afternoon!
Tell me, who knows how to set up sorting by price in such a way that products without a price (the price is not indicated) are always displayed at the end of the list, regardless of whether the site user has enabled sorting by price in ascending or descending order?
Answer the question
In order to leave comments, you need to log in
<? //Если цена в виде параметра
$arParams['ELEMENT_SORT_FIELD']="PROPERTY_PRICE";
$arParams['ELEMENT_SORT_ORDER']="desc";
?>
<? // Если встроенный функционал цен
$arParams['ELEMENT_SORT_FIELD']="catalog_PRICE_1";
$arParams['ELEMENT_SORT_ORDER']="desc";
?>
<?$intSectionID = $APPLICATION->IncludeComponent(
"bitrix:catalog.section",
"",
array(
"IBLOCK_TYPE" => $arParams["IBLOCK_TYPE"],
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"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"],
..........................
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question