A
A
Andrey Fedorov2016-03-12 16:49:19
PHP
Andrey Fedorov, 2016-03-12 16:49:19

Sorting categories / subcategories in MI. How to do it right?

There is a database with the goods of the online store. Products are divided into categories/subcategories. From this data, the side menu and product lists are formed.
How to sort categories/subcategories/products not in sequence as they are listed in the database and not alphabetically, but as I need (there are more important categories/subcategories/products that need to be shown at the top of the list)?
The only thing I came up with was to add weights to the database and sort by weight ...
Are there more correct approaches?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Muhammad, 2016-03-12
@muhammad_97

Add an order field and sort by it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question