Arrange products by id in admin area

How to arrange products by id in backend?

In Administration > Languages, create the following language variables.



Language Variable: sort_by_product_id_asc

Language Value: Sort by Product ID: Low to High



Language Variable: sort_by_product_id_desc

Language Value: Sort by Product ID: High to Low



Open /core/fn.catalog.php.



Find:


$sorting = array(
'timestamp' => array('description' => fn_get_lang_var('date'), 'default_order' => 'desc'),
'position' => array('description' => fn_get_lang_var('default'), 'default_order' => 'asc'),
'product' => array('description' => fn_get_lang_var('name'), 'default_order' => 'asc'),
'price' => array('description' => fn_get_lang_var('price'), 'default_order' => 'asc'),
'popularity' => array('description' => fn_get_lang_var('popularity'), 'default_order' => 'desc')
);


Replace with:


$sorting = array(
'timestamp' => array('description' => fn_get_lang_var('date'), 'default_order' => 'desc'),
'position' => array('description' => fn_get_lang_var('default'), 'default_order' => 'asc'),
'product' => array('description' => fn_get_lang_var('name'), 'default_order' => 'asc'),
'price' => array('description' => fn_get_lang_var('price'), 'default_order' => 'asc'),
'popularity' => array('description' => fn_get_lang_var('popularity'), 'default_order' => 'desc'),
'product_id' => array('description' => fn_get_lang_var('product_id'), 'default_order' => 'asc')
);


Now go to Settings>Appearance

In 'Available product list sortings', check 'Sort by Product ID: Low to High' or 'Sort by Product ID: High to Low'.



You can then set 'Product list default sorting' to use 'Sort by Product ID: Low to High' - this will become the default product sort for both the admin and storefront.

Thank you StellarBytes, but I need something only in backend and ideal is to have a column with all product_id which can be clickable and sort the products asc or desc

This is possible, you need to be looking at /core/fn.catalog.php and /skins/basic/admin/views/products/manage.tpl