I
I
IliaMal2020-11-02 06:38:56
1C-Bitrix
IliaMal, 2020-11-02 06:38:56

How to implement unique sorting for all sections?

Hello.

There are many sections on the women's clothing website. Each section has its own unique sorting.
At the moment, it is implemented in such a way that each section has its own custom field in the catalog, that is, in the properties of the goods there are "Sorting for dresses", "Sort for trousers", "Sort for office models", "Sort for sale", etc. d.
Thus, it turns out that we use an average of 3-5 sorting properties for a product, and the rest are not used.

Example:
Name Sort
Dress #1 - 1
Dress #2 - 2
Dress #3 - 3
Blouse #1 - 1
Blouse #2 - 2
Blouse #3 - 3
No problem for the Blouse and Dress sections,
For example, in "Office Models" you need a trace. sorting Dress No. 2, Dress No. 3, Blouse No. 1, Dress No. 1, Blouse No. 2, Blouse No. 3 and it turns out that the built-in sorting field is no longer enough.

How can sorting be implemented to get rid of this huge list of properties?
I would like to solve this problem at the component call level, and not in result_modifier.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-11-02
Madzhugin @Suntechnic

@smilingcheater

it turns out when viewing any section, the product can have any position in the list (from your example, Dress 1 was in position 1 in the Dresses section, was in 1st place before Dress 2, and became in position 4 in the Office models section, and changed order with the Dress 2).

This is exactly what it automatically follows from this that it is necessary to have a separate sort field for each section.
Then you can come up with different ways of how exactly to implement this, but the simplest and fastest is the one that is now.
the goal is to increase the number of properties to speed up the site.

You probably meant to say reduce the number of properties to speed up the site?
But in fact, the number of properties does not greatly affect the speed, or are you struggling for hundredths of seconds during fetching? I doubt.
I would venture to suggest that you are digging in the wrong direction and that the performance problem is somewhere else.
Show exactly how you use sorting and how you switch it for sections.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question