Come back 


30
Sorting the ps_mainmenu submenu categories alphabetically. Changing the code in the prestashop 1.7 version module file
Description
So that you can set alphabetical sorting under the menu categories displayed at the top of the site, I will describe the line of code that will need to be written in the php code module itself.
This refers to the most standard module “ps_mainmenu” installed in cms prestashop.
Now it is displayed under the categories in this form: that is, the list is displayed not in alphabetical order
I will describe in steps.
1) Open the ps_mainmenu module file along the path \modules\ps_mainmenu\ps_mainmenu.php
2) Find a line, I will have this line 540, where a request to get a list of categories will be executed
3) Next, we will change this line (before we write 3 more parameters) into the function getNestedCategories where the parameter will come in the function $orderBy which will build the sort query
And in the end, you get such a list in alphabetical order.