J
J
jorshjorsh952018-04-23 15:30:37
1C-Bitrix
jorshjorsh95, 2018-04-23 15:30:37

Why doesn't sorting products by price work?

Good afternoon, the sorting of goods by price does not work in the catalog:
/catalog/index.php -> ... calling the catalog component

"ELEMENT_SORT_FIELD" => "PRICE",
"ELEMENT_SORT_ORDER" => "asc",
"ELEMENT_SORT_FIELD2" => "",
"ELEMENT_SORT_ORDER2" => "",

Why can't it work, I've already broken my whole head, I've already tried it in different ways, it still doesn't work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Musin, 2018-04-23
@vmpartner

In your case, you need to find out the price type and write something like this
"ELEMENT_SORT_FIELD" => "catalog_PRICE_1",
"ELEMENT_SORT_ORDER" => "asc",
catalog__ - by the CATALOG_FIELD field (can be PRICE - price or CURRENCY - currency) from a price with the PRICE_TYPE type (for example, catalog_PRICE_1 or CATALOG_CURRENCY_3). Starting from version 16.0.3 of the Trade catalog module, sorting by price also takes currency into account.
https://dev.1c-bitrix.ru/api_help/iblock/classes/c...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question