kuzz Posted March 3, 2006 Share Posted March 3, 2006 Hello, I'm just looking for some help in sorting the lists for my product's attributes, like colors, sizes, etc. in alpha or numerical order. I've gone through some contributions such as Product Attribute Sort 1.2 but it doesn't work well and is very tedious. Can anyone make any recommendations on a good way to sort these? I've skimmed through the forum and contributions but there is so much information it's taking me hours and nothing helps. I appreciate any information, thanks. Joel Quote Link to comment Share on other sites More sharing options...
Jos Medinger Posted March 3, 2006 Share Posted March 3, 2006 Here's a very quick fix - don't know if it'll help you - but it has done me! The random options is because there is no sort in the default query so you are at the mercy of MYSQL. No guarantee of any sort sequence. To sort by the "options_value_id" field add the sort field to the query in catalog/product_info.php Change 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 from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'"); to 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 from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' order by pa.options_values_id"); Quote =============== Simple yet Creative Get Online Web Design : getonlinedesign.com =============== Link to comment Share on other sites More sharing options...
kuzz Posted March 3, 2006 Author Share Posted March 3, 2006 Thanks, I tried that but it didn't change anything. Quote Link to comment Share on other sites More sharing options...
Jos Medinger Posted March 3, 2006 Share Posted March 3, 2006 Joel Can you clarify what is out of order - is it in the admin section or on the actual page - can you give us a URL as an example? Thanks Jos Quote =============== Simple yet Creative Get Online Web Design : getonlinedesign.com =============== Link to comment Share on other sites More sharing options...
kuzz Posted March 3, 2006 Author Share Posted March 3, 2006 Of course, if you goto:http://www.chefscloset.com/catalog/product_info.php?cPath=21&products_id=29 look at the size, I want it to be, XS, S, M, etc, instead it's the complete opposite. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.