ESeven Posted June 6, 2007 Posted June 6, 2007 Ok I have my Product Attributes listed as addon to my products. Now is it possible to change te order they display in? Like for example now they do it in Alphabetical order and I would rather set the order. Is the a plug in for this? Or something I can change?
mTemple Posted June 6, 2007 Posted June 6, 2007 Ok I have my Product Attributes listed as addon to my products. Now is it possible to change te order they display in? Like for example now they do it in Alphabetical order and I would rather set the order. Is the a plug in for this? Or something I can change? Look for the following code in product_info.php. Note: The actual query may be different. while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $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.products_attributes_id"); In the $products_options_query, at the very end you want to make order by pa.products_attributes_id changed into order by pov.products_options_values_name If the order by does not exist you can always add it to the end of the query. Also note, that the "Select <Option Name>" will be sorted with it as well. For example if I'm doing a table color, and I have "Select Table Color" as one of the options it will also be sorted. Good luck and enjoy! :D
ESeven Posted June 6, 2007 Author Posted June 6, 2007 Well wasnt the exact thing i needed but it did point me into the right direction. Thank you for your help. I was actually trying to sort the options themselves. But thats my fault I said the Option Attributes. But never the less you did help me. Thank You very much.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.