Answer the question
In order to leave comments, you need to log in
How to use different sorting of items depending on categories?
It is required, if the category has subcategories, then use sorting by views, and if this is the final category, then use the sorting set in the visual editor settings.
Sorting, as I understand it, is passed to the bitrix:catalog.section component.
In template.php in catalog.section I find out if there is a nesting like this
if(($arResult["RIGHT_MARGIN"] - $arResult["LEFT_MARGIN"]) == 1)
$arParams['ELEMENT_SORT_FIELD'] = 'id'
Answer the question
In order to leave comments, you need to log in
Approximately in the right direction you think about margins, but you need to know this before calling the component, as if the code execution sequence is consistent)) component parameters->component->component template (including the template.php file)
Is the catalog component complex?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question