- Posts: 52
- Thank you received: 6
Order - Filter Status - retain between sessions
4 years 4 months ago #342101
by dhusband
Order - Filter Status - retain between sessions was created by dhusband
-- HikaShop version -- : 4.6.0
-- Joomla version -- : 3.10.9
-- PHP version -- : 7.4.29
-- Browser(s) name and version -- : Firefox
I have a number of different Order statuses for different stages in the order journey. Once an order is complete, I rarely need to see it, therefore I filter to just open order status.
When you close the browser it loses what you have set the filter to and you have to work through setting all the open statuses again.
Is it possible the options set in the filter could be remembered between sessions?
Thank you
David
-- Joomla version -- : 3.10.9
-- PHP version -- : 7.4.29
-- Browser(s) name and version -- : Firefox
I have a number of different Order statuses for different stages in the order journey. Once an order is complete, I rarely need to see it, therefore I filter to just open order status.
When you close the browser it loses what you have set the filter to and you have to work through setting all the open statuses again.
Is it possible the options set in the filter could be remembered between sessions?
Thank you
David
Please Log in or Create an account to join the conversation.
4 years 4 months ago #342106
by nicolas
Replied by nicolas on topic Order - Filter Status - retain between sessions
Hi,
There is no option for that.
However, what you can do is this:
- change the line:
to:
in the file administrator/components/com_hikashop/views/order/view.html.php
- Then, open the table hikashop_config in your database and add an entry with the namekey default_order_status_on_order_listing and the value being the namekey of the order status you want to filter your orders listing by default.
That way, when you arrive on the orders listing it will be filtered by that order status by default.
We'll add that code modification on our end so that you won't loose it when you update your HikaShop.
There is no option for that.
However, what you can do is this:
- change the line:
Code:
$pageInfo->filter->filter_status = $app->getUserStateFromRequest($this->paramBase.".filter_status",'filter_status', '','array');
Code:
$pageInfo->filter->filter_status = $app->getUserStateFromRequest($this->paramBase.".filter_status",'filter_status',$config->get('default_order_status_on_order_listing', ''),'array');
- Then, open the table hikashop_config in your database and add an entry with the namekey default_order_status_on_order_listing and the value being the namekey of the order status you want to filter your orders listing by default.
That way, when you arrive on the orders listing it will be filtered by that order status by default.
We'll add that code modification on our end so that you won't loose it when you update your HikaShop.
Please Log in or Create an account to join the conversation.
4 years 4 months ago #342119
by dhusband
Replied by dhusband on topic Order - Filter Status - retain between sessions
That is brilliant.
Is possible to have multiple statuses as default? Can they be entered separated by ',' or another delimiter?
Thank you for the quick reply.
Is possible to have multiple statuses as default? Can they be entered separated by ',' or another delimiter?
Thank you for the quick reply.
Please Log in or Create an account to join the conversation.
4 years 4 months ago #342122
by nicolas
Replied by nicolas on topic Order - Filter Status - retain between sessions
Hi,
I've never tried but I don't think it would work. You can try it.
I've never tried but I don't think it would work. You can try it.
Please Log in or Create an account to join the conversation.
4 years 4 months ago #342152
by dhusband
Replied by dhusband on topic Order - Filter Status - retain between sessions
I have tried , and ;
Neither worked, a filter was applied, but not a valid one.
Is this something that could be done?
Neither worked, a filter was applied, but not a valid one.
Is this something that could be done?
Please Log in or Create an account to join the conversation.
4 years 4 months ago #342158
by nicolas
Replied by nicolas on topic Order - Filter Status - retain between sessions
Hi,
Try changing the same line of code to:
That should allow you to use the comma as a separator in the database.
Try changing the same line of code to:
Code:
$pageInfo->filter->filter_status = $app->getUserStateFromRequest($this->paramBase.".filter_status",'filter_status',explode(',',$config->get('default_order_status_on_order_listing', '')),'array');
Please Log in or Create an account to join the conversation.
4 years 4 months ago #342178
by dhusband
Replied by dhusband on topic Order - Filter Status - retain between sessions
Brilliant!
I can now clearly see my open orders as soon as I open the orders screen.
Thank you!
I can now clearly see my open orders as soon as I open the orders screen.
Thank you!
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.168 seconds