T
T
TechNOIR2018-03-07 09:37:49
1C-Bitrix
TechNOIR, 2018-03-07 09:37:49

1C-Bitrix. How to sort products by price (ascending/descending)?

Good afternoon. Can you please tell me how to sort products by price (ascending/descending)?
Are there any examples?
Interested in the implementation of the example, let's say Citylink
5a9f88ac075c4853244267.jpeg
Thanks in advance for the answers!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2018-03-07
@shambler81

there is no regular method, you have to twist the crutch.

S
Sergey Gladyshev, 2018-03-10
@Resident234

For the component catalog.section
Parameters

"ELEMENT_SORT_FIELD" => $_SESSION['sort'] ? $_SESSION['sort'] : $arParams["ELEMENT_SORT_FIELD"],
        "ELEMENT_SORT_ORDER" => $_SESSION['order'] ? $_SESSION['order'] : $arParams["ELEMENT_SORT_ORDER"],
        "ELEMENT_SORT_FIELD2" => $arParams["ELEMENT_SORT_FIELD2"],
        "ELEMENT_SORT_ORDER2" => $arParams["ELEMENT_SORT_ORDER2"],

$_SESSION['sort'] is CATALOG_PRICE_'. [current price zone, usually BASE]
In $_SESSION['order'] - asc or desc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question