Sort Order For Customers & Abandoned Carts

Hi guys,



I want to change the sort order for customers & abandoned carts to be sorted by default by date. How does one go about this?

Users (app/functions/fn.users.php)



replace:



$sorting = db_sort($params, $sortings, 'name', 'asc');




with



$sorting = db_sort($params, $sortings, 'date', 'desc');




Abandoned carts (app/controllers/backend/cart.php):



replace:



$sorting = db_sort($params, $sortings, 'customer', 'asc');




with



$sorting = db_sort($params, $sortings, 'date', 'desc');




(!) Not tested

This worked perfectly, except that the location for Abandoned carts is (app/controllers/backend/cart.php).



Thanks!

[quote name='Rajinder Dhiman' timestamp='1439886802' post='227049']

This worked perfectly, except that the location for Abandoned carts is (app/controllers/backend/cart.php).



Thanks!

[/quote]



Thank you. Corrected

Guys

I really need to correct the both of you. The file that you need to amend is fn.cart.php and this can be found only in the /functions folder.

Rajinder is wrong on that, you cannot find that particular code in the cart.php file

(app/controllers/backend/cart.php)

I am talking about V4.3.3 up until V4.3.8

Red Bull for you both next time.