I would like to change the sort order of the categories in the admin. Right now they show by "sort" order. I would like to have them show by the name of the category, not the sort order that will show on the website,
I would like to change the sort order of the categories in the admin. Right now they show by "sort" order. I would like to have them show by the name of the category, not the sort order that will show on the website,
If I understand the question, Admin - Configuration - Layout Settings - Categories/Products Display Sort Order
That sets the front end sort order, not the admin page sort order.
You can set the current display order in Catalog > Categories/Products > Categories/Product Display Order:[]
This will not be permanent, though; you will need to reset it each time you log in.
Thank you. Is there a way to hard code it so it's always set that way?
I presume the default value is set in the database, so you would need to find and alter that. I wouldn't try it unless you are comfortable with databases, and then only after making a full backup.
It might be in the file that handles that page... couldn't hurt to look around.
/your_admin/categories.php handles that page, and it has code that sees if there is a session setting for categories sort order, and if not, uses the default constant value, CATEGORIES_PRODUCTS_SORT_ORDER. There is no other file in the fileset that contains that exact string, so it must be set in the db.
You could probably alter the value the file uses. First you would have to find out exactly what the alternate value is, then replace the constant in this statement with that value:PHP Code:if (!isset($_SESSION['categories_products_sort_order'])) {
$_SESSION['categories_products_sort_order'] = CATEGORIES_PRODUCTS_SORT_ORDER;
}
My reading of the file is that the default value is 0 and the "sort by categories name" value is 1. I can't take more time on it now to confirm this.
Bookmarks