Jump to content

Order of Options


Guest bruce2005

Recommended Posts

Guest bruce2005

I have tried everything to set options order.

I am selling website templates, and have for installation 3 options.

One is none. I want that to be the default.

Adding it first don't work, adding it last dont work.

Anyone know?

Thanks

Link to comment
Share on other sites

Guest wow1111

you can find this within the viewProd.inc.php ...

// 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";

within the query the order is set...

Link to comment
Share on other sites

The most logical way to order options is by the order you enter them under the product (this is the most flexible and allows you the most control). To do this

In viewProduct.inc.php

Find :

WHERE product =".$db->mySQLSafe($_GET['productId'])." ORDER BY option_name, value_name ASC";

and

Replace with:

WHERE product =".$db->mySQLSafe($_GET['productId'])." ORDER BY value_id, value_name ASC";

hope that helps

Celtic

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...