slopface Posted August 30, 2007 Share Posted August 30, 2007 Hi Folks, I can not get the display of the attributes to be sorted according to the values in the DB. I've modded the products_info.php with qt. pro and attrib sort. // attrib sort $products_attributes_query = tep_db_query("select count(*) as total 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 patrib.attribute_sort"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { //++++ QT Pro: Begin Changed code $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php'); $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN; $pad = new $class($products_id); echo $pad->draw(); //++++ QT Pro: End Changed Code Where do I change the code to sort the table for the attributes according to the attrib sort values? Thanks in advance, Peter Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.