RE: Product Attributes
Kowdog <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.features |
|---|---|
| Message-ID | <d57f9a9933b238bb00b9b49f28b4f7eb@osCommerce-Forums> |
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=162367#162367
----------------------------------------------------------------
In catalog/products_info.php you will find the select statement at about line 366 or thereabouts.
What you will want to do is to add an order by clause to the select statement. I modified mine to display "No Thanks" as the default selection. The "No Thanks" attribute has a options_value_price of 0.00, therefore it will always come up as the first select option.
You would probably just want to use order by pov.products_options_values_id
Here is the modified code:
$products_options = 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 = '" . $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' order by pa.options_values_price asc");