SweTrading Posted May 19, 2006 Share Posted May 19, 2006 Hi all I have a problem with my attributes. I need them to be sorted alphabetic A,B,C etc. Does anyone know how to fix this???. Right now the order is sorted by Products_Attributes_Id.... (I think) Regards Patrick Link to comment Share on other sites More sharing options...
MoisesZaragoza Posted May 19, 2006 Share Posted May 19, 2006 is this in the admin page or in the product info page? at the end of the day the code will be good Link to comment Share on other sites More sharing options...
SweTrading Posted May 19, 2006 Author Share Posted May 19, 2006 is this in the admin page or in the product info page? The most important is that in the frontend the attributes must come in order alphabeticly.. ps thanks for the fast reply ;) Link to comment Share on other sites More sharing options...
MoisesZaragoza Posted May 19, 2006 Share Posted May 19, 2006 Ok 1 ) BACK UP YOUR STUFF 2) look for $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); 3 Change it with $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' ORDER BY products_options_name ASC"); 4) Check your page and make sure it works 5) Thanks whom ever help you // Joke at the end of the day the code will be good Link to comment Share on other sites More sharing options...
SweTrading Posted May 19, 2006 Author Share Posted May 19, 2006 Hehehehehe T H A N K S Ill give it a try oh you php guru *smile* Link to comment Share on other sites More sharing options...
MoisesZaragoza Posted May 19, 2006 Share Posted May 19, 2006 I'm am not a guru but I hope that it works at the end of the day the code will be good Link to comment Share on other sites More sharing options...
jasonabc Posted May 19, 2006 Share Posted May 19, 2006 there are several contribuutions that do exactly this. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
SweTrading Posted May 25, 2006 Author Share Posted May 25, 2006 Wich ones Jason. Im stuck here :( Patrick Link to comment Share on other sites More sharing options...
jasonabc Posted May 25, 2006 Share Posted May 25, 2006 A search for "attribute sort" in the Contributions section brought these ones back: http://www.oscommerce.com/community/contributions,1690 http://www.oscommerce.com/community/contributions,2673 http://www.oscommerce.com/community/contributions,1822 http://www.oscommerce.com/community/contributions,2924 ;-) Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.