Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change order of text options on product page


brajes

Recommended Posts

Posted

I mangaged to download and install correctly options value contribution. Text fields work fine. However the order in which I added attributes is not the order they show on products page.

I have searched forum for hours and found code below. Inserted but this has not changed order. They are still showing in alphabetical order on products page and change again on checkout.

How can I make them show in the order I added the attributes in Admin? What am I missing?

 

In product_info.php, find the following line (134 in my copy):

CODE

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

 

and at the end, change to look like this

CODE

and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_name");

 

to order by name. If you would prefer to have it ordered by attribute insertion order, change from pov.products_options_values_name to pa.products_attributes_id.

Posted

try changing

and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_name");

to

and pov.language_id = '" . (int)$languages_id . "'order by pov.products_options_values_id");

 

I have not tried this only looking at the code so back up the file first, thus if the code is wrong then you can revert to backup file.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

Thanks,

I'll give that a try tomorrow. Brain is scrambled now and almost midnight.

Hopefully success at last!

Archived

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

×
×
  • Create New...