Trailz Posted December 22, 2002 Posted December 22, 2002 I looked all over and could not find a way to fix this how I wanted so the best way for me to get the attribute options in the order I like was to enter them in order I'd like them to appear for a item. Example Color -> Would have options I setup as red, black etc. Engine - > V6 Maker -> Honda, Toyota So inorder to make those appear on the product page in a specified order I couldn't find anywhere so entering them in order then allows a slight mod to product_info.php Find if ($products_attributes == '1') { $products_options_name = 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='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); change to if ($products_attributes == '1') { $porderby = "products_options_id" // $porderby = "products_options_name"; $products_options_name = 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='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' order by $porderby"); You can then just comment/uncomment the porderby and it will then sort by either the id or the name and if you want it the default way just comment both.
Trailz Posted December 22, 2002 Author Posted December 22, 2002 For some reason they wont like me edit my posts but there was a ; missing from the first $psortby.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.