Guest Sal W Posted February 8, 2007 Share Posted February 8, 2007 Hiya I know that there are mods on cubecart.org to change the categories display to alphabetical but I just need to re-order them (not alphabetically) - is there a mod to do this? I have checked and checked and cannot find one. If there is one please could you tell me the name of it so I can do a search for it OR is there another way around this? Thank you very much! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 8, 2007 Share Posted February 8, 2007 On cc.org go to the members list and search for Sir William. On his website he has the category re-order mod which I believe is the one you are looking for! :D Quote Link to comment Share on other sites More sharing options...
Guest Sal W Posted February 8, 2007 Share Posted February 8, 2007 On cc.org go to the members list and search for Sir William. On his website he has the category re-order mod which I believe is the one you are looking for! Ah found it, can't use it though because I need a free one, oh well back to the drawing board! Thanks though for the help, much appreciated! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 8, 2007 Share Posted February 8, 2007 Not sure if there are any free mods Why do you need a free one? I don't think it's that expensive but I guess it depends how much you require the ability to re-order categories :D Quote Link to comment Share on other sites More sharing options...
Guest Sal W Posted February 8, 2007 Share Posted February 8, 2007 Not sure if there are any free mods Why do you need a free one? I don't think it's that expensive but I guess it depends how much you require the ability to re-order categories Actually it depends on the fact that I have zero money at the moment after being burgled last week. :D Quote Link to comment Share on other sites More sharing options...
Guest Posted February 8, 2007 Share Posted February 8, 2007 Sorry to hear that. Quote Link to comment Share on other sites More sharing options...
roban Posted February 8, 2007 Share Posted February 8, 2007 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"; Quote Link to comment Share on other sites More sharing options...
markscarts Posted February 8, 2007 Share Posted February 8, 2007 Robert has posted again a solution for alphabetizing cats, I will post again the solution for placing them as you want them. I agree with subten that commercial mods are worthwhile, depending on how much you value your own time and how skillful you are at making your own mods. I purchase mods regularly, and I am not wealthy. But, there is always a way to do it yourself. If you want to change the order to have them appear in a specific order that you set, then you only need to understand that they are listed by cat id order in CubeCart - if you do not apply any of the alphabetizing mods. To re-arrange the order listed, you only need to change the id for the cats. Use phpMyAdmin to edit your database. Browse the table, CubeCart_categories and look for the cat_id column. Change the numbers to reflect the order you desire. Your categories are displayed according to this numerical order. So you see, changing to a custom order is not difficult. However, it requires that you fiddle directly with the mySQL database. Be sure to backup the database before doing this, as you and only you will be responsible for any loss of data. Please note that this solution HAS been posted before in these forums, by me and others, and could be found with a little digging through search returns. Also, note that the mod mentioned above by subten allows easy sorting through admin screens, as well as sorting product listings, etc. and is a very robust program for little money, IMO. I have no interest in selling it and am not really pushing it, except that some people are fearful of fiddling with the database and admittedly, making mistakes with the database can create more problems. Hope this helps, Mark Quote Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2007 Share Posted February 14, 2007 Another option would be to add a category image for each one, and name each image with a number or letter reflecting the order you want (asc or desc). Then change the text as shown in RED. (includes/boxes/categories.inc.php.). So if your cat images are called: 012-categoryA.jpg 018-categoryB.jpg.... The will be in that order. +-------------------------------------------------------------------------- | categories.inc.php | ======================================== | Categories Box +-------------------------------------------------------------------------- */ if (ereg(".inc.php",$HTTP_SERVER_VARS['PHP_SELF'])) { echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>"; exit; } // query database $results = $db->select("SELECT cat_name, cat_id FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = 0 ORDER BY cat_image ASC"); Quote Link to comment Share on other sites More sharing options...
Guest taylor Posted March 15, 2007 Share Posted March 15, 2007 If your product codes are not especially meaningful... you can have control over the exact category page product order by updating the viewCat include file to sort asc or dsc by product code. So if asc by code, then the product you want to be first could be code 1000, second 2000 (or any number 1001 or higher), and so on. Quote Link to comment Share on other sites More sharing options...
markscarts Posted March 22, 2007 Share Posted March 22, 2007 Always more than one way to skin the cat :D Quote Link to comment Share on other sites More sharing options...
Guest kaskudoo Posted March 26, 2007 Share Posted March 26, 2007 very interesting guys ...... its like having your first car again, you can mod it in so many ways! Quote Link to comment Share on other sites More sharing options...
Laico Posted July 16, 2007 Share Posted July 16, 2007 Mark, thanks for the post. Like the original poster, I too need to customize the order of the product categories in the left-hand column on the homepage. So I changed the values of category.cat_id, but it had no effect upon the order of the categories. To see why this might be happening, I looked at /includes/contents/viewCat.inc.php, and saw no instances of any ordering being done using the values of category.cat_id. So it would appear that the original alphabetical ordering -- which is done in that first query, "SELECT * FROM ".$glob['dbprefix']."CubeCart_category WHERE cat_father_id = ".$db->mySQLSafe($_GET['catId'])." ORDER BY cat_name ASC" -- is not overridden later by the values of category.cat_id. Or am I looking in the wrong place? Any help on this would be appreciated, as I really would like to customize the category ordering. Quote Link to comment Share on other sites More sharing options...
Robsta Posted July 17, 2007 Share Posted July 17, 2007 Visit the third-party site, in the documentation FAQ there is info on sorting the menu. 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.