Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 5750)
+++ /controller/wpsg_OrderController.class.php	(revision 5751)
@@ -586,6 +586,19 @@
 			$this->shop->callMods('product_index_tab', array(&$this->shop->view['tabs']));
 
-			if (wpsg_isSizedArray($_REQUEST['filter'])) $this->shop->view['arFilter'] = $_REQUEST['filter'];
-			else if (wpsg_isSizedArray($_SESSION['wpsg']['backend']['order']['arFilter'])) $this->shop->view['arFilter'] = $_SESSION['wpsg']['backend']['order']['arFilter'];
+			if (wpsg_isSizedArray($_REQUEST['filter']))
+			{
+
+				$this->shop->view['hasFilter'] = true;
+				$this->shop->view['arFilter'] = $_REQUEST['filter'];
+
+			}
+			else if (wpsg_isSizedArray($_SESSION['wpsg']['backend']['order']['arFilter']))
+			{
+
+				//$this->shop->view['arFilter'] = $_SESSION['wpsg']['backend']['order']['arFilter'];
+
+			}
+
+			if (!isset($this->shop->view['arFilter']['status'])) $this->shop->view['arFilter']['status'] = '0';
 
 			foreach ($this->shop->arStatus as $status_key => $status_label)
@@ -601,9 +614,11 @@
 			}
 
-			$arFilterState = $this->shop->view['arFilter'];
+			$arFilterState = $this->shop->view['arFilter']; unset($arFilterState['status']);
 			$arFilterState['NOTstatus'] = wpsg_ShopController::STATUS_UNVOLLSTAENDIG;
 
 			$this->shop->view['arStatus'] = wpsg_array_merge(array('-1' => array('label' => __('Alle', 'wpsg'), 'count' => wpsg_Order::count($arFilterState))), $this->shop->view['arStatus']);
 
+			if ($this->shop->view['arFilter']['status'] == '-1') $this->shop->view['arFilter']['NOTstatus'] = wpsg_ShopController::STATUS_UNVOLLSTAENDIG;
+
 			$this->shop->view['countAll'] = wpsg_order::count($this->shop->view['arFilter']);
 
@@ -611,5 +626,5 @@
 
 			$this->shop->view['pages'] = ceil($this->shop->view['countAll'] / $nPerPage);
-			if ($this->shop->view['arFilter']['page'] <= 0 || $this->shop->view['arFilter']['page'] > $this->shop->view['pages']) $this->shop->view['arFilter']['page'] = 1;
+			if (!isset($this->shop->view['arFilter']['page']) || $this->shop->view['arFilter']['page'] <= 0 || $this->shop->view['arFilter']['page'] > $this->shop->view['pages']) $this->shop->view['arFilter']['page'] = 1;
 
 			$this->shop->view['arFilter']['limit'] = array(($this->shop->view['arFilter']['page'] - 1) * $nPerPage, $nPerPage);
Index: /model/wpsg_customer.class.php
===================================================================
--- /model/wpsg_customer.class.php	(revision 5750)
+++ /model/wpsg_customer.class.php	(revision 5751)
@@ -79,5 +79,5 @@
 		{
 
-			return trim($this->getFirstname().' '.$this->getName(). ' ('.$this->getNr().')');
+			return trim($this->getFirstname().' '.$this->getName());
 
 		} // public function getLabel()
@@ -315,5 +315,5 @@
 		public static function find($arFilter = array())
 		{
-			
+
 			list($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
 
@@ -338,5 +338,5 @@
 				".$strLimit."
 			";	
-			 
+
 			$arCustomerID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
 			$arReturn = array();
@@ -360,5 +360,4 @@
 			$strQueryJOIN = "";
 			$strQueryHAVING = "";
-			$strQueryORDER = " K.`id` ASC ";
 
 			$strQuerySELECT .= ",
@@ -388,4 +387,13 @@
 
 			}
+
+			if (wpsg_isSizedString($arFilter['order'], 'nr')) { $strQueryORDER = " K.`knr`, K.`vname`, K.`name` "; }
+			else if (wpsg_isSizedString($arFilter['order'], 'adress')) { $strQueryORDER = " CONCAT(K.`plz`, K.`ort`) "; }
+			else if (wpsg_isSizedString($arFilter['order'], 'status')) { $strQueryORDER = " order_count "; }
+			else $strQueryORDER = " K.`id` ";
+
+			// Richtung
+			if (wpsg_isSizedString($arFilter['ascdesc'], "DESC")) $strQueryORDER .= " DESC ";
+			else $strQueryORDER .= " ASC ";
 				
 			return array($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER);
Index: /mods/mod_customergroup/wpsg_customergroup.php
===================================================================
--- /mods/mod_customergroup/wpsg_customergroup.php	(revision 5750)
+++ /mods/mod_customergroup/wpsg_customergroup.php	(revision 5751)
@@ -51,5 +51,40 @@
 			
 		} // public static function delete($customer_group_id)
