Adding Product Code To Default Sorting

I’ve tried to update in both tables cscart_settings_descriptions and cscart_settings_variants to sort according to “Product code” but won’t work in my 2.0.15 version. Kindly help! Attachment included.



Currently I hard code in categories.php to fix default sording as “code”




if (Registry::get('settings.General.show_products_from_subcategories') == 'Y') {
$params['subcats'] = 'Y';
}
/* added by steve 20100701 */
$params['sort_by'] = 'code';
$params['sort_order'] = 'desc'; //or $params['sort_order'] = 'asc';
/* end */
list($products, $search) = fn_get_products($params, Registry::get('settings.Appearance.products_per_page'));




it work now but all other sortings are disabled.



Anyone there to help me out? Thanks!

cscart_settings_variants.jpg

cscart_settings_descriptions.jpg

CSC changed the sorting code. Please refer to this thread for the latest mod: [url]http://forum.cs-cart.com/showthread.php?t=14820[/url]