/youradmin/attributes_controller.php has this around line 43
PHP Code:
if ($action == 'new_cat') {
$current_category_id = (isset($_GET['current_category_id']) ? $_GET['current_category_id'] : $current_category_id);
$sql = "select ptc.*
from " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd
on ptc.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
where ptc.categories_id='" . $current_category_id . "'
order by pd.products_name";
$new_product_query = $db->Execute($sql);
$products_filter = $new_product_query->fields['products_id'];
zen_redirect(zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id));
}
and you could change
order by pd.products_name";
to
order by pd.products_id";
The same sql in different versions is repeated a couple more times, and you would want to change all of them the same.
Note that this is a non-overridable file, so keep a backup copy in a safe place (somewhere else). I haven't tested this, so it would be good to hear feedback on the idea.
Bookmarks