Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Sort the order list by any column

This page is for shop administrators who work with Store > Orders, and for designers who build their own order list. Every column heading of the order list now sorts it. Before, the list could only be sorted by time or…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/features/6.0/order-list-sorting.md

On this page

Sort the order list by any column

This page is for shop administrators who work with Store > Orders, and for designers who build their own order list. Every column heading of the order list now sorts it. Before, the list could only be sorted by time or customer, through a pair of preference links above the table. Added 2026-10-01.

Use it

  1. Open Store > Orders.
  2. Click a heading: ID, customer, either total, time or status.
  3. Click the same heading again to reverse the direction.

The column and the direction are part of the address, as in the other admin lists:

/shop/orderlist/(sort)/<column>/(dir)/<asc|desc>
ColumnSorts by
idorder id
customercustomer
total_ex_vattotal without VAT
total_inc_vattotal with VAT
createdtime
statusstatus

Example: /shop/orderlist/(sort)/total_inc_vat/(dir)/desc lists the largest orders first.

Paging, reloading, saving a status change and a copied link all keep the sort. Without these parameters the stored preferences decide, as before. The sort_field template variable keeps its former values, so site designs that show their own sort selector keep working.

How it works

  • eZOrder::activeSorted() sorts the whole list in the database, in one query on every database engine.
  • The totals use the same arithmetic as the order view.
  • Ties are broken by the order id, so no order appears twice across pages.
  • The columns are checked against eZOrder::sortColumnsForList().
  • The headings use the shared parts/sortheader.tpl, like the role list. In admin3 the sort arrow takes the heading's colour, so it shows on the dark heading bar; in admin4 the sorted column is readable.
  • The view is Exponential\View\Kernel\Shop\Orderlist (kernel/private/classes/views/shop/orderlist.php). Sort and direction arrive as the view's user parameters, which is why they are written (sort)/... and not as plain module parameters.

Check the code without a browser:

grep -n "sort" kernel/private/classes/views/shop/orderlist.php

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x