Jump to content

Product Options problems


Guest shamrock

Recommended Posts

Guest shamrock

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Guest shamrock

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Guest shamrock

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.

Link to comment
Share on other sites

Guest shamrock

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

Link to comment
Share on other sites

  • 2 months later...
Guest theunicorn

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.

Link to comment
Share on other sites

Guest massive3215

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!

Link to comment
Share on other sites

  • 2 weeks later...
Guest speedbump

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...