Guest Posted July 5, 2005 Share Posted July 5, 2005 I would like my categories and products within categories to be alphabetical like the 2.x had. How can I fix this please? Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted July 5, 2005 Share Posted July 5, 2005 If you know a bit about PHP, you can track down the relevant SQL queries (I think in the files in includes/content) and at the end of the SQL queries add " ORDER BY name" for products and " ORDER BY cat_name" for categories. Quote Link to comment Share on other sites More sharing options...
Guest OD-UNICRON Posted July 5, 2005 Share Posted July 5, 2005 (I think in the files in includes/content)ok I see this folder, but what file? Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted July 6, 2005 Share Posted July 6, 2005 This really is just a hack. I expect eventually brooky will add an option in the settings to allow you to specify how you want things ordered. But for now.... For the categories box, you would need to modify the file: includes/boxes/categories.inc.php Change this: $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0"); To this: $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0 ORDER BY cat_name ASC"); The subcategory listing is already ordered alphabetically (includes/content/viewCat.inc.php). For the product listing, you would need to modify the file: includes/content/viewCat.inc.php Change this: $productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE ".$glob['dbprefix']."CubeCart_cats_idx.cat_id = ".$db->mySQLSafe($_GET['catId']); To this: $productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE ".$glob['dbprefix']."CubeCart_cats_idx.cat_id = ".$db->mySQLSafe($_GET['catId'])." ORDER BY ".$glob['dbprefix']."CubeCart_inventory.name ASC"; Quote Link to comment Share on other sites More sharing options...
Guest Posted July 6, 2005 Share Posted July 6, 2005 Thanks very much! Both worked perfectly! :whistle: Quote Link to comment Share on other sites More sharing options...
xmasnut Posted July 6, 2005 Share Posted July 6, 2005 Thanks so much for adding your "hack". I've been waiting for that capability before setting up my shop. Guess I can get to work on it now! ;-} Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted July 6, 2005 Share Posted July 6, 2005 No worries!! Enjoy :whistle: Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted July 6, 2005 Share Posted July 6, 2005 I also put a post elsewhere with a hack/mod to allow you to order your products with newly listed items shown first. For anyone interested, its here. Quote Link to comment Share on other sites More sharing options...
Guest OD-UNICRON Posted July 7, 2005 Share Posted July 7, 2005 thanks buddy, this worked fine. :) Quote Link to comment Share on other sites More sharing options...
Guest Immortalis Posted July 9, 2005 Share Posted July 9, 2005 Will there be an admin function for this in the near future? I wish that there was a function so you also could place the categories in whatever order you want. Quote Link to comment Share on other sites More sharing options...
Guest macsobel Posted July 10, 2005 Share Posted July 10, 2005 Thanks for the help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.