Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sort order of attributes


SweTrading

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...