Post by choiceb » Thu Jan 08, 2015 11:55 pm

I'm trying to figure out if it's possible to hide the orders marked as shipped from the default view when I go to my orders. This would be similar to how "missing orders" isn't in the default view but needs to be clicked on from the dropdown list.

I don't see the need to have historical orders in the list mostly because I find myself having to scroll too often to get to some orders that haven't been shipped yet.

Is there any easy way to accomplish this?

TIA

Newbie

Posts

Joined
Fri Jul 19, 2013 11:10 pm

Post by Dhaupin » Fri Jan 09, 2015 6:00 am

Yes you need to add a bit to the sql query for listing orders. Here is a mod that hides order status ID 3 (which should be shipped) unless its chosen from the dropdown:

Code: Select all

<modification>

	<id><![CDATA[Makes store not display certain order status.]]></id>
	<version><![CDATA[1.0.0]]></version>
	<vqmver><![CDATA[2.4.1]]></vqmver>
	<author><![CDATA[Dhaupin - CreadevDotOrg]]></author>



	<!-- @GLOBAL CONTROLLER -->
	<file name="admin/model/sale/order.php">

		<operation info="make query choose all orders except missing and shipped" error="log">
			<search position="replace"><![CDATA[
				$sql .= " WHERE o.order_status_id > '0'";
			]]></search>
			<add><![CDATA[
			$sql .= " WHERE o.order_status_id > '0' && o.order_status_id != '3'";
			]]></add>
		</operation>

	</file>

</modification>

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by choiceb » Sat Jan 10, 2015 3:02 am

Perfect - this did exactly what I needed. Thank You! :)

Newbie

Posts

Joined
Fri Jul 19, 2013 11:10 pm

Post by Msb123 » Wed Oct 23, 2019 5:06 pm

really great working. i am very appreciate. keep helps peoples. they always bless you.

Newbie

Posts

Joined
Fri Sep 01, 2017 1:25 pm


Post by aktraders » Thu Mar 17, 2022 10:28 pm

This Code Not Working With me, I have added As shown in Order.php

Code: Select all

} elseif (isset($data['filter_order_status_id']) && $data['filter_order_status_id'] !== '') {
			$sql .= " WHERE o.order_status_id = '" . (int)$data['filter_order_status_id'] . "'";
		} else {
			$sql .= " WHERE o.order_status_id > '1' && o.order_status_id != '5'";

Newbie

Posts

Joined
Wed Feb 16, 2022 3:54 pm
Who is online

Users browsing this forum: No registered users and 19 guests