julia Posted February 14, 2005 Share Posted February 14, 2005 I'm about to pull my hair out.. but that is not unusual I need my product options to be displayed in a certain order on the product pages. In my admin panel, I can set a sort order in the Options Values column and also in the Products Attributes Column. I also downloaded a contribution to do this, and it doesn't seem to matter what I put in where... everything just seems to go wherever. Am I doing something wrong? Also how does sort order in the "options values" column differ from sort order in the "product attribute" section. I'm assuming that in one section you should be able to sort the order in which the values show up, and in the orther the order in which the options show on the page. Any help would be greaty apprecitated!!!!! Julie Here is a product page so you can see what I mean. http://www.noteworthyinkonline.com/shop/ca...&products_id=37 Link to comment Share on other sites More sharing options...
OceanRanch Posted February 14, 2005 Share Posted February 14, 2005 It looks like you already have a contribution installed to do the sorting. However maybe you didn't install ALL of the changes required..... The default osCommerce (out of the box) does NOT sort attributes. If all you want to do is sort the drop downs in "value" order then do the following.... Around line 147 in catalog/product_info.php is the query that returns the attribute values for the drop downs. I changed mine to sort alphabetically. The original code has no "order by" clause so you get a random return from mysql. $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 pov.products_options_values_name"); If you don't have a contribution installed then I believe most folks have used the following... http://www.oscommerce.com/community/contributions,1119 HTH Tom Link to comment Share on other sites More sharing options...
julia Posted February 14, 2005 Author Share Posted February 14, 2005 That is the contribution I installed. Good to know it should work. I'll go through all the files again and make sure I've done everything. The database is updating I think. Thanks.. Julie Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.