This is a discussion on Product Options / Product Attributes.. pulldown sorting.? within the osCommerce 2.2 Discussion forums, part of the osCommerce 2.2 Forums category; Ive got an option, "Style", with 10 Options, 100-109, and when I insert them all the dropdown ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Ive got an option, "Style", with 10 Options, 100-109, and when I insert them all the dropdown box on the rendered page has them in random order. Is there a setting I'm missing or is this just how it works. I've tried adding the attributes in dif orders and it arranges them differently.. even if I re-add them in the original ascending order.. I'm so confused has anyone else seen this.. I just want them in ascending order 100 101,.. etc.. ive got 101 105 102 103,.. Oh.. and while I add them in the admin.. products_attributes.php page in order.. the rearrange with each update on their own.. fun. |
|
#2
| |||
| |||
| Dang. I just looked at the mysql query.. there is no order by.. so I just added that.. in product_info.php line 131: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); changed to: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.options_values_id"); I hope this helps fix my problem ;/ ill have to add more products and options. |
|
#3
| |||
| |||
| Quote:
http://www.oscommerce.com/community/contributions,1822 |
| The Following User Says Thank You to ktweezee For This Useful Post: | ||
pefc2525 (12-09-2007) | ||
|
#4
| |||
| |||
| I'm having the a similar problem. My attribute list is colours, at the moment in a random order. Can I use a modified version of the above code & display them in alphabetical order? Any help appreciated. |
|
#5
| |||
| |||
| Is anybody willing to she some light on the code, I've tried searching other php forums, no joy yet. I'm going back to trial & error. Any help appreciated. Thank You |
|
#6
| |||
| |||
| if not found in product_info.php, add to the end of the same line as above in pad_base.php ." order by pa.options_values_price, pa.products_attributes_id" my single radio options are now sorted by option_id. |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 Issues - product url for more info and sorting options | jaruss | osCommerce 2.2 Modification Help | 0 | 10-27-2005 03:41 PM |
| attributes - product options question | stevensdesign | osCMax v1.7 General Mods Discussion | 2 | 07-12-2005 12:46 PM |
| product options/attributes | jloyzaga | osCMax v1.7 Discussion | 1 | 04-13-2004 10:53 AM |
| Sorting Product attributes | kjell | osCommerce 2.2 Modification Help | 0 | 01-16-2004 04:29 AM |
| organizing display of product attributes/options | mafunk | osCommerce 2.2 Modification Help | 1 | 09-12-2003 02:27 PM |