-		
+
+		public function countProducts()
+		{
+
+			return 1;
+
+		}
+
+		public static function count($arFilter = array())
+		{
+
+			list($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
+
+			$strQuery = "
+				SELECT
+					COUNT(*)
+				FROM
+					(
+						SELECT
+						  	DISTINCT CG.`id`
+						FROM
+							`".WPSG_TBL_KG."` AS CG
+							".$strQueryJOIN."
+						WHERE
+							1
+							".$strQueryWHERE." 
+						HAVING
+							1
+							".$strQueryHAVING."											
+					) AS innerSelect
+			";
+
+			return $GLOBALS['wpsg_db']->fetchOne($strQuery);
+
+		} // public static function count($arFilter = array())
+
 		/**
 		 * Gibt einen Array von Kundengruppen zurÃŒck, die auf den ÃŒbergebenen Filter passen
@@ -58,66 +93,74 @@
 		public static function find($arFilter = array())
 		{
-				
-			$strQueryWHERE = "";
-			$strQueryORDER = "";
-				
-			if (wpsg_isSizedString($arFilter['name']))
-			{
-				
-				$strQueryWHERE .= " AND KG.`name` LIKE '%".wpsg_q($arFilter['name'])."%' ";
-				
-			}
-			
-			switch (strtolower($arFilter['order']))
-			{
-				
-				case 'name': $strQueryORDER .= " KG.`name` "; break;
-				case 'customercount': $strQueryORDER .= " `customercount` "; break;
-				case 'calculation': $strQueryORDER .= " `calculation` "; break; 
-				case 'id': 
-				default: 
-					$strQueryORDER .= " KG.`id` ";
-								
-			}
-			
-			switch (strtolower($arFilter['ascdesc']))
-			{
-				
-				case 'asc': $strQueryORDER .= " ASC "; break;
-				case 'desc': 
-				default:
-					$strQueryORDER .= " DESC ";
-				
-			}
-				
+
+			list($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
+
+			$strLimit = "";
+
+			if (wpsg_isSizedArray($arFilter['limit'])) $strLimit = "LIMIT ".wpsg_q($arFilter['limit'][0]).", ".wpsg_q($arFilter['limit'][1]);
+
 			$strQuery = "
 				SELECT
-					KG.`id`,
-					(SELECT COUNT(*) FROM `".WPSG_TBL_KU."` AS K WHERE K.`group_id` = KG.`id`) AS `customercount` 
+					CG.`id`
+					".$strQuerySELECT."
 				FROM
-					`".WPSG_TBL_KG."` AS KG
+					`".WPSG_TBL_KG."` AS CG
+						".$strQueryJOIN."
 				WHERE
 					1
 					".$strQueryWHERE."
+				HAVING
+					1
+					".$strQueryHAVING."
 				ORDER BY
-					".$strQueryORDER." 
+					".$strQueryORDER."		
+				".$strLimit."
 			";
-		
-			$arCustomerGroupID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
+
+			$arCustomerID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
 			$arReturn = array();
-				
-			foreach ($arCustomerGroupID as $customer_group_id)
+
+			foreach ($arCustomerID as $customer_id)
 			{
-		
-				$oCustomerGroup = new wpsg_customergroup();
-				$oCustomerGroup->load($customer_group_id);
-				$arReturn[] = $oCustomerGroup;
-		
+
+				$arReturn[$customer_id] = self::getInstance($customer_id);
+
 			}
-				
+
 			return $arReturn;
-				
+
+
 		} // public static function find($arFilter = array())
-		
+
+		public static function getQueryParts($arFilter = array())
+		{
+
+			$strQuerySELECT = "";
+			$strQueryWHERE = "";
+			$strQueryJOIN = "";
+			$strQueryHAVING = "";
+			$strQueryORDER = "";
+
+			$strQuerySELECT .= "
+				,(SELECT COUNT(*) FROM `".WPSG_TBL_KU."` AS K WHERE K.`group_id` = CG.`id`) AS `customercount`
+			";
+
+			if (wpsg_isSizedString($arFilter['s'])) $strQueryWHERE .= " AND CG.`name` LIKE '%".wpsg_q($arFilter['s'])."%' ";
+
+			if (wpsg_isSizedString($arFilter['name'])) $strQueryWHERE .= " AND CG.`name` LIKE '%".wpsg_q($arFilter['name'])."%' ";
+
+			if (wpsg_isSizedString($arFilter['order'], 'name')) { $strQueryORDER = " CG.`name` "; }
+			else if (wpsg_isSizedString($arFilter['order'], 'customercount')) { $strQueryORDER = " `customercount` "; }
+			else if (wpsg_isSizedString($arFilter['order'], 'calculation')) { $strQueryORDER = " CG.`calculation` "; }
+			else $strQueryORDER = " CG.`id` ";
+
+			// Richtung
+			if (wpsg_isSizedString($arFilter['ascdesc'], "DESC")) $strQueryORDER .= " DESC ";
+			else $strQueryORDER .= " ASC ";
+
+			return array($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER);
+
+		}
+
 	} // class wpsg_customergroup
 
Index: /mods/mod_productgroups/wpsg_productgroup.php
===================================================================
--- /mods/mod_productgroups/wpsg_productgroup.php	(revision 5751)
+++ /mods/mod_productgroups/wpsg_productgroup.php	(revision 5751)
@@ -0,0 +1,131 @@
+<?php
+
+    /**
+     * Model fÃŒr Zugriff auf die Produktgruppen
+     */
+
+    class wpsg_productgroup extends wpsg_model
+    {
+
+        /* Statische Funktionen */
+
+        /**
+		 * ZÃ€hlt die Bestellungen anhand des Filters
+		 */
+		public static function count($arFilter)
+		{
+
+			list($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
+
+			$strQuery = "
+				SELECT
+					COUNT(*)
+				FROM
+					(
+						SELECT
+						  	DISTINCT PG.`id`
+						FROM
+							`".WPSG_TBL_PRODUCTS_GROUP."` AS PG
+							".$strQueryJOIN."
+						WHERE
+							1
+							".$strQueryWHERE." 
+						HAVING
+							1
+							".$strQueryHAVING."											
+					) AS innerSelect
+			";
+
+			return $GLOBALS['wpsg_db']->fetchOne($strQuery);
+
+		} // public static function count($arFilter)
+
+		public static function find($arFilter = array())
+		{
+
+			list($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
+
+			$strLimit = "";
+
+			if (wpsg_isSizedArray($arFilter['limit'])) $strLimit = "LIMIT ".wpsg_q($arFilter['limit'][0]).", ".wpsg_q($arFilter['limit'][1]);
+
+			$strQuery = "
+				SELECT
+					PG .`id`
+					".$strQuerySELECT."
+				FROM
+					`".WPSG_TBL_PRODUCTS_GROUP."` AS PG
+				WHERE
+					1
+					".$strQueryWHERE."
+				HAVING
+					1
+					".$strQueryHAVING."
+				ORDER BY
+					".$strQueryORDER."		
+				".$strLimit."
+			";
+
+			$arCustomerID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
+			$arReturn = array();
+
+			foreach ($arCustomerID as $customer_id)
+			{
+
+				$arReturn[$customer_id] = self::getInstance($customer_id);
+
+			}
+
+			return $arReturn;
+
+		} // public function find($arQuery = array())
+
+		public static function getQueryParts($arFilter = array())
+		{
+
+			$strQuerySELECT = "";
+			$strQueryWHERE = "";
+			$strQueryJOIN = "";
+			$strQueryHAVING = "";
+
+			$strQuerySELECT .= ",
+				(SELECT COUNT(*) FROM `".WPSG_TBL_ORDER."` AS O WHERE O.`k_id` = K.`id` AND O.`status` != '".wpsg_q(wpsg_ShopController::STATUS_UNVOLLSTAENDIG)."') AS order_count,
+				(SELECT COUNT(*) FROM `".WPSG_TBL_ORDER."` AS O WHERE O.`k_id` = K.`id` AND O.`status` = '".wpsg_q(wpsg_ShopController::STATUS_UNVOLLSTAENDIG)."') AS order_count_incomplete
+			";
+
+			if (wpsg_isSizedString($arFilter['email']))
+			{
+
+				$strQueryWHERE .= " AND K.`email` = '".wpsg_q($arFilter['email'])."' ";
+
+			}
+
+			if (wpsg_isSizedString($arFilter['s']))
+			{
+
+				$strQueryWHERE .= " 
+					AND (
+						K.`name` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+						K.`vname` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+						K.`email` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+						K.`id` = '".wpsg_q($arFilter['s'])."' OR
+						K.`knr` LIKE '%".wpsg_q($arFilter['s'])."%'
+					)
+				";
+
+			}
+
+			if (wpsg_isSizedString($arFilter['order'], 'nr')) { $strQueryORDER = " K.`knr`, K.`vname`, K.`name` "; }
+			else if (wpsg_isSizedString($arFilter['order'], 'adress')) { $strQueryORDER = " CONCAT(K.`plz`, K.`ort`) "; }
+			else if (wpsg_isSizedString($arFilter['order'], 'status')) { $strQueryORDER = " order_count "; }
+			else $strQueryORDER = " K.`id` ";
+
+			// Richtung
+			if (wpsg_isSizedString($arFilter['ascdesc'], "DESC")) $strQueryORDER .= " DESC ";
+			else $strQueryORDER .= " ASC ";
+
+			return array($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER);
+
+		} // public function getQueryParts($arFilter = array())
+
+    }
Index: /mods/wpsg_mod_customergroup.class.php
===================================================================
--- /mods/wpsg_mod_customergroup.class.php	(revision 5750)
+++ /mods/wpsg_mod_customergroup.class.php	(revision 5751)
@@ -12,5 +12,6 @@
 		var $hilfeURL = 'http://wpshopgermany.maennchen1.de/?p=13706';
 		
-		var $customerGroupPerPage = 25;
+		var $customerGroupPerPage = 1;// 25;
+		var $free = false;
 				
 		/**
@@ -228,44 +229,44 @@
 		public function indexAction()
 		{
-		
-			$arFilter = array();
-				
+
+			$nPerPage = $this->customerGroupPerPage;
+			if ($nPerPage <= 0) $nPerPage = 10;
+
+			$this->shop->view['hasFilter'] = false;
+			$this->shop->view['arFilter'] = array(
+				'order' => 'cdate',
+				'ascdesc' => 'ASC',
+				'status' => '0',
+				'page' => '1'
+			);
+
+			$this->shop->view['arData'] = array();
+			$this->shop->view['pages'] = 1;
+
 			if (wpsg_isSizedArray($_REQUEST['filter']))
 			{
-		
-				if (wpsg_isSizedString($_REQUEST['filter']['s']))
-				{
-		
-					$arFilter['name'] = $_REQUEST['filter']['s'];
-		
-				}
-		
-				$arFilter['order'] = $_REQUEST['filter']['order'];
-				$arFilter['ascdesc'] = $_REQUEST['filter']['ascdesc'];
-		
-				$this->shop->view['filter'] = $_REQUEST['filter'];
-		
-			}
-			else
-			{
-		
-				$arFilter['order'] = 'id';
-				$arFilter['ascdesc'] = 'desc';
-		
-				$this->shop->view['filter'] = $arFilter;
-		
-			}
-				
-			$this->shop->view['data'] = wpsg_customergroup::find($arFilter);
-				
-			$this->shop->view['count'] = sizeof($this->shop->view['data']);
-			if (isset($_REQUEST['seite'])) $this->shop->view['seite'] = $_REQUEST['seite']; else $this->shop->view['seite'] = 1;
-			$this->shop->view['pages'] = ceil($this->shop->view['count'] / $this->customerGroupPerPage);
-			if ($this->shop->view['seite'] <= 0 || $this->shop->view['seite'] > $this->shop->view['pages']) $this->shop->view['seite'] = 1;
-				
-			$this->shop->view['data'] = array_slice($this->shop->view['data'], ($this->shop->view['seite'] - 1) * $this->customerGroupPerPage, $this->customerGroupPerPage);
-				
+
+				$this->shop->view['arFilter'] = $_REQUEST['filter'];
+				$this->shop->view['hasFilter'] = true;
+
+			}
+			else if (wpsg_isSizedArray($_SESSION['wpsg']['backend']['customergroup']['arFilter'])) $this->shop->view['arFilter'] = $_SESSION['wpsg']['backend']['customergroup']['arFilter'];
+
+			$this->shop->view['countAll'] = wpsg_customergroup::count($this->shop->view['arFilter']);
+
+			if (wpsg_isSizedInt($_REQUEST['seite'])) $this->shop->view['arFilter']['page'] = $_REQUEST['seite'];
+
+			$this->shop->view['pages'] = ceil($this->shop->view['countAll'] / $nPerPage);
+			if ($this->shop->view['arFilter']['page'] <= 0 || $this->shop->view['arFilter']['page'] > $this->shop->view['pages']) $this->shop->view['arFilter']['page'] = 1;
+
+			$this->shop->view['arFilter']['limit'] = array(($this->shop->view['arFilter']['page'] - 1) * $nPerPage, $nPerPage);
+
+			// Filter speichern
+			$_SESSION['wpsg']['backend']['customergroup']['arFilter'] = $this->shop->view['arFilter'];
+
+			$this->shop->view['arData'] = wpsg_customergroup::find($this->shop->view['arFilter']);
+
 			$this->shop->render(WPSG_PATH_VIEW.'mods/mod_customergroup/index.phtml');
-				
+ 
 		} // public function indexAction()
 				
Index: /mods/wpsg_mod_export.class.php
===================================================================
--- /mods/wpsg_mod_export.class.php	(revision 5750)
+++ /mods/wpsg_mod_export.class.php	(revision 5751)
@@ -311,5 +311,5 @@
 				'tab_title' => __('Export', 'wpsg'),
 				'tab_icon' => 'glyphicon glyphicon-export',
-				'tab_content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/product_index_tab.phtml', false)
+				'tab_content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/order_index_tab.phtml', false)
 			);
 
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 5750)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 5751)
@@ -1636,6 +1636,17 @@
 			$this->shop->view['pages'] = 1;
 
-			if (wpsg_isSizedArray($_REQUEST['filter'])) $this->shop->view['arFilter'] = $_REQUEST['filter'];
-			else if (wpsg_isSizedArray($_SESSION['wpsg']['backend']['customer']['arFilter'])) $this->shop->view['arFilter'] = $_SESSION['wpsg']['backend']['customer']['arFilter'];
+			if (wpsg_isSizedArray($_REQUEST['filter']))
+			{
+
+				$this->shop->view['arFilter'] = $_REQUEST['filter'];
+				$this->shop->view['hasFilter'] = true;
+
+			}
+			else if (wpsg_isSizedArray($_SESSION['wpsg']['backend']['customer']['arFilter']))
+			{
+
+				//$this->shop->view['arFilter'] = $_SESSION['wpsg']['backend']['customer']['arFilter'];
+
+			}
 
 			$this->shop->view['countAll'] = wpsg_customer::count($this->shop->view['arFilter']);
@@ -1654,157 +1665,4 @@
 
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_kundenverwaltung/index.phtml');
-
-			/*
-			$strQueryWHERE = '';
-
-			if (isset($_REQUEST['s']) && $_REQUEST['s'] != '')
-			{
-				
-				$strQueryWHERE .= " 
-					AND (
-						K.`name` LIKE '%".wpsg_q($_REQUEST['s'])."%' OR
-						K.`vname` LIKE '%".wpsg_q($_REQUEST['s'])."%' OR
-						K.`email` LIKE '%".wpsg_q($_REQUEST['s'])."%' OR
-						K.`id` = '".wpsg_q($_REQUEST['s'])."' OR
-						K.`knr` LIKE '%".wpsg_q($_REQUEST['s'])."%'
-					)
-				"; 
-				
-			}
-			
-			if ($this->shop->hasMod('wpsg_mod_customergroup'))
-			{
-			
-				if (isset($_REQUEST['customergroup']) && $_REQUEST['customergroup'] > 0)
-				{
-					
-					$strQueryWHERE .= " AND `group_id` = '".wpsg_q($_REQUEST['customergroup'])."' ";
-					
-				}
-				else if (isset($_REQUEST['customergroup']) && $_REQUEST['customergroup'] === '0')
-				{
-					
-					$strQueryWHERE .= " AND (`group_id` = 0 OR `group_id` IS NULL) ";
-					
-				}
-				
-			}
-
-			$nPerPage = $this->shop->get_option('wpsg_mod_kundenverwaltung_perpage');
-			if ($nPerPage <= 0) $nPerPage = 10;
-			
-			if (isset($_REQUEST['seite'])) $seite = $_REQUEST['seite']; else $seite = 1;
-									
-			$this->shop->view['count'] = $this->db->fetchOne("
-				SELECT
-					COUNT(*) 
-				FROM
-					(
-						SELECT
-							K.`id`,
-							(SELECT COUNT(*) FROM `".WPSG_TBL_ORDER."` AS O WHERE O.`k_id` = K.`id` AND O.`status` != '".wpsg_q(wpsg_ShopController::STATUS_UNVOLLSTAENDIG)."') AS order_count,
-							(SELECT COUNT(*) FROM `".WPSG_TBL_ORDER."` AS O WHERE O.`k_id` = K.`id` AND O.`status` = '".wpsg_q(wpsg_ShopController::STATUS_UNVOLLSTAENDIG)."') AS order_count_incomplete
-						FROM	
-							`".WPSG_TBL_KU."` AS K
-						WHERE 
-							1
-							".$strQueryWHERE."
-						HAVING
-							(order_count_incomplete = 0 OR order_count > 0) 
-					) AS OUTER_TABLE
-			");
-			 		
-			$this->shop->view['seite'] = $seite;
-			$this->shop->view['pages'] = ceil($this->shop->view['count'] / $nPerPage); 			
-			if ($this->shop->view['seite'] <= 0 || $this->shop->view['seite'] > $this->shop->view['pages']) $this->shop->view['seite'] = 1;
-			 
-			if (isset($_REQUEST['filter']))
-				$this->shop->view['filter'] = $_REQUEST['filter'];
-			else
-				$this->shop->view['filter'] = array();
-			
-			$strQueryORDER = '';
-			
-			if (!isset($this->shop->view['filter']['order']))
-			{
-			
-				$this->shop->view['filter']['order'] = 'nr';
-			
-			}
-			
-			switch ($this->shop->view['filter']['order'])
-			{
-			
-				case 'name': $strQueryORDER .= "`order_name`"; break;
-				case 'adress': $strQueryORDER = "`order_adress`"; break;
-				case 'status': $strQueryORDER = "`order_count`"; break;
-				default: $strQueryORDER = " `order_nr` "; break;
-			
-			}
-			
-			if (!isset($this->shop->view['filter']['ascdesc']))
-			{
-			
-				$this->shop->view['filter']['ascdesc'] = 'DESC';
-			
-			}
-			
-			if (wpsg_isSizedString($this->shop->get_option('wpsg_order_knr'), '1')) $strQueryORDERNR = " `knr` AS `order_nr` ";
-			else $strQueryORDERNR = " CAST(`knr` AS UNSIGNED) AS `order_nr` ";
-			 
-			// Das HAVING ist so "kompliziert" weil ich erreichen wollte das Kunden die gÃ€nzlich keine Bestellungen haben denoch angezeigt werden
-			// Kunden die aber nur unvollstÃ€ndige Bestellungen haben aber nicht
-			$strQuery = "
-				SELECT
-					K.*,
-					L.`kuerzel` AS land_kuerzel,
-					CONCAT(K.`firma`, ' ', K.`strasse`, ' ', K.`plz`, ' ', K.`ort`) AS `order_adress`,
-					CONCAT(K.`vname`, ' ', K.`name`) AS `order_name`,
-					".$strQueryORDERNR.",
-					(SELECT COUNT(*) FROM `".WPSG_TBL_ORDER."` AS O WHERE O.`k_id` = K.`id` AND O.`status` != '".wpsg_q(wpsg_ShopController::STATUS_UNVOLLSTAENDIG)."') AS order_count,
-					(SELECT COUNT(*) FROM `".WPSG_TBL_ORDER."` AS O WHERE O.`k_id` = K.`id` AND O.`status` = '".wpsg_q(wpsg_ShopController::STATUS_UNVOLLSTAENDIG)."') AS order_count_incomplete,
-					(SELECT SUM(`price_gesamt`) FROM `".WPSG_TBL_ORDER."` AS O WHERE O.`k_id` = K.`id` AND O.`status` IN (100, 110)) as order_umsatz
-				FROM 
-					`".WPSG_TBL_KU."` AS K
-						LEFT JOIN `".WPSG_TBL_LAND."` AS L ON (K.`land` = L.`id`)
-				WHERE
-					1					
-					".$strQueryWHERE."
-				HAVING
-					(order_count_incomplete = 0 OR order_count > 0) 
-				ORDER BY	
-					".$strQueryORDER." ".wpsg_q($this->shop->view['filter']['ascdesc']).", K.`id` DESC 
-				LIMIT
-					".(($this->shop->view['seite'] - 1) * $nPerPage).", ".$nPerPage."
-			";
-			
-			$this->shop->view['arData'] = $this->db->fetchAssoc($strQuery);
-			 
-			// Kundengruppen laden
-			if ($this->shop->hasMod('wpsg_mod_customergroup'))
-			{
-			
-				$this->shop->view['arCustomergroup'] = $this->db->fetchAssocField("
-					SELECT
-						KG.`id`, CONCAT(KG.`name`, ' (ID:', KG.`id`, ')') AS `name`
-					FROM
-						`".WPSG_TBL_KG."` AS KG
-					ORDER BY
-						KG.`name` ASC	
-				", "id", "name");
-				
-			}
-
-			foreach ($this->shop->view['arData'] as $k => $customer_db)
-			{
-
-				$this->shop->view['arData'][$k]['oCustomer'] = new wpsg_customer();
-				$this->shop->view['arData'][$k]['oCustomer']->load($customer_db['id']);
-				$this->shop->view['arData'][$k]['order_umsatz'] = $this->shop->view['arData'][$k]['oCustomer']->getOrderAmount(array(100, 110));
-				
-			}
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_kundenverwaltung/index.phtml');
-			*/
 
 		} // private function be_indexAction()
Index: /mods/wpsg_mod_productgroups.class.php
===================================================================
--- /mods/wpsg_mod_productgroups.class.php	(revision 5750)
+++ /mods/wpsg_mod_productgroups.class.php	(revision 5751)
@@ -660,16 +660,45 @@
 		{
 
-			$this->shop->view['data'] = $this->db->fetchAssoc("
-				SELECT
-					PG.*,
-					(SELECT COUNT(*) FROM `".WPSG_TBL_PRODUCTS."` AS P WHERE P.`pgruppe` = PG.`id` AND P.`deleted` != '1') AS countProdukte
-				FROM
-					`".WPSG_TBL_PRODUCTS_GROUP."` AS PG
-				WHERE
-					PG.`deleted` != '1'
-				ORDER BY
-					PG.`id` ASC
-			");
-			
+			$nPerPage = 25;
+			if ($nPerPage <= 0) $nPerPage = 10;
+
+			$this->shop->view['hasFilter'] = false;
+			$this->shop->view['arFilter'] = array(
+				'order' => 'cdate',
+				'ascdesc' => 'ASC',
+				'status' => '0',
+				'page' => '1'
+			);
+			$this->shop->view['arData'] = array();
+			$this->shop->view['pages'] = 1;
+
+			if (wpsg_isSizedArray($_REQUEST['filter']))
+			{
+
+				$this->shop->view['arFilter'] = $_REQUEST['filter'];
+				$this->shop->view['hasFilter'] = true;
+
+			}
+			else if (wpsg_isSizedArray($_SESSION['wpsg']['backend']['customergroup']['arFilter']))
+			{
+
+				//$this->shop->view['arFilter'] = $_SESSION['wpsg']['backend']['customer']['arFilter'];
+
+			}
+
+			$this->shop->view['countAll'] = wpsg_productgroup::count($this->shop->view['arFilter']);
+
+			if (wpsg_isSizedInt($_REQUEST['seite'])) $this->shop->view['arFilter']['page'] = $_REQUEST['seite'];
+
+			$this->shop->view['pages'] = ceil($this->shop->view['countAll'] / $nPerPage);
+			if ($this->shop->view['arFilter']['page'] <= 0 || $this->shop->view['arFilter']['page'] > $this->shop->view['pages']) $this->shop->view['arFilter']['page'] = 1;
+
+			$this->shop->view['arFilter']['limit'] = array(($this->shop->view['arFilter']['page'] - 1) * $nPerPage, $nPerPage);
+
+			// Filter speichern
+			$_SESSION['wpsg']['backend']['customergroup']['arFilter'] = $this->shop->view['arFilter'];
+
+			$this->shop->view['arData'] = wpsg_customergroup::find($this->shop->view['arFilter']);
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productgroups/index.phtml');
 			
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 5750)
+++ /views/css/admin.css	(revision 5751)
@@ -8,5 +8,6 @@
 #wpsg-bs nav.navbar .active { margin-right:2px; }
 #wpsg-bs nav.navbar .glyphicon { margin-right:10px; }
-#wpsg-bs .wpsg-filter { border-top:1px solid #E0E0E0; padding-top:15px; }
+#wpsg-bs .wpsg-filter-tab,
+#wpsg-bs .wpsg-filter { border-top:1px solid #E0E0E0; padding:15px; }
 #wpsg-bs .pagination_wrap { text-align:right; padding-right:20px; }
 #wpsg-bs .pagination_wrap_bottom { padding-right:0px; }
Index: /views/mods/mod_customergroup/addedit.phtml
===================================================================
--- /views/mods/mod_customergroup/addedit.phtml	(revision 5750)
+++ /views/mods/mod_customergroup/addedit.phtml	(revision 5751)
@@ -6,158 +6,55 @@
 
 ?>
-<div class="wrap wpsg_mod_kundenverwaltung_customergroup_addedit wpsg_customergroup_view wpsg_produkt_addedit wrap columns-2">
-	<div class="icon32 icon32-posts-post" id="icon-add"><br /></div>
-	
-	<h2>
-		<?php if ($this->view['mode'] == 'edit') { ?>
-			<?php echo __('Kundengruppe bearbeiten', 'wpsg'); ?>
-		<?php } else { ?>
-			<?php echo __('Kundengruppe anlegen', 'wpsg'); ?>
-		<?php } ?>
-	</h2>
-	<br />
-	
+<div class="wpsg_customergroup wpsg_customergroup_add" id="wpsg-bs">
+
+    <nav class="navbar navbar-default">
+
+		<div class="container-fluid">
+			<div class="navbar-header">
+				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+			</div>
+			<div class="collapse navbar-collapse" id="bs-customergroup-navbar-collapse-1">
+				<ul class="nav navbar-nav">
+					<li role="presentation" class="wpsg-customergroup-tab-a"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=index"><?php echo __("Kundengruppenverwaltung", "wpsg"); ?></a></li>
+					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("HinzufÃŒgen", "wpsg"); ?></a></li>
+				</ul>
+				<ul class="nav navbar-nav navbar-right">
+
+				</ul>
+			</div>
+		</div>
+
+    </nav>
+
+	<div class="wpsg_clear"></div>
+
 	<?php echo $this->writeBackendMessage(); ?>
-	
-	<form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=save&noheader=1" enctype="multipart/form-data">
-		
-		<?php if ($this->view['mode'] == 'edit') { ?>
-		<input type="hidden" name="edit_id" value="<?php echo $this->view['data']->id; ?>" />
-		<?php } ?>
-		
-		<div id="postbox" class="metabox-holder has-right-sidebar">
-			
-			<div id="side-info-column" class="inner-sidebar" style="width:386px;">
-				
-				<div id="side-sortables" class="meta-box-sortables ui-sortable" style="width:380px;">
-				
-					<?php $this->callMods('customergroup_edit', array(&$this->view['data'])); ?>
-				
-				</div>
-				
-			</div>
-			
-			<div id="post-body">	
-			
-				<div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
-				
-					<div id="wpsg_customergroup_general" class="postbox">								
-						<h3 class="wpsg_handlediv">
-							<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-							<span><?php echo __('Allgemein', 'wpsg'); ?></span>
-						</h3>
-						<div class="inside">
-						
-							<?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung[name]', __('Name', 'wpsg'), $this->view['data']->name); ?> 
-							<?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung[calculation]', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(
-								-1 => __('Standard', 'wpsg'),
-								WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'), 
-								WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')
-							), $this->view['data']->calculation); ?>
-						
-						</div>
-					</div>
-					
-				</div>
-				
-				<p class="submit">
-					<input type="submit" value="<?php echo __('Kundengruppe speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
-					<input type="submit" value="<?php echo __('Kundengruppe speichern und zur Ãbersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
-				</p>
-				
-			</div>
-			
-		</div>
-		
-	</form>
-	
+
+	<div class="content">
+
+        <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=save&noheader=1" enctype="multipart/form-data">
+            <?php echo wpsg_drawForm_AdminboxStart(__('Allgemein', 'wpsg')); ?>
+
+                <?php if ($this->view['mode'] == 'edit') { ?>
+                <input type="hidden" name="edit_id" value="<?php echo $this->view['data']->id; ?>" />
+                <?php } ?>
+
+                <?php $this->callMods('customergroup_edit', array(&$this->view['data'])); ?>
+
+                <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung[name]', __('Name', 'wpsg'), @$this->view['data']->name); ?>
+                <?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung[calculation]', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(
+                    -1 => __('Standard', 'wpsg'),
+                    WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'),
+                    WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')
+                ), @$this->view['data']->calculation); ?>
+
+            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
+            <input type="submit" value="<?php echo __('Kundengruppe speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+			<input type="submit" value="<?php echo __('Kundengruppe speichern und zur Ãbersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
+
+        </form>
+
+    </div>
+
 </div>
-
-<script type="text/javascript">/* <![CDATA[ */
-                                            
-	jQuery(document).ready( function() {
-
-	    jQuery("#normal-sortables, #side-sortables").sortable({
-			connectWith: ".meta-box-sortables",
-			placeholder: 'wpsg_placeholder',
-			dropOnEmpty: true,
-			cursor: 'move',
-			handle: '.wpsg_handlediv',
-			grid: [50, 20],
-			forceHelperSize: true,
-			forcePlaceholderSize: true,
-			opacity: 0.8,
-			stop: function(e,ui) {
-
-				var ser = jQuery("#normal-sortables").sortable("serialize");				
-				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
-
-				jQuery.cookie('wpsg_customergroup_view_normal', ser);
-
-				var ser = jQuery("#side-sortables").sortable("serialize");				
-				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
-
-				jQuery.cookie('wpsg_customergroup_view_side', ser);
-				
-			},
-			receive: function(e, ui) {
-			}
-		}); 
-
-	    if (jQuery.cookie('wpsg_customergroup_view_normal') != null)
-		{
-
-			var divs = jQuery.cookie('wpsg_customergroup_view_normal').split(',').reverse();
-
-			for (index in divs)
-			{
-
-				jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-				
-			}
-			
-		}
-
-		if (jQuery.cookie('wpsg_customergroup_view_side') != null)
-		{
- 
-			var divs = jQuery.cookie('wpsg_customergroup_view_side').split(',').reverse();
-
-			for (index in divs)
-			{
-				 
-				jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-				
-			}
-			
-		}
-
-		jQuery('.wpsg_handlediv').bind('click', function() {
-			jQuery(this).next().toggle();
-
-			var arClose = new Array();
-			jQuery('.wpsg_customergroup_view .postbox .inside:hidden').each(function() {
-				arClose.push(jQuery(this).parent().attr("id"));
-			} );
-
-			jQuery.cookie('wpsg_customergroup_closed', arClose.join(','));
-			
-		} );
-
-		if (jQuery.cookie('wpsg_customergroup_closed') != null)
-		{
-
-			var arClose = jQuery.cookie('wpsg_customergroup_closed').split(',');
-
-			for (index in arClose)
-			{
-				
-				jQuery('#' + arClose[index] + ' .inside').hide();
-							
-			}
-			
-		}
-		
-	} );
-	
-/* ]]> */</script>
Index: /views/mods/mod_customergroup/index.phtml
===================================================================
--- /views/mods/mod_customergroup/index.phtml	(revision 5750)
+++ /views/mods/mod_customergroup/index.phtml	(revision 5751)
@@ -6,212 +6,149 @@
 
 ?>
-<div class="wrap wpsg_mod_kundenverwaltung_customergroup_index">
-	
-	<div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
-	
-	<h2>
-		<?php echo __('Kundengruppenverwaltung', 'wpsg'); ?>		
-		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=add" class="add-new-h2"><?php echo __("HinzufÃŒgen", "wpsg"); ?></a>		
-	</h2>
-	
+
+<div class="wpsg_customergroup" id="wpsg-bs">
+
+    <nav class="navbar navbar-default">
+
+		<div class="container-fluid">
+			<div class="navbar-header">
+				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+			</div>
+			<div class="collapse navbar-collapse" id="bs-customergroup-navbar-collapse-1">
+				<ul class="nav navbar-nav">
+					<li role="presentation" class="wpsg-customergroup-tab-a active"><a href="#" onclick="return false;"><?php echo __("Kundengruppenverwaltung", "wpsg"); ?></a></li>
+                    <li role="presentation" class="wpsg-customergroup-tab-a wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>" id="wpsg-customergroup-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
+					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("HinzufÃŒgen", "wpsg"); ?></a></li>
+				</ul>
+				<ul class="nav navbar-nav navbar-right">
+
+				</ul>
+			</div>
+		</div>
+
+        <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
+            <div class="row">
+				<div class="col-lg-4">
+					<form method="post" id="filter_form">
+
+                        <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
+
+                        <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+                        <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
+
+                        <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
+
+                        <?php echo wpsg_drawForm_SubmitButton(__('Kundengruppen suchen')); ?><br />
+
+					</form>
+				</div>
+			</div>
+        </div>
+
+    </nav>
+
+    <?php if ($this->view['pages'] > 1) { ?>
+        <nav class="pagination_wrap">
+            <ul class="pagination">
+                <?php if ($this->view['arFilter']['page'] > 1) { ?>
+                    <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+                <?php } ?>
+                <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+                    <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+                <?php } ?>
+                <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+                    <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('NÃ€chste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+                <?php } ?>
+            </ul>
+        </nav>
+	<?php } ?>
+
+	<div class="wpsg_clear"></div>
+
 	<?php echo $this->writeBackendMessage(); ?>
-	
-	<form method="POST" id="filter_form">
-		
-		<?php if (sizeof($this->view['data']) > 0) { ?>
-		<p class="search-box">
-			<label for="post-search-input" class="screen-reader-text"><?php echo __('Kundengruppen suchen', 'wpsg'); ?>:</label>
-			<input type="text" value="<?php echo wpsg_hspc($_REQUEST['s']); ?>" name="filter[s]" id="post-search-input">
-			<input type="submit" value="<?php echo __('Kundengruppen suchen', 'wpsg'); ?>" class="button" id="search-submit" name="">
-		</p>
-		<?php } ?>
-		
-		<div class="tablenav top">
-		
-			<?php if (sizeof($this->view['data']) > 0) { ?>
-			<div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
-				<div class="tablenav-pages">	
-					<span class="pagination-links">
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=1&s=<?php echo $_REQUEST['s'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">Â«</a>
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] - 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">â¹</a>
-						<span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] + 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur nÃ€chsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">âº</a>
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo $this->view['pages'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">Â»</a>
-					</span>
-				</div>
-				
-				<script type="text/javascript">
 
-					jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
-				
-				</script>
-				
-				<br class="clear" />
-			</div>
-			<?php } ?>
-		
-		</div>
-		
-		<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
-		<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
-		
-		<input style="display:none;" type="submit" name="suchen" value="" />
-		
-	</form>
-	
-	<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
-	<table class="widefat post fixed">
-		<thead>
-			<tr>
-				<th class="manage-column col-id <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'id'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('id');">
-						<span><?php echo __("Id", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-				<th class="manage-column col-name <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'name'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('name');">
-						<span><?php echo __("Name", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-				<th class="manage-column col-calculation <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'calculation'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('name');">
-						<span><?php echo __("Preisanzeige", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-				<th class="manage-column col-customercount <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'customercount'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('customercount');">
-						<span><?php echo __("Kunden", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-			</tr>
-		</thead>
-		<tbody>
-			<?php $i = 0; foreach ($this->view['data'] as $oCustomerGroup) { ?>
-			<tr class="<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
-				<td class="col-id">
-					<?php echo wpsg_hspc($oCustomerGroup->id); ?>
-				</td>
-				<td class="col-name">
-					<?php echo wpsg_hspc($oCustomerGroup->name); ?>
-					<div class="row-actions">
-						<span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=edit&edit_id=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
-						|
-						<span class="edit"><a title="<?php echo __("Kunden dieser Kundengruppe anzeigen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&customergroup=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Kunden anzeigen", "wpsg"); ?></a></span>
-						|
-						<span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diese Kundengruppe lÃ¶schen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden lÃ¶schen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=del&edit_id=<?php echo $oCustomerGroup->id; ?>&noheader=1"><?php echo __("LÃ¶schen", "wpsg"); ?></a></span>											
-					</div>
-				</td>
-				<td class="col-calculation">
-					<?php if ($oCustomerGroup->calculation == WPSG_BRUTTO) { ?>
-					<?php echo __('Brutto Preise', 'wpsg'); ?>
-					<?php } else if ($oCustomerGroup->calculation == WPSG_NETTO) { ?>
-					<?php echo __('Netto Preise', 'wpsg'); ?>
-					<?php } else { ?>
-					<?php echo __('Standard', 'wpsg'); ?>
-					<?php } ?>
-				</td>
-				<td class="col-customercount">
-					<?php echo wpsg_hspc($oCustomerGroup->customercount); ?>
-				</td>
-			</tr>
-			<?php $i ++; } ?>
-		</tbody>
-		<tfoot>
-			<tr>
-				<th class="manage-column col-id <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'id'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('id');">
-						<span><?php echo __("Id", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-				<th class="manage-column col-name <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'name'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('name');">
-						<span><?php echo __("Name", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-				<th class="manage-column col-calculation <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'calculation'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('name');">
-						<span><?php echo __("Preisanzeige", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-				<th class="manage-column col-customercount <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'customercount'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
-					<a href="#" onclick="return wpsg_setOrder('customercount');">
-						<span><?php echo __("Kunden", 'wpsg'); ?></span>
-						<span class="sorting-indicator"></span>
-					</a>
-				</th>
-			</tr>
-		</tfoot>
-	</table>
-	<?php } ?>
-		
-	<div class="tablenav">
-	
-		<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
-	
-		<div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
-			<div class="tablenav-pages">	
-				<span class="pagination-links">
-					<form method="POST">
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=1&s=<?php echo $_REQUEST['s'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">Â«</a>
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] - 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">â¹</a>
-						<span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] + 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur nÃ€chsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">âº</a>
-						<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo $this->view['pages'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">Â»</a>
-					</form>
-				</span>
-			</div>
-			
-			<script type="text/javascript">
-	
-				jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
-			
-			</script>
-			
-			<br class="clear">
-		</div>
-		
-		<?php } ?>
-		
-	</div>
-	
-	<script type="text/javascript">/* <![CDATA[ */
+	<div class="content">
 
-		var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
-		var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>';
-	
-		function wpsg_setOrder(order)
-		{
-		
-			if (order == wpsg_order)
-			{
-		
-				// Nur Richtung Ã€ndern
-				if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
-				else jQuery('#wpsg_ascdesc').val('asc');
-				
-			}
-			else
-			{
-		
-				jQuery('#wpsg_order').val(order);
-				jQuery('#wpsg_ascdesc').val('asc');
-				
-			}
-		
-			jQuery('#seite').val(1);
-			jQuery('#filter_form').submit();
-			
-			return false;
-			
-		} // function wpsg_setOrder(order)
-    
-	/* ]]> */</script>
-	
+        <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
+
+            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
+                <thead>
+                    <tr>
+                        <th class="wpsg_order manage-column col-name" data-order="name"><?php echo __('Name', 'wpsg'); ?></th>
+                        <th class="wpsg_order col-price" data-order="customercount"><?php echo __("Preisanzeige", 'wpsg'); ?></th>
+                        <th class="wpsg_order col_customer" data-order="calculation"><?php echo __("Kunden", 'wpsg'); ?></th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <?php foreach ($this->view['arData'] as $oCustomerGroup) { ?>
+                    <tr>
+                        <td class="col-name">
+                            <?php echo wpsg_hspc($oCustomerGroup->name); ?>
+                            <div class="row-actions">
+                                <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=edit&edit_id=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
+                                |
+                                <span class="edit"><a title="<?php echo __("Kunden dieser Kundengruppe anzeigen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&customergroup=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Kunden anzeigen", "wpsg"); ?></a></span>
+                                |
+                                <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diese Kundengruppe lÃ¶schen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden lÃ¶schen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=del&edit_id=<?php echo $oCustomerGroup->id; ?>&noheader=1"><?php echo __("LÃ¶schen", "wpsg"); ?></a></span>
+                            </div>
+                        </td>
+                        <td class="col-price">
+                            <?php if ($oCustomerGroup->calculation == WPSG_BRUTTO) { ?>
+                            <?php echo __('Brutto Preise', 'wpsg'); ?>
+                            <?php } else if ($oCustomerGroup->calculation == WPSG_NETTO) { ?>
+                            <?php echo __('Netto Preise', 'wpsg'); ?>
+                            <?php } else { ?>
+                            <?php echo __('Standard', 'wpsg'); ?>
+                            <?php } ?>
+                        </td>
+                        <td class="col-customer">
+                            <?php echo wpsg_hspc($oCustomerGroup->customercount); ?>
+                        </td>
+                    </tr>
+                    <?php } ?>
+                </tbody>
+            </table>
+
+            <?php if ($this->view['pages'] > 1) { ?>
+                <nav class="pagination_wrap pagination_wrap_bottom">
+                    <ul class="pagination">
+                        <?php if ($this->view['arFilter']['page'] > 1) { ?>
+                            <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+                        <?php } ?>
+                        <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+                            <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+                        <?php } ?>
+                        <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+                            <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('NÃ€chste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+                        <?php } ?>
+                    </ul>
+                </nav>
+            <?php } ?>
+
+        <?php } else { ?>
+            <p><?php echo __('Bisher wurden noch keine Kundengruppen angelegt.', 'wpsg'); ?></p>
+        <?php } ?>
+
+    </div>
+
 </div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
+    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
+    <?php } ?>
+
+	function goPage(page)
+	{
+
+		if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+		jQuery('#wpsg_seite').val(page);
+		jQuery('#filter_form').submit();
+
+		return false;
+
+	} // function goPage(page)
+
+/* ]]> */</script>
Index: /views/mods/mod_export/order_index_tab.phtml
===================================================================
--- /views/mods/mod_export/order_index_tab.phtml	(revision 5751)
+++ /views/mods/mod_export/order_index_tab.phtml	(revision 5751)
@@ -0,0 +1,35 @@
+<?php
+
+	/**
+	 * Template fÃŒr die Integration des Produktexportes in die Bestellvarwaltung im unteren Bereich
+	 */
+
+?>
+<form class="container-fluid form-horizontal" method="post" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_export&noheader=1" onsubmit="wpsg_mod_export_serializefilter();">
+
+    <div class="row">
+		<div class="col-lg-4">
+
+            <?php foreach ($this->view['wpsg_mod_export']['arProfile'] as $p) { ?>
+                <?php echo wpsg_drawForm_Checkbox('wpsg_mod_export_profile[]', $p['name'], false, array('value' => $p['id'])); ?>
+            <?php } ?>
+
+            <br /><?php echo wpsg_drawForm_SubmitButton(__('Export starten')); ?>
+
+        </div>
+    </div>
+
+    <input type="hidden" name="filter" id="wpsg_mod_export_filter" value="" />
+
+</form>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+    function wpsg_mod_export_serializefilter()
+    {
+
+        jQuery('#wpsg_mod_export_filter').val(jQuery('#filter_form').serialize());
+
+    }
+
+/* ]]> */</script>
Index: ews/mods/mod_export/product_index_tab.phtml
===================================================================
--- /views/mods/mod_export/product_index_tab.phtml	(revision 5750)
+++ 	(revision )
@@ -1,37 +1,0 @@
-<?php
-
-	/**
-	 * Template fÃŒr die Integration des Produktexportes in die Bestellvarwaltung im unteren Bereich
-	 */
-
-?>
-<form class="container-fluid" method="post" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_export&noheader=1" onsubmit="wpsg_mod_export_serializefilter();">
-
-    <div class="form-group form-group-sm">
-        <?php foreach ($this->view['wpsg_mod_export']['arProfile'] as $p) { ?>
-        <div class="checkbox">
-            <label>
-                <input type="checkbox" name="wpsg_mod_export_profile[]" value="<?php echo $p['id']; ?>" />&nbsp;<?php echo $p['name']; ?>
-            </label><br />
-        </div>
-        <?php } ?>
-    </div>
-
-    <br />
-
-    <input class="button" type="submit" value="<?php echo __('Export starten', 'wpsg'); ?>" />
-
-    <input type="hidden" name="filter" id="wpsg_mod_export_filter" value="" />
-
-</form>
-
-<script type="text/javascript">/* <![CDATA[ */
-
-    function wpsg_mod_export_serializefilter()
-    {
-
-        jQuery('#wpsg_mod_export_filter').val(jQuery('#filter_form').serialize());
-
-    }
-
-/* ]]> */</script>
Index: /views/mods/mod_kundenverwaltung/index.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/index.phtml	(revision 5750)
+++ /views/mods/mod_kundenverwaltung/index.phtml	(revision 5751)
@@ -34,10 +34,10 @@
 					<form method="post" id="filter_form">
 
-						<input id="wpsg_seite" type="hidden" name="seite" value="<?php echo $this->view['seite']; ?>" class="current-page" />
+						<input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
 
-                        <input id="wpsg_order" type="hidden" name="search[order]" value="<?php echo $this->view['search']['order']; ?>" />
-						<input id="wpsg_ascdesc" type="hidden" name="search[ascdesc]" value="<?php echo $this->view['search']['ascdesc']; ?>" />
+                        <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+						<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
 
-						<?php echo wpsg_drawForm_Input('s', __('Suchfeld', 'wpsg'), wpsg_getStr($_REQUEST['s'])); ?>
+						<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
 
 						<?php echo wpsg_drawForm_SubmitButton(__('Produkte suchen')); ?><br />
@@ -78,5 +78,5 @@
                     <tr>
                         <th class="manage-column column-title wpsg_pic_col"></th>
-                        <th class="wpsg_order col_name" data-order="name"><?php echo __("Name", 'wpsg'); ?></th>
+                        <th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
                         <th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
                         <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
@@ -88,7 +88,9 @@
                         <td class="wpsg_pic_col">
 
+                            <img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
+
                         </td>
                         <td class="col_name column-title">
-                            <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>" class="row-title"><?php echo $c->getLabel(); ?></a></strong>
+                            <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
                             <?php if (strlen($c->getEMail()) > 0) { ?>
                                 <a href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail();  ?></a>
@@ -144,9 +146,9 @@
 
 </div>
-<?php wpsg_debug($this->view['search']); ?>
+
 <script type="text/javascript">/* <![CDATA[ */
 
-    <?php if (wpsg_isSizedString($this->view['search']['order']) && wpsg_isSizedString($this->view['search']['ascdesc'])) { ?>
-    jQuery('th[data-order="<?php echo $this->view['search']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['search']['ascdesc']); ?>');
+    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
+    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
     <?php } ?>
 
@@ -154,5 +156,5 @@
 	{
 
-		if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+		if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
 
 		jQuery('#wpsg_seite').val(page);
Index: /views/mods/mod_productgroups/index.phtml
===================================================================
--- /views/mods/mod_productgroups/index.phtml	(revision 5750)
+++ /views/mods/mod_productgroups/index.phtml	(revision 5751)
@@ -6,56 +6,142 @@
 
 ?>
-<div class="wrap">
-	<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
-	<h2>
-		<?php echo __('Produktgruppenverwaltung', 'wpsg'); ?>
-		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=add" class="add-new-h2"><?php echo __("HinzufÃŒgen", "wpsg"); ?></a>				
-	</h2>
-	
-	<br />
+
+<div class="wpsg_productgroups" id="wpsg-bs">
+
+    <nav class="navbar navbar-default">
+
+		<div class="container-fluid">
+			<div class="navbar-header">
+				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+			</div>
+			<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
+				<ul class="nav navbar-nav">
+					<li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo __("Produktgruppenverwaltung", "wpsg"); ?></a></li>
+                    <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter" id="wpsg-customer-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
+                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("HinzufÃŒgen", "wpsg"); ?></a></li>
+				</ul>
+				<ul class="nav navbar-nav navbar-right">
+				</ul>
+			</div>
+		</div>
+
+        <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
+            <div class="row">
+                <div class="col-lg-4">
+                    <form method="post" id="filter_form">
+
+                        <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
+
+                        <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+                        <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
+
+                        <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
+
+                        <?php echo wpsg_drawForm_SubmitButton(__('Produktgruppen suchen')); ?><br />
+
+                    </form>
+                </div>
+            </div>
+        </div>
+
+    </nav>
+
+    <?php if ($this->view['pages'] > 1) { ?>
+        <nav class="pagination_wrap">
+            <ul class="pagination">
+                <?php if ($this->view['arFilter']['page'] > 1) { ?>
+                    <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+                <?php } ?>
+                <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+                    <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+                <?php } ?>
+                <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+                    <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('NÃ€chste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+                <?php } ?>
+            </ul>
+        </nav>
+	<?php } ?>
+
+    <div class="wpsg_clear"></div>
 
 	<?php echo $this->writeBackendMessage(); ?>
-	
-	<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) == 0) { ?>
-	<p><?php echo __("Keine Produktgruppen hinterlegt.", "wpsg"); ?></p>
-	<?php } else { ?>
-	<div class="clear"></div>
-	<table cellspacing="0" class="widefat post fixed">
-		<thead>
-			<tr>
-				<th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Name", "wpsg"); ?></th>
-				<th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Template", "wpsg"); ?></th>
-				<th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Produkte", "wpsg"); ?></th>
-			</tr>
-		</thead>
-		<tbody>
-			<?php foreach ($this->view['data'] as $g) { ?>
-			<tr valign="top" class="alternate author-self status-draft iedit" id="post-<?php echo $g['id']; ?>">
-				<td class="post-title column-title">
-					<strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $g['id']; ?>" class="row-title"><?php echo $g['name']; ?></a></strong>
-					<div class="row-actions">
-						<span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $g['id']; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a>
-						|
-						<span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sich sicher?", "wpsg"); ?>')) return false;" title="<?php echo __("Diese Produktgruppe lÃ¶schen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=del&noheader=1&edit_id=<?php echo $g['id']; ?>"><?php echo __("LÃ¶schen", "wpsg"); ?></a>
-						<?php if ($g['countProdukte'] > 0) { ?>
-						|
-						<span class="edit"><a title="<?php echo __("Zur Produktliste", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&search[pgruppe]=<?php echo $g['id']; ?>"><?php echo __("Zur Produktliste", "wpsg"); ?></a>
-						<?php } ?>						
-					</span>
-				</td> 
-				<td><?php echo (($g['template_file'] == "0")?'Individuelle Produkttemplates':$g['template_file']); ?></td>
-				<td><?php echo $g['countProdukte']; ?></td>
-			</tr>
-			<?php } ?>
-		</tbody>
-		<tfoot>
-			<tr>
-				<th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Name", "wpsg"); ?></th>
-				<th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Template", "wpsg"); ?></th>
-				<th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Produkte", "wpsg"); ?></th>
-			</tr>
-		</tfoot>
-	</table>
-	<?php } ?>
-	
+
+	<div class="content">
+
+        <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
+
+            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
+                <thead>
+                    <tr>
+                        <th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
+                        <th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
+                        <th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <?php foreach ($this->view['arData'] as $cg) { ?>
+                    <tr>
+                        <td class="col_name">
+                            <strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $cg->id; ?>" class="row-title"><?php echo $cg->name; ?></a></strong>
+					        <div class="row-actions">
+                                <span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $cg->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a>
+                                |
+                                <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sich sicher?", "wpsg"); ?>')) return false;" title="<?php echo __("Diese Produktgruppe lÃ¶schen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=del&noheader=1&edit_id=<?php echo $cg->id; ?>"><?php echo __("LÃ¶schen", "wpsg"); ?></a>
+                                <?php if ($cg->countProducts() > 0) { ?>
+                                |
+                                <span class="edit"><a title="<?php echo __("Zur Produktliste", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&search[pgruppe]=<?php echo $cg->id; ?>"><?php echo __("Zur Produktliste", "wpsg"); ?></a>
+                                <?php } ?>
+                            </div>
+                        </td>
+                        <td class="col_template">
+
+                        </td>
+                        <td class="col_products">
+
+                        </td>
+                    </tr>
+                    <?php } ?>
+                </tbody>
+            </table>
+
+            <?php if ($this->view['pages'] > 1) { ?>
+                <nav class="pagination_wrap pagination_wrap_bottom">
+                    <ul class="pagination">
+                        <?php if ($this->view['arFilter']['page'] > 1) { ?>
+                            <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+                        <?php } ?>
+                        <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+                            <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+                        <?php } ?>
+                        <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+                            <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('NÃ€chste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+                        <?php } ?>
+                    </ul>
+                </nav>
+            <?php } ?>
+
+        <?php } else { ?>
+        <p><?php echo __('Es wurden keine Kunden in der Datenbank gefunden.', 'wpsg'); ?></p>
+        <?php } ?>
+
 </div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
+    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
+    <?php } ?>
+
+	function goPage(page)
+	{
+
+		if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+		jQuery('#wpsg_seite').val(page);
+		jQuery('#filter_form').submit();
+
+		return false;
+
+	} // function goPage(page)
+
+/* ]]> */</script>
Index: /views/order/index.phtml
===================================================================
--- /views/order/index.phtml	(revision 5750)
+++ /views/order/index.phtml	(revision 5751)
@@ -17,5 +17,5 @@
 				<ul class="nav navbar-nav">
 					<li role="presentation" class="wpsg-order-tab-a active"><a href="#" onclick="return false;"><?php echo __("BestellÃŒbersicht", "wpsg"); ?></a></li>
-					<li role="presentation" class="wpsg-order-tab-a" id="wpsg-order-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
+					<li role="presentation" class="wpsg_showhide_filter wpsg-order-tab-a <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>" id="wpsg-order-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
                     <?php foreach ($this->view['tabs']['left'] as $k => $tab) { ?>
                     <li role="presentation" class="wpsg-order-tab-a" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
@@ -24,5 +24,5 @@
 				<ul class="nav navbar-nav navbar-right">
                     <?php foreach ($this->view['tabs']['right'] as $k => $tab) { ?>
-                    <li role="presentation" class="wpsg-order-tab-a" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
+                    <li role="presentation" class="wpsg-order-tab-mods" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
                     <?php } ?>
 				</ul>
@@ -32,5 +32,5 @@
         <?php foreach ($this->view['tabs'] as $tab_positions) { ?>
         <?php foreach ($tab_positions as $k => $tab) { ?>
-        <div class="wpsg-filter wpsg-order-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
+        <div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
         <?php } ?>
         <?php } ?>
@@ -41,10 +41,11 @@
 					<form method="post" id="filter_form">
 
-						<input id="wpsg_seite" type="hidden" name="seite" value="<?php echo $this->view['arFilter']['page']; ?>" class="current-page" />
-						<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['arFilter']['order']; ?>" />
-						<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['arFilter']['ascdesc']; ?>" />
+						<input id="wpsg_seite" type="hidden" name="seite" value="<?php echo @$this->view['arFilter']['page']; ?>" class="current-page" />
+						<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+						<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
 
 						<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
-						<?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), wpsg_array_merge(array('-1' => __('Alle', 'wpsg')), $this->arStatus), $this->view['arFilter']['status']); ?>
+                        <?php echo wpsg_drawForm_Input('filter[k_id]', __('Kunde (ID)', 'wpsg'), wpsg_getStr($this->view['arFilter']['k_id'])); ?>
+						<?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), wpsg_array_merge(array('-1' => __('Alle', 'wpsg')), $this->arStatus), @$this->view['arFilter']['status']); ?>
 
                         <?php echo wpsg_drawForm_TextStart(); ?>
