admin customer table: define default sorting / order

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
columbo
Advanced
Posts: 124
Joined: 09 Oct 2019, 09:42

admin customer table: define default sorting / order

Post by columbo » 14 May 2020, 15:08

Hi,

I added some additional fields to my default customer table, like:

Code: Select all

'customer' => [
	'fields' => array( 'customer.status', 'customer.code', 'customer.lastname', 'customer.company', 'customer.city', 'customer.ctime' ),
],
It works fine, but how can I define a default sorting?
e.g. all customers should be ordered / sorted by customer.ctime ASC

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: admin customer table: define default sorting / order

Post by aimeos » 14 May 2020, 15:16

Changing the default sorting without user interaction is only possible if you overwrite the JQAdm customer class and add a sorting before initCriteria() here: https://github.com/aimeos/ai-admin-jqad ... d.php#L248
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply