Guest tj&company Posted September 2, 2007 Share Posted September 2, 2007 NEVERMIND, I'VE FIGURED IT OUT. Would someone be kind enough to tell me if I can sort the Categories alphabetically after I've already created them. Looking thru the archives I found this post, instructing to replace the original code with the following $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 name ASC"; I tried it, but it did nothing to change how the catagories on my site are displayed. I also found a post saying that Sir William had a great mod to do what Im asking, but I could not find anything else about it. I would greatly appreciate some help here. Thank you www.tjisaaccompany.com Quote Link to comment Share on other sites More sharing options...
roban Posted September 2, 2007 Share Posted September 2, 2007 ====================================== open includes/boxes/categories.inc.php ====================================== About line 35 // query database $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0"); $resultsForeign = $db->select("SELECT cat_master_id as cat_id, cat_name FROM ".$glob['dbprefix']."CubeCart_cats_lang WHERE cat_lang = '".$lang_folder."'"); REPLACE WITH // query database $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0 order by cat_name"); $resultsForeign = $db->select("SELECT cat_master_id as cat_id, cat_name FROM ".$glob['dbprefix']."CubeCart_cats_lang WHERE cat_lang = '".$lang_folder."' order by cat_name"); ======================== Save, Close, Upload file ======================== 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.