Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

QT. pro and attrib sort


slopface

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...