roban Posted September 4, 2005 Share Posted September 4, 2005 I have 6 options for tee shirts small medium large xlarge xxlarge xxxlarge Now they are displayed as: large medium small xlarge xxlarge xxxlarge I have them correct in my database but can't seem to change the order in admin/product options. They have a mind of their own. The id's are 15, 16,17,18,19,20 but display as 17,16,15,18,19,20 How can I change the order of the small, medium, large right now the default in the options box is 'large' Quote Link to comment Share on other sites More sharing options...
Guest Posted September 4, 2005 Share Posted September 4, 2005 Rob, they're in alphabetical order. You need to edit /includes/content/viewProd.inc.php On or around line 154, you'll find the following: // build sql query for product options luuuuuurvely $query = "SELECT ".$glob['dbprefix']."CubeCart_options_bot.option_id, ". $glob['dbprefix']."CubeCart_options_bot.value_id, option_price, option_symbol, value_name, option_name, assign_id FROM `". $glob['dbprefix']."CubeCart_options_bot` INNER JOIN `". $glob['dbprefix']."CubeCart_options_mid` ON ". $glob['dbprefix']."CubeCart_options_mid.value_id = ". $glob['dbprefix']."CubeCart_options_bot.value_id INNER JOIN `". $glob['dbprefix']."CubeCart_options_top` ON ". $glob['dbprefix']."CubeCart_options_bot.option_id = ". $glob['dbprefix']."CubeCart_options_top.option_id WHERE product =". $db->mySQLSafe($_GET['productId'])." ORDER BY option_name, value_name ASC";(Note, I made it multi-line to make it easier to read) At the end after the "ORDER BY", simply remove the ", value_name" (remove the comma with it). That will pull them in by the order in the database then. Hope it helps. Quote Link to comment Share on other sites More sharing options...
roban Posted September 5, 2005 Author Share Posted September 5, 2005 That did the trick. Thanks Bill, I never would have thought of that. Quote Link to comment Share on other sites More sharing options...
Guest casaic Posted September 9, 2005 Share Posted September 9, 2005 Hey all. I tried the fix mentioned above on my site as well. The order of things we no longer alphabetical, but were in random order depending on when i clicked where (odd eh?). I changed the "value_name" to say "value_id" and all went in the correct order. I would say that the only thing to pay attention to is the order in which options are added. Thanks for the suggestion. I would have never gone there. Quote Link to comment Share on other sites More sharing options...
roban Posted September 9, 2005 Author Share Posted September 9, 2005 casaic, I edited the order in my db before applying the fix. 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.