Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Dropdowns---Sort order


funtimebodyshop35

Recommended Posts

I am adding my dropdowns for my scents and such and for some reason the sort order is backwards and out of order. The last time i did this they were in alphabetical order now they are so out of wack can someone tell me how to fix this i dont want my customers going in to order and having to search for the scents and such this is my site www.splishsplashbb.com/catalog and the drop down for now is in the bathtime delights, bubble bath/shower gel catagory and in the bubble bath 4 oz i stopped adding until i figure this out thank you

 

 

maggie

Link to comment
Share on other sites

I am adding my dropdowns for my scents and such and for some reason the sort order is backwards and out of order. The last time i did this they were in alphabetical order now they are so out of wack can someone tell me how to fix this i dont want my customers going in to order and having to search for the scents and such this is my site www.splishsplashbb.com/catalog and the drop down for now is in the bathtime delights, bubble bath/shower gel catagory and in the bubble bath 4 oz i stopped adding until i figure this out thank you

maggie

 

 

Maggie - is this drop down box from a contribution tyhat you have installed ? If so which one ?

Link to comment
Share on other sites

to sort product attributes alphabetically find in product_info.php

 

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

change to

 

$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"); //order by options values name

Link to comment
Share on other sites

that didnt work this is what i get when i replaced the code i also noticed that some of the words are not spelled the same

this is the error i get on the products

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/splishs1/public_html/catalog/includes/functions/database.php on line 99

 

my code has this

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name 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 popt.products_options_name");

 

maggie

Link to comment
Share on other sites

that didnt work this is what i get when i replaced the code i also noticed that some of the words are not spelled the same

this is the error i get on the products

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/splishs1/public_html/catalog/includes/functions/database.php on line 99

 

my code has this

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name 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 popt.products_options_name");

 

maggie

thats because you've gone and changed the wrong bit of code :rolleyes:

 

the code u should change begins "$products_options_query = tep_db_query...." not "$products_options_name_query = tep_db_query...".

 

the 2 bits of code r very similiar, the 1st bit is for displaying option names (eg size or colour), the 2nd is for displaying option values (eg small, med, large).

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...