Monday, March 25, 2013

How To Put Prestashop Category List In Alphabetical Order

How To Put Prestashop Category List In Alphabetical Order

In prestashop when new categories are added to the multi-level navigation blocks, they are placed at the end position of the list which makes it look quite messy. So to sort all the categories in alphabetical order we need to do the following:

In the file modules/blocklayered/blocklayered.php change this line:
GROUP BY c.id_category ORDER BY c.nleft, c.position';

To this one:
GROUP BY c.id_category ORDER BY cl.name ASC, c.nleft, c.position';


No comments:

Post a Comment

I just got my #domain @BigRock. Get upto 25% off with my personalized coupon link Get upto 25% off