Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help With Assorting Alphabetically


gaspower

Recommended Posts

Hello,

 

I added to the admin/specials.php drop down box the ability to have the model number first, than name. The only issue is that it works, but model numbers are not alphabetically. How do I sort alphabetically? Here is what I changed in admin/includes/functions/geral.php,

 

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by products_model");

while ($products = tep_db_fetch_array($products_query)) {

if (!in_array($products['products_id'], $exclude)) {

$select_string .= '<option value="' . $products['products_id'] . '">' . $products['products_model'] . " - " . $products['products_name'] . ' (' . $currencies->format($products['products_price']) . ')</option>';

 

Thanks JR

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...