Guest shamrock Posted January 18, 2006 Share Posted January 18, 2006 I am trying to add some product options for a product. It has both mens and women sizes so I just made two seperate options. problem is I cannot control what order those options show up under each choice and also that It always shows the options in the shopping cart. This means that when I order a jacket I get both the mens and womens sizes when doing this. Quote Link to comment Share on other sites More sharing options...
exiladler Posted January 18, 2006 Share Posted January 18, 2006 I am trying to add some product options for a product. It has both mens and women sizes so I just made two seperate options. problem is I cannot control what order those options show up under each choice and also that It always shows the options in the shopping cart. This means that when I order a jacket I get both the mens and womens sizes when doing this. Your problem is with the logic of the options, you need to set this upo as 2 separate products. It will automatically return a value for each. The only solution is to set up separate products as otherwise you will always get both options returned with the order which will confuse you. Hope that helps Quote Link to comment Share on other sites More sharing options...
Guest shamrock Posted January 18, 2006 Share Posted January 18, 2006 I am trying to add some product options for a product. It has both mens and women sizes so I just made two seperate options. problem is I cannot control what order those options show up under each choice and also that It always shows the options in the shopping cart. This means that when I order a jacket I get both the mens and womens sizes when doing this. Your problem is with the logic of the options, you need to set this upo as 2 separate products. It will automatically return a value for each. The only solution is to set up separate products as otherwise you will always get both options returned with the order which will confuse you. Hope that helps It does help some, I figured I would just have to have 2 separate products (a man's and a woman's). The other part of the problem I am having is this: A product has an option of small, med, large, xl, 2xl, etc. I would like the option drop down box to start at small, then med, then large, etc. I have not been able to figure out how it decides the order to put them in. Any suggestions? Quote Link to comment Share on other sites More sharing options...
exiladler Posted January 18, 2006 Share Posted January 18, 2006 May sound dumb, but the sort order is as far as I can tell strictly alphabetical, so numbers first, then alpha sequence. I resolved it by using leading blanks, not the neatest solution but it works. Other alternative is to use numbers: 1 - XS 2 - S 3- M 4 - L 5 - XL 6 - XXL and so on, that way you have the required sort order. Bear in mind, which you want to be the default option as you can't leave it empty. This will cause an error in the browser when they buy without selecting one. I kno the solution would be a fix to check that an option has been selected but that as far as I know, doesn't exist. Hope this Helps Peter Quote Link to comment Share on other sites More sharing options...
Guest shamrock Posted January 18, 2006 Share Posted January 18, 2006 May sound dumb, but the sort order is as far as I can tell strictly alphabetical, so numbers first, then alpha sequence. I resolved it by using leading blanks, not the neatest solution but it works. Other alternative is to use numbers: 1 - XS 2 - S 3- M 4 - L 5 - XL 6 - XXL and so on, that way you have the required sort order. Bear in mind, which you want to be the default option as you can't leave it empty. This will cause an error in the browser when they buy without selecting one. I kno the solution would be a fix to check that an option has been selected but that as far as I know, doesn't exist. Hope this Helps Peter Thank you. I will try both the leading blanks and the numbers to see which one I prefer. Quote Link to comment Share on other sites More sharing options...
Guest shamrock Posted January 19, 2006 Share Posted January 19, 2006 May sound dumb, but the sort order is as far as I can tell strictly alphabetical, so numbers first, then alpha sequence. I resolved it by using leading blanks, not the neatest solution but it works. Other alternative is to use numbers: 1 - XS 2 - S 3- M 4 - L 5 - XL 6 - XXL and so on, that way you have the required sort order. Bear in mind, which you want to be the default option as you can't leave it empty. This will cause an error in the browser when they buy without selecting one. I kno the solution would be a fix to check that an option has been selected but that as far as I know, doesn't exist. Hope this Helps Peter Thank you. I will try both the leading blanks and the numbers to see which one I prefer. Peter---thank you thank you thank you!! The spaces idea worked great Quote Link to comment Share on other sites More sharing options...
Guest theunicorn Posted March 21, 2006 Share Posted March 21, 2006 Just wanted to say thanks also.. Was looking for a mod that would control the sort order of the options but couldn't locate anything yet. Found lots of dead links to the Mod section? Board purged lately maybe? This works though so will keep it in mind for future product option additions. Quote Link to comment Share on other sites More sharing options...
Guest massive3215 Posted March 27, 2006 Share Posted March 27, 2006 May sound dumb, but the sort order is as far as I can tell strictly alphabetical, so numbers first, then alpha sequence. I resolved it by using leading blanks, not the neatest solution but it works. Other alternative is to use numbers: 1 - XS 2 - S 3- M 4 - L 5 - XL 6 - XXL and so on, that way you have the required sort order. Bear in mind, which you want to be the default option as you can't leave it empty. This will cause an error in the browser when they buy without selecting one. I kno the solution would be a fix to check that an option has been selected but that as far as I know, doesn't exist. Hope this Helps Peter I'd rather not use numbers before all of the sizes. What does he mean by "using leading blanks"? Thanks! Quote Link to comment Share on other sites More sharing options...
Guest speedbump Posted April 5, 2006 Share Posted April 5, 2006 May sound dumb, but the sort order is as far as I can tell strictly alphabetical, so numbers first, then alpha sequence. I resolved it by using leading blanks, not the neatest solution but it works. Other alternative is to use numbers: 1 - XS 2 - S 3- M 4 - L 5 - XL 6 - XXL and so on, that way you have the required sort order. Bear in mind, which you want to be the default option as you can't leave it empty. This will cause an error in the browser when they buy without selecting one. I kno the solution would be a fix to check that an option has been selected but that as far as I know, doesn't exist. Hope this Helps Peter I'd rather not use numbers before all of the sizes. What does he mean by "using leading blanks"? Thanks! If you're comfortable with editing some core files, try this: go to the directory and file: includes/content/viewProd.inc.php Open it in a text editor or Dreamweaver and scroll down to line 167 or so. You should see this: // $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"; You can then change the "option_name" to "option_id" as long as your options were entered in a sequential order. Example: // $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_id, value_name ASC"; Notice at the end of the code, I changed the "option_name" to "option_id" and it is ascending. This is typically what I do on new installations but this also has its downfalls. Like, when adding new options, it at times doesn't display properly on the cart product page. You then have to edit the id numbers in the databse. Not a great fix but at least a 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.