Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to put product attrbutes in Alphabetical order


Guest

Recommended Posts

Does anyone know how to alphabetize a product attributes dropdown list? For instance, my product options list currently reads

 

b

a

c

***

y

x

w

z

 

I would like it to read

a

b

c

***

w

x

y

z

z

 

I have entered so many options and cannot possibly rearrange them manually. Can't I use php to rearrange the info alphebetically from the database? How would I do so?

Link to comment
Share on other sites

In your product_info.php on line 134, add order by pov.products_options_values_name.

 

 

$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");

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...