Changing Category Sorting
Pappashop.com Deluxe sorts its categories in alphabetical order by the category name by default. If you want to change this behavior you can do that with custom programming - or you can modify the PHP code as follows for a quick hack:
-
Open the navbar.php page in the /inc/ folder.
-
Go through the script, finding every instance of:
ORDER BY Category
and changing it to:
ORDER BY Keywords, Category
-
Save the changed file. Now your system will sort categories alphabetically by the keywords field, instead of by the category name.
-
Go in to each category, and add an ordering number to your keywords. For instance, say you want your Candles category to show up first. If you already have the keywords:
candles, votives, tapers
Just change that to:
001 candles, votives, tapers
and do the same for each category (adding 002, 003, 004, etc. to the beginning of each category's keyword field).
Notice that we used 001 instead of just 1. That's because this is a text field, not a numeric field. And text fields sort differently than numbers. So it's very important to add those zeroes to pad the number out and get the system to sort the order correctly.
After you make this change, the system will sort by keywords, so it will display whatever category has 001... in the keywords field first, then whatever category has 002... in the keywords field, then whatever category has 003..., etc.
Quick Tip: Instead of using 001, 002, 003, you might want to use 0010, 0020, 0030, etc. That way, if you later want to squeeze a new category in between the one at position 0020 and 0030, you simply have to use the number 0025.