Using 1.0.8.20
Is there a way to sort the order of the Product Status's when updating an order. Currently when you click on the order status section of the order update page the status's are in an unorderded list.
Is there an easy way of soring them without changing core?
Sort order of Product Status when updating orders.
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Sort order of Product Status when updating orders.
They are sorted by orders_status_id: https://github.com/CE-PhoenixCart/Phoen ... us.php#L31
So just change that order in the database. Of course, that would be easier in a brand new store than an existing store, where you'd also have to update all uses of orders' status to match.
So just change that order in the database. Of course, that would be easier in a brand new store than an existing store, where you'd also have to update all uses of orders' status to match.
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Sort order of Product Status when updating orders.
I've not tried, but I wonder if the file to which Matt links, could be overridden?
Then change sort by ID to sort by Name (in that SQL).
Then change sort by ID to sort by Name (in that SQL).
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Sort order of Product Status when updating orders.
Of course, if that (overriding the file) is doable;
Could the orders_status page be hooked to add in (eg) a Sort Order input box for each Status, then sort by Sort Order in the overridden file.
-
14Steve14
- Senior Contributor
- Posts: 923
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 17 times
- Been thanked: 103 times
Re: Sort order of Product Status when updating orders.
How does one go about over riding an admin file as I didn't think it was possible to override these files?
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Sort order of Product Status when updating orders.
Going by that help page, drop a copy of;
admin/includes/classes/order_status.php
to;
admin/includes/classes/override/order_status.php
Note you will most likely need to create the override folder.
Then change L31 in that new file so that the end bit is;
And that should do it, see if it works.
If you wanted to go the extra mile and have sort ordering, it would mean a new column in the orders_status table "sort_order" and a hook to insert an input box (and save the sort order number when editing or adding a new status).
admin/includes/classes/order_status.php
to;
admin/includes/classes/override/order_status.php
Note you will most likely need to create the override folder.
Then change L31 in that new file so that the end bit is;
Code: Select all
ORDER BY orders_status_name
If you wanted to go the extra mile and have sort ordering, it would mean a new column in the orders_status table "sort_order" and a hook to insert an input box (and save the sort order number when editing or adding a new status).
-
14Steve14
- Senior Contributor
- Posts: 923
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 17 times
- Been thanked: 103 times
Re: Sort order of Product Status when updating orders.
That does indeed work. Many thanks to everyone. yet another job ticked off the ever increasing to-do list.burt wrote: ↑Sun Mar 03, 2024 3:55 pm Going by that help page, drop a copy of;
admin/includes/classes/order_status.php
to;
admin/includes/classes/override/order_status.php
Note you will most likely need to create the override folder.
Then change L31 in that new file so that the end bit is;
And that should do it, see if it works.Code: Select all
ORDER BY orders_status_name