Jump to content
Masteries

[PS 1.6.1.17] Sort orders by latest status change in backoffice, not order date

Recommended Posts

For example, I select a specific status in the backoffice order page and then I would like to sort the orders by the most recent status change.

Let's say an order was made in July 20th, but there was a status change in July 25th, is there a way to sort it by that?

 

Share this post


Link to post
Share on other sites
Posted (edited)

Possible solution:

Make an override of AdminOrdersController.php located in controllers/admin. Find the line where this starts: "date_add"

add the following below that section:

            'date_upd' => array(
                'title' => $this->l('Most recent status'),
                'align' => 'text-right',
                'type' => 'datetime',
                'filter_key' => 'a!date_upd'
            ),	

This seems to be working but I'm not sure if this is entirely the correct way to do it.

Edited by Masteries (see edit history)
  • Thanks 1

Share this post


Link to post
Share on other sites
On 8/1/2019 at 1:31 AM, Masteries said:

Possible solution:

Make an override of AdminOrdersController.php located in controllers/admin. Find the line where this starts: "date_add"

add the following below that section:


            'date_upd' => array(
                'title' => $this->l('Most recent status'),
                'align' => 'text-right',
                'type' => 'datetime',
                'filter_key' => 'a!date_upd'
            ),	

This seems to be working but I'm not sure if this is entirely the correct way to do it.

Works perfectly on 1.7.5

Thanks

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More