diff --git a/include/controllers/default/crunchbutton/admin/orders/content.php b/include/controllers/default/crunchbutton/admin/orders/content.php index fe6affdc7..133240b3f 100644 --- a/include/controllers/default/crunchbutton/admin/orders/content.php +++ b/include/controllers/default/crunchbutton/admin/orders/content.php @@ -35,6 +35,10 @@ class Controller_admin_orders_content extends Crunchbutton_Controller_Account { if ($_REQUEST['restaurant']) { $search['restaurant'] = $_REQUEST['restaurant']; } + + if ($_REQUEST['community']) { + $search['community'] = $_REQUEST['community']; + } c::view()->orders = Order::find($search); diff --git a/include/library/Crunchbutton/Order.php b/include/library/Crunchbutton/Order.php index a53cd8965..70c512b11 100644 --- a/include/library/Crunchbutton/Order.php +++ b/include/library/Crunchbutton/Order.php @@ -300,6 +300,10 @@ class Crunchbutton_Order extends Cana_Table { $query .= ' and `order`.id_restaurant="'.$search['restaurant'].'" '; } + if ($search['community']) { + $query .= ' and `order`.id_community="'.$search['community'].'" '; + } + if ($search['order']) { $query .= ' and `order`.id_order="'.$search['order'].'" '; } diff --git a/include/views/default/crunchbutton/admin/orders/index.phtml b/include/views/default/crunchbutton/admin/orders/index.phtml index 600c63634..44f25977c 100644 --- a/include/views/default/crunchbutton/admin/orders/index.phtml +++ b/include/views/default/crunchbutton/admin/orders/index.phtml @@ -53,6 +53,24 @@ +