jhdesign Posted July 18, 2004 Posted July 18, 2004 I'd like to sort in ADMIN ONLY the attributes listing on the bottom. Currently it lists all set attributes by "product name" I'd like to use "Option name" as the sort field instead. Any help is appreciate. jacob
jhdesign Posted July 20, 2004 Author Posted July 20, 2004 anyone? been searching around and found nothing. It is now sorted by product name and Id like it to be sorted by Option name. tia
Mary B. Posted July 21, 2004 Posted July 21, 2004 Find this query on or abour line 640 of admin/products_attributes.php: $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name"; Change it to this: $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pa.options_id "; This will order them by the products_options_id in the products_options table. Since the options aren't in alphabetical order in the database, the display won't be in alphabetical order by product option, but at least all the items with those options will be grouped together in your list. They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. ~ Benjamin Franklin, 1759. տլ
Recommended Posts
Archived
This topic is now archived and is closed to further replies.