- Posts: 303
- Thank you received: 18
Hide All Created Orders in Cpanel and Order Listing
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
7 years 6 months ago #305047
by mojooutdoors-holden
-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.4
-- PHP version -- : 7.2
How would i go about hiding all orders with the order status "created" in the cpanel recent orders and orders listing page?
I tried using the following conditional inside the foreach loop on the 'cpanel_orders' and 'order_listing' view file:
and it hides the created orders, but the pagination and total order numbers are off. I'm sure there is probably a more elegant way to accomplish this. Any thoughts?
-- Joomla version -- : 3.9.4
-- PHP version -- : 7.2
How would i go about hiding all orders with the order status "created" in the cpanel recent orders and orders listing page?
I tried using the following conditional inside the foreach loop on the 'cpanel_orders' and 'order_listing' view file:
Code:
if ($row->order_status != 'created'){ ... }
and it hides the created orders, but the pagination and total order numbers are off. I'm sure there is probably a more elegant way to accomplish this. Any thoughts?
Please Log in or Create an account to join the conversation.
7 years 6 months ago #305051
by kyratn
Replied by kyratn on topic Hide All Created Orders in Cpanel and Order Listing
Hi,
Maybe this topic will help you? Almost similar question was answered today....
www.hikashop.com/forum/orders-management...frontend.html#305029
Thanks
Maybe this topic will help you? Almost similar question was answered today....
www.hikashop.com/forum/orders-management...frontend.html#305029
Thanks
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
- Posts: 303
- Thank you received: 18
7 years 6 months ago #305052
by mojooutdoors-holden
Replied by mojooutdoors-holden on topic Hide All Created Orders in Cpanel and Order Listing
That is a much more elegant solution to one piece of the problem. Thanks! However, this change does still does not effect the pagination numbers or number of orders displayed.
Still showing the total count (including the order status that's hidden). Probably a simple fix, but I couldn't figure out how the sort and filter part is tabulating the total orders returned.
Still showing the total count (including the order status that's hidden). Probably a simple fix, but I couldn't figure out how the sort and filter part is tabulating the total orders returned.
Please Log in or Create an account to join the conversation.
7 years 6 months ago #305076
by nicolas
Replied by nicolas on topic Hide All Created Orders in Cpanel and Order Listing
Hi,
If you want the pagination to be correct, then you'll have to modify the MySQL query which loads the orders to add your condition on the order_status.
You'll have to do that in the core files of HikaShop via FTP and you'll loose your changes when you update HikaShop.
For example, for the orders listing, it's the file components/com_hikashop/views/order/view.html.php where you can add such line:
before the line:
If you want the pagination to be correct, then you'll have to modify the MySQL query which loads the orders to add your condition on the order_status.
You'll have to do that in the core files of HikaShop via FTP and you'll loose your changes when you update HikaShop.
For example, for the orders listing, it's the file components/com_hikashop/views/order/view.html.php where you can add such line:
Code:
$filters[] = 'hk_order.order_status != \'created\'';
Code:
$this->processFilters($filters, $order, $searchMap, $orderingAccept);
Please Log in or Create an account to join the conversation.
- mojooutdoors-holden
-
Topic Author
- Offline
Less
More
- Posts: 303
- Thank you received: 18
7 years 6 months ago #305286
by mojooutdoors-holden
Replied by mojooutdoors-holden on topic Hide All Created Orders in Cpanel and Order Listing
Ah i see. Thanks for the help!
Please Log in or Create an account to join the conversation.
Time to create page: 0.258 seconds