This is a discussion on Set order to option in product attribute within the osCMax v1.7 Installation forums, part of the osCMax v1.7 Forums category; Problem: I enter say four options for a product. Opt1, Opt2, Opt3, and Opt4. The when I go to attributes ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Problem: I enter say four options for a product. Opt1, Opt2, Opt3, and Opt4. The when I go to attributes manager I check the four option, but they don't show in the pull down version, or "radio button" in the order I entered them. Optio1 has a zero dollar value. The others have added charges and need to be in the same order (1,2,3, and 4) as when I entered them. Question: How do I fix this, or better jet how do I control the order in which these attributes appear in the pull-down window or under the option with the radio buttons. Thanks in advance. Knull |
|
#2
| |||
| |||
| I believe the file is /catalog/admin/products_attributes.php and the section that needs to be modified is: <?php } else { if (isset($HTTP_GET_VARS['option_order_by'])) { $option_order_by = $HTTP_GET_VARS['option_order_by']; } else { $option_order_by = 'products_options_id'; } ?> But I have no idea how to modify it. I would like to change this as well. Anyone with PHP coding experience know how to modify it or where/how to set that variable "option_order_by"?? |
|
#3
| |||
| |||
| I Found It! It was listed on another support site: Sort Product Options (attributes) What it does... First - sorts by price Second - if price is same (or 0), it sorts based on the order that the option was entered. File to change ... /catalog/product_info.php ******************************************** Replace this line $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 . "'"); With this line $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id 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_price, pa.products_attributes_id"); OR....... If you want to sort solely by the order the option was entered (regardless of price) instead use this: $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id 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.products_attributes_id"); |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TEXT Product Option Attribute Broken Out of the Box? | chageman | osCMax v1.7 Discussion | 1 | 09-13-2005 01:03 AM |
| How to set order of Option ID/Name for Product | joanstead | osCMax v1.7 Discussion | 0 | 05-20-2005 01:10 PM |
| product attribute text option question | SkidMark | osCMax v1.7 General Mods Discussion | 5 | 04-29-2005 10:46 AM |
| Flat fee product option / attribute | JonThePromoGuy | osCommerce 2.2 Modification Help | 0 | 01-04-2005 07:51 PM |
| Is there A Product Attribute Option Type Mod for MS2-MAX? | klyder | osCMax v1.7 General Mods Discussion | 9 | 07-10-2004 09:44 AM |