Hi there,
I need your help to get the "Latest Orders" (on the Admin Panel) to show only the PENDING orders, and not all of them.
I found that the admin\controller\extension\dashboard\recent.php file might be involved so I edited it as follows:
$filter_data = array(
'sort' => 'o.date_added',
'order_status_id' => 1, <--- This was added by me
'order' => 'DESC',
'start' => 0,
'limit' => 5
But nothing happened, if I change the other values (eg: 'limit' => 10) it gets modified but I could not find the correct value to get what I am looking for.
Any help will be appreciated,
Thanks in advance!
I need your help to get the "Latest Orders" (on the Admin Panel) to show only the PENDING orders, and not all of them.
I found that the admin\controller\extension\dashboard\recent.php file might be involved so I edited it as follows:
$filter_data = array(
'sort' => 'o.date_added',
'order_status_id' => 1, <--- This was added by me
'order' => 'DESC',
'start' => 0,
'limit' => 5
But nothing happened, if I change the other values (eg: 'limit' => 10) it gets modified but I could not find the correct value to get what I am looking for.
Any help will be appreciated,
Thanks in advance!
Attachments
I need to list just the PENDING orders - LatestOrders.png (73.42 KiB) Viewed 1449 times
Do the filters at the side not do this?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Oh, I think you are talking about the "Sales List" and the "Order Status" filter, that is what I would like to accomplish but with the front page at the Admin Panel, where the "Latest Orders" are listed, please see the attached screenshot.
Attachments
LatestOrders2.jpg (195.63 KiB) Viewed 1422 times
Hi
Instead of order_status_id use filter_order_status_id.
example:
Instead of order_status_id use filter_order_status_id.
example:
Code: Select all
$filter_data = array(
'sort' => 'o.date_added',
'filter_order_status_id' => 1,
'order' => 'DESC',
'start' => 0,
'limit' => 5
Hi!, I tried your suggestion but it did not work.DigitCart wrote: ↑Sat Jun 25, 2022 1:19 pmHi
Instead of order_status_id use filter_order_status_id.
example:Code: Select all
$filter_data = array( 'sort' => 'o.date_added', 'filter_order_status_id' => 1, 'order' => 'DESC', 'start' => 0, 'limit' => 5
If I change the limit value (11 instead of 5) then more orders appear (with status pending and complete), so it means that settings do modify the "Latest Orders" list but I don't know which value I need to put to filter the results by the status field.
Any further idea will be appreciated.
The best place to find the value is login to your web hosting and go to phpMyAdmin select your database for the website and look for the table "prefix"order_status.
Attachments
Look for the table in your database - help.png (249.07 KiB) Viewed 1391 times
Thank you, yes, that is exactly where I took the value "order_status_id" => 1 from (because 1 is assigned to Pending status) and added it into that config file, but it seems it is being ignored no matter what value I use since also tried with different values but always got the same result, however if I change the number of rows with the value below (see the example) it does take place, so it seems that order_status_id line is being ignored (I also moved it to the bottom with no luck).
Try using:
Code: Select all
'filter_order_status_id' => 1,
Code: Select all
'order_status_id' => 1,
This is my actual config:Majnoon wrote: ↑Thu Jun 30, 2022 12:56 pmTry using:Instead:Code: Select all
'filter_order_status_id' => 1,
Code: Select all
'order_status_id' => 1,
$filter_data = array(
'sort' => 'o.date_added',
'filter_order_status_id' => 1,
'order' => 'DESC',
'start' => 0,
'limit' => 11
);
But the orders are not filtered. Could this be an issue related to 2.0.3.2?
DigiCart, thank you, you were correct, I installed OC 3.0 in a free hosting server and 'filter_order_status_id' => 1, worked like a charm (completed orders were removed, just Pendings were listed there, just as I requested)
But I'm using 2.0.3.2 with a lot of mods, upgrading it would be a headache, is there anything else I can check?
But I'm using 2.0.3.2 with a lot of mods, upgrading it would be a headache, is there anything else I can check?
By manually editing the admin\controller\extension\dashboard\recent.php file, then Ctrl+F5 a few times to check the change. This seems to be a valid method as it works when the 'limit' => 5value is changed, it automatically takes effect. Same method applied to OC 3.X and it worked.
Hi Majnoon!,
1) I went to Extensions - Modifications - clicked 'Refresh' button
2) Made a backup and then deleted the contents of /htdocs/system/storage/cache directory
3) Ctrl+F5 a couple of times with no luck, still showing the unwanted orders even on a new incognito session.
I'm not sure if there is any other step I'm missing, those are the steps I found in the knowledge base.
Thanks!
Who is online
Users browsing this forum: No registered users and 451 guests