@@ -90,5 +91,5 @@
                         <?php echo wpsg_drawForm_TextEnd(__('Rechnungsdatum (Monat/Jahr)', 'wpsg'), array('noP' => true)); ?>
 
-    					<br /><?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?><br />
+    					<br /><?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?>
 
 					</form>
@@ -306,5 +307,5 @@
 
     <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
-    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
+    jQuery('th[data-order="<?php echo @$this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower(@$this->view['arFilter']['ascdesc']); ?>');
     <?php } ?>
 
@@ -342,13 +343,11 @@
     jQuery(document).ready(function() {
 
-        jQuery('.wpsg-order-tab-a').bind('click', function() {
-
-            jQuery('.wpsg-order-tab-a').removeClass('active');
-            jQuery(this).addClass('active');
-
-            if (jQuery('.' + jQuery(this).attr("id")).length <= 0)
+        jQuery('.wpsg-order-tab-mods').bind('click', function() {
+
+            if (jQuery(this).hasClass('active'))
             {
 
-                jQuery('.wpsg-order-tab').slideUp(250);
+                jQuery(this).removeClass('active');
+                jQuery('.' + jQuery(this).attr("id")).slideUp(250);
 
             }
@@ -356,18 +355,6 @@
             {
 
-                if (jQuery('.wpsg-order-tab:visible').length > 0)
-                {
-
-                    jQuery('.wpsg-order-tab').hide(0);
-                    jQuery('.' + jQuery(this).attr("id")).show(0);
-
-                }
-                else
-                {
-
-                    jQuery('.wpsg-order-tab').hide(0);
-                    jQuery('.' + jQuery(this).attr("id")).slideDown(250);
-
-                }
+                jQuery(this).addClass('active');
+                jQuery('.' + jQuery(this).attr("id")).slideDown(250);
 
             }
