Index: /mods/wpsg_mod_productgroups.class.php
===================================================================
--- /mods/wpsg_mod_productgroups.class.php	(revision 7268)
+++ /mods/wpsg_mod_productgroups.class.php	(revision 7269)
@@ -97,8 +97,9 @@
 		public function settings_save()
 		{
-
+			
 			$this->shop->update_option('wpsg_productgroups_page', $_REQUEST['wpsg_productgroups_page']);
 			$this->shop->update_option('wpsg_productgroups_order', $_REQUEST['wpsg_productgroups_order']);
-
+			$this->shop->update_option('wpsg_mod_productgroups_order_filter', $_REQUEST['wpsg_mod_productgroups_order_filter']);
+						
 		} // public function settings_save()
 
@@ -548,17 +549,51 @@
 		 * Gibt einen Array mit allen Produktgruppen zurÃŒck und beachtet die Ãbersetzung
 		 */
-		public function getAllProductGroups()
-		{
-
-			$arPG = $this->db->fetchAssocField("
-				SELECT
-					PG.`id`, PG.`name`
-				FROM
-					`".WPSG_TBL_PRODUCTS_GROUP."` AS PG
-				WHERE
-					PG.`deleted` != '1'
-				ORDER BY
-					PG.`name` ASC
-			", "id", "name");
+		public function getAllProductGroups($withOrder = false)
+		{
+			
+			if ($withOrder === true) {
+
+				$strQueryWHERE = "";
+				
+				if ($this->shop->get_option('wpsg_showincompleteorder') !== '1') {
+					
+					$strQueryWHERE .= " AND O.`status` != '".wpsg_q(wpsg_ShopController::STATUS_UNVOLLSTAENDIG)."' ";
+					
+				}
+				 
+				$strQuery = "
+					SELECT
+						PG.`id`, PG.`name`
+					FROM
+						`".WPSG_TBL_PRODUCTS_GROUP."` AS PG
+							LEFT JOIN `".WPSG_TBL_PRODUCTS."` AS P ON (P.`pgruppe` = PG.`id`)
+							LEFT JOIN `".WPSG_TBL_ORDERPRODUCT."` AS OP ON (OP.`p_id` = P.`id`)
+							LEFT JOIN `".WPSG_TBL_ORDER."` AS O ON (O.`id` = OP.`o_id`)
+					WHERE
+						PG.`deleted` != '1' AND
+						O.`id` > 0 
+						".$strQueryWHERE."
+					GROUP BY
+						PG.`id`
+					ORDER BY
+						PG.`name` ASC
+				";
+				 
+				$arPG = $this->db->fetchAssocField($strQuery, "id", "name");
+				
+			} else {
+				
+				$arPG = $this->db->fetchAssocField("
+					SELECT
+						PG.`id`, PG.`name`
+					FROM
+						`".WPSG_TBL_PRODUCTS_GROUP."` AS PG
+					WHERE
+						PG.`deleted` != '1'
+					ORDER BY
+						PG.`name` ASC
+				", "id", "name");
+				
+			}
 
 			if ($this->shop->isOtherLang())
Index: /views/mods/mod_productgroups/settings_edit.phtml
===================================================================
--- /views/mods/mod_productgroups/settings_edit.phtml	(revision 7268)
+++ /views/mods/mod_productgroups/settings_edit.phtml	(revision 7269)
@@ -14,2 +14,6 @@
 	'preis' => __('Preis', 'wpsg')
 ), $this->get_option('wpsg_productgroups_order'), array('help' => 'wpsg_mod_productgroups_order')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_productgroups_order_filter', __('Filter in Bestellverwaltung aktivieren', 'wpsg'), $this->get_option('wpsg_mod_productgroups_order_filter')); ?>
Index: /views/order/index.phtml
===================================================================
--- /views/order/index.phtml	(revision 7268)
+++ /views/order/index.phtml	(revision 7269)
@@ -54,5 +54,5 @@
 						<?php } */ ?>
 						
-						<?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
+						<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
 						
 							<?php $arProductgroups = $this->callMod('wpsg_mod_productgroups', 'getAllProductGroups'); ?>
@@ -185,5 +185,23 @@
     
     <div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
-
+	
+	<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { $arPG = $this->callMod('wpsg_mod_productgroups', 'getAllProductGroups', [true]); ?>
+
+		<div class="container-fluid">
+			<div class="row">
+				<div class="pagination_wrap wpsg_status_link_wrap">
+		
+					<ul class="pagination">
+						<?php foreach ($arPG as $pg_id => $pg_name) { ?>
+							<li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productgroup_id']) == $pg_id)?'active':''); ?>"><a href="#" onclick="return wpsg_setFilterProductgroup('<?php echo $pg_id; ?>');"><?php echo $pg_name; ?></a></li>
+						<?php } ?>
+					</ul>
+		
+				</div>
+			</div>
+		</div>
+		
+	<?php } ?>
+	
 	<div class="pagination_wrap wpsg_status_link_wrap">
 
@@ -406,5 +424,18 @@
 
     }
-
+	
+	<?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
+    function wpsg_setFilterProductgroup(pgroup_id) {
+
+		jQuery('#filterproductgroup_id').val(pgroup_id);
+
+		jQuery('#seite').val(1);
+		jQuery('#filter_form').submit();
+
+		return false;
+    	
+	}
+	<?php } ?>
+    
 	function wpsg_setFilterStatus(state)
 	{
