Guest naturallyloseweight Posted February 20, 2007 Share Posted February 20, 2007 Hi the categories on the left nav. menu, how do I organise these without having to delete and put them in order manually? is there a way? www.loseweightnaturally.co.uk/store Quote Link to comment Share on other sites More sharing options...
roban Posted February 21, 2007 Share Posted February 21, 2007 It depends on how you want them ordered. If you want them in alphabetical order do this: 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"; If you want them in a custom order, Sir William has a category Order mod at cubecart.org Quote Link to comment Share on other sites More sharing options...
Guest Posted March 21, 2007 Share Posted March 21, 2007 Is it anyone that test it? the meny is still in non alphabetical order after i change the code. Kind regards Quote Link to comment Share on other sites More sharing options...
Guest degsey69 Posted March 21, 2007 Share Posted March 21, 2007 If you go into cubecart.org and the archived forums there is a free mod which arranges the catergories in alphabetical order. It does work as i have applied it to my site. Regards Degsey :D Quote Link to comment Share on other sites More sharing options...
roban Posted March 21, 2007 Share Posted March 21, 2007 ====================================== open includes/boxes/categories.inc.php ====================================== ************************************************ ** ** ** First make a back-up of the origianl file. ** ** ** ************************************************ 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...
Guest Posted March 23, 2007 Share Posted March 23, 2007 If you want them in a custom order, Sir William has a category Order mod at cubecart.org # Advertising of competitors products, related products or services with or without a link is not allowed. We are aware that there are many 3rd party modifications and services which are popular but no direct links may be posted to these in forum posts or signatures. We will only make one exception to this rule in that we will allow members to suggest that they may find the product service they require at www.cubecart.org with a search term. e.g. “You may find what you are looking for at www.cubecart.org. Search for 'SEO'” According the the rules, we are unable to mention SPECIFIC mods, but only tell people that a mod is available. If a rule is to mean something, then EVERYONE needs to follow it. Otherwise, allow us to also mention specific mods where appropriate. God knows, there have been many times I've wanted to, but was forbidden by 'the rules'. 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.