Guest adeen Posted November 28, 2006 Share Posted November 28, 2006 Is it possible to order the categories menu alphabetically? I have applied a small fix which I found by searching these forums but that does not seem to have solved the problem. Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
roban Posted November 28, 2006 Share Posted November 28, 2006 Try these: (make backups first) Open /includes/contents/viewCat.inc.php Find somewhere @ line 158 $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']); Replace it with $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"; or this one: 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"); Quote Link to comment Share on other sites More sharing options...
Guest Posted November 28, 2006 Share Posted November 28, 2006 :D Thank you Roban. I had previously applied the first one which did not work but the small change in the 2nd one there seems to have done the job. ;) Quote Link to comment Share on other sites More sharing options...
magi Posted January 14, 2007 Share Posted January 14, 2007 Merci pour le conseil je viens de faire ma catégorie en ordre alphabetique j'ai pris le deuxieme chois le premier ne changeais rien. merci de votre aide. 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.