- Add the following line in bold to fn.catalog.php
function fn_get_products_sorting($simple_mode = true)
{
$sorting = array(
‘position’ => array(‘description’ => fn_get_lang_var(‘default’), ‘default_order’ => ‘desc’),
‘timestamp’ => array(‘description’ => fn_get_lang_var(‘timestamp’), ‘default_order’ => ‘desc’),
‘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’)
);
- Then add a new language variable in the admin area called ‘timestamp’ and set its value to ‘Newest’.
- Change the cscart_settings table in database, find this record
(10035, ‘default_products_sorting’, ‘Appearance’, ‘’, ‘S’, ‘position’, 180, ‘Y’),
change to
(10035, ‘default_products_sorting’, ‘Appearance’, ‘’, ‘S’, ‘timestamp’, 180, ‘Y’),
- Go to admin settings > appearance > choose product sort list by “newest”.
Done! Tested under CSCart 2.1.2
great job, thanks for sharing