Index: /mods/wpsg_mod_productindex.class.php
===================================================================
--- /mods/wpsg_mod_productindex.class.php	(revision 6340)
+++ /mods/wpsg_mod_productindex.class.php	(revision 6341)
@@ -6,66 +6,66 @@
 	class wpsg_mod_productindex extends wpsg_mod_basic
 	{
-		
+
 		var $lizenz = 1;
 		var $id = 30;
 		var $hilfeURL = 'http://wpshopgermany.de/?p=3183';
-		
+
 		var $order = false; // Wird fÃŒr die Ãbergabe an die Sortierfunktion verwendet
 		var $ascdesc = false; // Wird fÃŒr die Richtugn der Sortierung fÃŒr die Callback Funktion verwendet
-		
-		public function __construct() 
-		{
-			
+
+		public function __construct()
+		{
+
 			parent::__construct();
-			
+
 			$this->name = __('ProduktÃŒbersichten', 'wpsg');
 			$this->group = __('Produkte', 'wpsg');
 			$this->desc = __('ErmÃ¶glicht die Darstellung von ProduktÃŒbersichtsseiten.', 'wpsg');
-			
-		} // public function __construct() 
-		
+
+		} // public function __construct()
+
 		public function init()
 		{
-				 
+
 			add_action('add_meta_boxes', array(&$this, 'wpsg_add_post_meta_boxes'));
 			add_action('save_post', array(&$this, 'wpsg_save_postdata'));
-			
+
 		} // public function init()
-		
+
 		public function content_filter(&$content)
 		{
-						
+
 			if (get_the_id() <= 0) return;
-			
+
 			$index_page = get_post_meta(get_the_id(), 'wpsg_mod_productindex_active', true);
-			
+
 			if ($index_page === '1')
 			{
-				
+
 				// Shop ÃŒbernehmen?
 				if (class_exists('\\sto\\frontend\\Productindex') && in_array(get_post_meta(get_the_id(), 'wpsg_mod_productindex_template', true), array('0', '1')))
 				{
-					
+
 					$content = \sto\frontend\Productindex::render(get_the_id());
-					
+
 					return -2;
-					
-				}
-				
-				$this->shop->view['arProducts'] = $this->getProducts(get_the_id()); 
-				
+
+				}
+
+				$this->shop->view['arProducts'] = $this->getProducts(get_the_id());
+
 				if (isset($_REQUEST['wpsg_mod_productindex']['template']))
 				{
-				
+
 					$template = $_REQUEST['wpsg_mod_productindex']['template'];
-					
+
 				}
 				else
-				{	
-				
-					$template = get_post_meta(get_the_id(), 'wpsg_mod_productindex_template', true); 
-				
-				}
-					
+				{
+
+					$template = get_post_meta(get_the_id(), 'wpsg_mod_productindex_template', true);
+
+				}
+
 				$arTemplates = $this->getTemplates();
 				if (is_numeric($template))
@@ -73,37 +73,37 @@
 				else
 					$templatefile = $template;
-				
+
 				//$this->shop->view['wpsg_mod_productindex']['template'] = $template;
-				 
-				//$content = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productindex/layouts/'.$template, false);				
-				 
+
+				//$content = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productindex/layouts/'.$template, false);
+
 				$this->shop->view['wpsg_mod_productindex']['template'] = $templatefile;
-					
+
 				$content = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productindex/layouts/'.$templatefile, false);
-				
+
 				return -2;
-				
-			}
-			
+
+			}
+
 		} // public function content_filter(&$content)
-		
+
 		public function wpsg_enqueue_scripts()
 		{
-			
+
 			if (is_admin()) return;
-			
+
 			$index_page = get_post_meta(get_the_id(), 'wpsg_mod_productindex_active', true);
-			
+
 			if ($index_page === '1')
 			{
-			
+
 				wp_enqueue_style('wpsg-mod-productindex-style', $this->shop->getRessourceURL('mods/mod_productindex/css/productindex.css'));
-									
-			}
-			
+
+			}
+
 		} // public function wpsg_enqueue_scripts()
-		
+
 		/* Modulfunktionen */
-		 
+
 		/**
 		 * Gibt einen Array von Produkten fÃŒr die Seite zurÃŒck
@@ -111,89 +111,89 @@
 		function getProducts($post_id)
 		{
-			
+
 			global $wpdb;
-			
+
 			if (isset($_REQUEST['wpsg_mod_productindex']['filter']))
 			{
-				
+
 				$filter = $_REQUEST['wpsg_mod_productindex']['filter'];
-				
+
 			}
 			else
 			{
-				
+
 				$filter = array();
-				
-			}
-			
+
+			}
+
 			$show = get_post_meta($post_id, 'wpsg_mod_productindex_show', true);
-			
+
 			$strQuerySELECT = "";
 			$strQueryJOIN = "";
-			
+
 			if ($show == '1')
 			{
-				
+
 				// Auswahl (Kommagetrennte IDs) anzeigen
 				$arIDs = explode(',', get_post_meta($post_id, 'wpsg_mod_productindex_productids', true));
-				
+
 				if (sizeof($arIDs) <= 0)
 				{
-					
+
 					wpsg_debug(__('Bitte geben sie eine gÃŒltige Auswahl von kommagetrennten ProduktIDs auf dieser Seite ein.', 'wpsg'));
 					$strQuerySELECT .= " AND 0 ";
-					
+
 				}
 				else if (sizeof($arIDs) == 1)
 				{
-					
+
 					$strQuerySELECT .= " AND P.`id` = '".wpsg_q($arIDs[0])."' ";
-					
+
 				}
 				else
 				{
-					
+
 					$strQuerySELECT .= " AND P.`id` IN (".wpsg_q(implode(',', $arIDs)).") ";
-					 
-				} 
-				
+
+				}
+
 			}
 			else if ($show == '2')
 			{
-				
+
 				$arPG = array_values(get_post_meta($post_id, 'wpsg_mod_productindex_groups', true));
-				
+
 				if (sizeof($arPG) <= 0)
 				{
-					
+
 					wpsg_debug(__('Bitte wÃ€hlen sie mindestens eine Produktgruppe zur Anzeige bei den Seiteneinstellungen dieser Seite aus.', 'wpsg'));
 					$strQuerySELECT .= " AND 0 ";
-					
+
 				}
 				else if (sizeof($arPG) == 1)
 				{
-					
+
 					$strQuerySELECT .= " AND P.`pgruppe` = '".wpsg_q($arPG[0])."' ";
-					
+
 				}
 				else
 				{
-					
+
 					$strQuerySELECT .= " AND P.`pgruppe` IN (".wpsg_q(implode(',', $arPG)).") ";
-					 
-				} 
-				
+
+				}
+
 			}
 			else if ($show == '3')
 			{
-				
+
 				$arKat = array_values(get_post_meta($post_id, 'wpsg_mod_productindex_categories', true));
-				
+
 				if (sizeof($arKat) <= 0)
 				{
-						
+
 					wpsg_debug(__('Bitte wÃ€hlen sie mindestens eine Kategorie zur Anzeige bei den Seiteneinstellungen dieser Seite aus.', 'wpsg'));
 					$strQuerySELECT .= " AND 0 ";
-						
+
 				}
 				else
@@ -204,39 +204,39 @@
 					$strQueryJOIN .= " LEFT JOIN `".$this->shop->prefix."term_relationships` AS TR ON (PP.`id` = TR.`object_id`) ";
 					$strQueryJOIN .= " LEFT JOIN `".$this->shop->prefix."term_taxonomy` AS TT ON (TT.`term_taxonomy_id` = TR.`term_taxonomy_id`) ";
-											
+
 					if (sizeof($arKat) == 1)
 					{
-						
+
 						//$strQuerySELECT .= " AND TR.`term_taxonomy_id` = '".wpsg_q($arKat[0])."' ";
 						$strQuerySELECT .= " AND TT.`term_id` = '".wpsg_q($arKat[0])."' ";
-						
+
 					}
 					else
 					{
-						
+
 						//$strQuerySELECT .= " AND TR.`term_taxonomy_id` IN (".wpsg_q(implode(',', $arKat)).") ";
 						$strQuerySELECT .= " AND TT.`term_id` IN (".wpsg_q(implode(',', $arKat)).") ";
-						
+
 					}
-					
-				}
-				
-			}
-			
-			 
+
+				}
+
+			}
+
+
 			if (get_post_meta($post_id, 'wpsg_mod_productindex_hideOrder', true) == '1') $this->shop->view['hideOrder'] = true;
 			else $this->shop->view['hideOrder'] = false;
-			
+
 			if (get_post_meta($post_id, 'wpsg_mod_productindex_hideViewSelect', true) == '1') $this->shop->view['hideViewSelect'] = true;
 			else $this->shop->view['hideViewSelect'] = false;
-		
+
 			if (!isset($filter['order']))
-			{ 
+			{
 				$filter['order'] = get_post_meta($post_id, 'wpsg_mod_productindex_order', true);
 			}
-			 
+
 			switch ($filter['order'])
 			{
-				
+
 				case 'price_asc': $this->order = 'min_preis'; $this->ascdesc = 'ASC'; break;
 				case 'price_desc': $this->order = 'min_preis'; $this->ascdesc = 'DESC'; break;
@@ -248,69 +248,69 @@
 				case 'anr_asc': $this->order = 'anr'; $this->ascdesc = 'ASC'; break;
 				case 'anr_desc': $this->order = 'anr'; $this->ascdesc = 'DESC'; break;
-				default: $this->order = 'cdate'; $this->ascdesc = 'DESC'; 
-				
-			}
-									
+				default: $this->order = 'cdate'; $this->ascdesc = 'DESC';
+
+			}
+
 			$strQuery = "
 				SELECT
-					P.`id` 
+					P.`id`
 				FROM
 					`".WPSG_TBL_PRODUCTS."` AS P
 					".$strQueryJOIN."
-				WHERE 
+				WHERE
 					P.`deleted` != '1' AND
-					P.`lang_parent` = '0'	 
-					".$strQuerySELECT."	
-				GROUP BY 
+					P.`lang_parent` = '0'
+					".$strQuerySELECT."
+				GROUP BY
 					P.`id`
 			";
-			
+
 			$arProductIDs = $this->db->fetchAssocField($strQuery);
-						
+
 			// Seiten pro Seite
 			$filter['perPage'] = get_post_meta($post_id, 'wpsg_mod_productindex_perPage', true);
 			if ($filter['perPage'] <= 0) $filter['perPage'] = 10;
-						
+
 			// Produkte durch Module selektieren (Lagerbestand)
 			$arProducts = array();
-			
+
 			foreach ($arProductIDs as $p_id)
 			{
-			
+
 				$oProduct = wpsg_product::getInstance($p_id);
-				if ($oProduct->canDisplay()) continue;
-				
+				if (!$oProduct->canDisplay()) continue;
+
 				$product_data = $this->shop->loadProduktArray($p_id);
-					
-				if ($product_data['pstatus'] != 1) 
-				{
-					
+
+				if ($product_data['pstatus'] != 1)
+				{
+
 					// Sonst immer hinzufÃŒgen
 					$arProducts[] = $product_data;
 				}
-					
-			}
-			
+
+			}
+
 			// Anzahl an Produkten
 			$filter['count'] = sizeof($arProducts);
-			
+
 			// Anzahl an Seiten
 			$filter['pages'] = ceil($filter['count'] / $filter['perPage']);
-				 
+
 			// Aktuelle Seite
 			if (!isset($filter['page']) || $filter['page'] > $filter['pages'] || $filter['page'] <= 0) $filter['page'] = 1;
-			
+
 			// Sortieren
 			uasort($arProducts, array($this, 'order'));
-			
+
 			// Seite selektieren
 			$arProducts = array_slice($arProducts, ($filter['page'] - 1) * $filter['perPage'], $filter['perPage']);
-			
+
 			$this->shop->view['wpsg_mod_productindex']['filter'] = $filter;
-			 
+
 			return $arProducts;
-			
+
 		} // function getProducts($post_id)
-		
+
 		/**
 		 * Sortiert zwei Produktarrays nach $this->order
@@ -318,69 +318,69 @@
 		public function order($a, $b)
 		{
-			
+
 			if ($this->order == 'cdate')
 			{
- 
+
 				$a = strtotime($a[$this->order]);
 				$b = strtotime($b[$this->order]);
-				
+
 			}
 			else
 			{
-								 
+
 				$a = $a[$this->order];
 				$b = $b[$this->order];
-				
-			}
-			
-			// Vorsicht Bei Sortierung nach Datum 
+
+			}
+
+			// Vorsicht Bei Sortierung nach Datum
 			$arSearch = array("Ã", "Ã€", "Ã", "Ã¶", "Ã", "ÃŒ", "Ã", "-");
 			$arReplace = array("Ae", "ae", "Oe", "oe", "Ue", "ue", "ss", " ");
-				
+
 			$a = str_replace($arSearch, $arReplace, $a);
 			$b = str_replace($arSearch, $arReplace, $b);
-			
-			if ($a == $b) 
-			{
-			 	
+
+			if ($a == $b)
+			{
+
 				return 0;
-    		
-			}
-    		
+
+			}
+
 			if ($this->ascdesc == 'ASC')
 				return ($a < $b) ? -1 : 1;
 			else
 				return ($a > $b) ? -1 : 1;
-			
+
 		} // public function order($a, $b)
-		
-		/**
-		 * Wird zum Speichern der Page Meta Box aufgerufen 
-		 */
-		function wpsg_save_postdata($post_id) 
-		{
-			 
+
+		/**
+		 * Wird zum Speichern der Page Meta Box aufgerufen
+		 */
+		function wpsg_save_postdata($post_id)
+		{
+
 			if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;
-			
+
 			if (isset($_POST['wpsg_mod_productindex']))
 				if (!wp_verify_nonce($_POST['wpsg_mod_productindex'], plugin_basename(__FILE__))) return;
-			  
+
 			if (!isset($_POST['post_type'])) return;
-			
+
 			if ('page' == $_POST['post_type'])
 			{
-				
+
 				if (!current_user_can('edit_page', $post_id)) return;
-				
+
 			}
 			else
 			{
-				
+
 				if (!current_user_can('edit_post', $post_id)) return;
-				
-			}
-			 
+
+			}
+
 			$post_ID = $_POST['post_ID'];
-			
+
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_active', $_REQUEST['wpsg_mod_productindex_active']);
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_template', $_REQUEST['wpsg_mod_productindex_template']);
@@ -388,12 +388,12 @@
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_perPage', $_REQUEST['wpsg_mod_productindex_perPage']);
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_order', $_REQUEST['wpsg_mod_productindex_order']);
-			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_groups', array_values((array)wpsg_getArray($_REQUEST['wpsg_mod_productindex_groups'])));			    
+			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_groups', array_values((array)wpsg_getArray($_REQUEST['wpsg_mod_productindex_groups'])));
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_productids', $_REQUEST['wpsg_mod_productindex_productids']);
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_categories', array_values((array)wpsg_getArray($_REQUEST['wpsg_mod_productindex_categories'])));
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_hideOrder', $_REQUEST['wpsg_mod_productindex_hideOrder']);
 			$this->update_post_meta($post_ID, 'wpsg_mod_productindex_hideViewSelect', $_REQUEST['wpsg_mod_productindex_hideViewSelect']);
-						
-		} // function wpsg_save_postdata($post_id) 
-			
+
+		} // function wpsg_save_postdata($post_id)
+
 		/**
 		 * Hilfsfunktion damit ich die kommenden 4 Zeilen nicht x mal schreiben muss ..
@@ -401,12 +401,12 @@
 		private function update_post_meta($post_ID, $key, $value)
 		{
-			
+
 			if (get_post_meta($post_ID, $key, true) !== false)
 				update_post_meta($post_ID, $key, $value);
 			else
 				add_post_meta($post_ID, $key, $value, true);
-			
+
 		} // private function update_post_meta($post_ID, $key, $value)
-		
+
 		/**
 		 * FÃŒgt die Post Meta Boxen hinzu
@@ -414,14 +414,14 @@
 		function wpsg_add_post_meta_boxes()
 		{
-			 
+
 			$this->shop->view['wpsg_mod_productindex']['arShow'] = array(
 				'0' => __('Alle', 'wpsg'),
-				'1' => __('Auswahl', 'wpsg') 
-			);			
-			
+				'1' => __('Auswahl', 'wpsg')
+			);
+
 			// Produktgruppen ?
 			if ($this->shop->hasMod('wpsg_mod_productgroups'))
 			{
-				
+
 				$this->shop->view['wpsg_mod_productindex']['arShow']['2'] = __('Produktgruppen', 'wpsg');
 				$this->shop->view['wpsg_mod_productindex']['arProductGroups'] = $this->db->fetchAssocField("
@@ -429,38 +429,38 @@
 						PG.`id`, PG.`name`
 					FROM
-						`".WPSG_TBL_PRODUCTS_GROUP."` AS PG	
+						`".WPSG_TBL_PRODUCTS_GROUP."` AS PG
 					WHERE
 						PG.`deleted` != '1'
 					ORDER BY
-						PG.`name` ASC	
+						PG.`name` ASC
 				", "id", "name");
-								
-			}
-			
+
+			}
+
 			// Produktartikel ?
 			if ($this->shop->hasMod('wpsg_mod_produktartikel'))
 			{
-				
+
 				$this->shop->view['wpsg_mod_productindex']['arShow']['3'] = __('Kategorien', 'wpsg');
 				$this->shop->view['wpsg_mod_productindex']['arCategories'] = $this->shop->callMod('wpsg_mod_produktartikel', 'getCategorySelectArray');
 
 			}
-			
+
 			$this->shop->view['wpsg_mod_productindex']['arTemplates'] = $this->getTemplates();
-			
+
 			add_meta_box('wpsg_mod_productindex', __('wpShopGermany ProduktÃŒbersicht', 'wpsg'), array(&$this, 'wpsg_post_meta_box'), 'page');;
-			
+
 		} // function wpsg_add_post_meta_boxes()
-		
-		/**
-		 * Inhalt der Post Meta Box innerhalb der Seiten 
+
+		/**
+		 * Inhalt der Post Meta Box innerhalb der Seiten
 		 */
 		function wpsg_post_meta_box($post)
 		{
-			
+
 			wp_nonce_field(plugin_basename(__FILE__), 'wpsg_mod_productindex');
-			
+
 			$this->shop->view['wpsg_mod_productindex']['post_id'] = $post->ID;
-			 			
+
 			$this->shop->view['wpsg_mod_productindex']['arOrder'] = array(
 				'price_asc' => __('Preis (Aufsteigend)', 'wpsg'),
@@ -469,21 +469,21 @@
 				'name_desc' => __('Name (Absteigend)', 'wpsg'),
 				'cdate_asc' => __('Erstellungsdatum (Ãlteste zuerst)', 'wpsg'),
-				'cdate_desc' => __('Erstellungsdatum (Neueste zuerst)', 'wpsg'),		
+				'cdate_desc' => __('Erstellungsdatum (Neueste zuerst)', 'wpsg'),
 				'anr_asc' => __('Artikelnummer (Aufsteigend)', 'wpsg'),
-				'anr_desc' => __('Artikelnummer (Absteigend)', 'wpsg')	
+				'anr_desc' => __('Artikelnummer (Absteigend)', 'wpsg')
 			);
-			
+
 			if ($this->shop->hasMod('wpsg_mod_produktartikel'))
 			{
-				
+
 				$this->shop->view['wpsg_mod_productindex']['arOrder']['pos_asc'] = __('Position (Aufsteigend)', 'wpsg');
 				$this->shop->view['wpsg_mod_productindex']['arOrder']['pos_desc'] = __('Position (Absteigend)', 'wpsg');
-				
-			}
-			
+
+			}
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productindex/page_metabox.phtml');
-			
+
 		} // function wpsg_post_meta_box()
-		
+
 		/**
 		 * Gibt einen Array mit den verfÃŒgbaren Templates zurÃŒck
@@ -491,9 +491,9 @@
 		private function getTemplates()
 		{
-			
+
 			$arTemplates = array();
-			
+
 			$handle = @opendir(WPSG_PATH_VIEW.'/mods/mod_productindex/layouts/');
-			
+
 			if ($handle) {
 				while ($file = readdir($handle))
@@ -501,17 +501,17 @@
 					if (is_file(WPSG_PATH_VIEW.'/mods/mod_productindex/layouts/'.$file) && preg_match('/(.*).phtml$/', $file))
 					{
-						
+
 						$arTemplates[] = $file;
-						
+
 					}
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 			@closedir($handle);
-			
+
 			$handle = @opendir(WPSG_PATH_USERVIEW_OLD.'/mods/mod_productindex/layouts/');
-			
+
 			if ($handle) {
 				while ($file = readdir($handle))
@@ -519,15 +519,15 @@
 					if (is_file(WPSG_PATH_USERVIEW_OLD.'/mods/mod_productindex/layouts/'.$file) && preg_match('/(.*).phtml$/', $file) && !in_array($file, $arTemplates))
 					{
-						
+
 						$arTemplates[] = $file;
-						
+
 					}
 				}
 			}
-			
+
 			@closedir($handle);
-			
+
 			$handle = @opendir(WPSG_PATH_USERVIEW.'/mods/mod_productindex/layouts/');
-			
+
 			if ($handle) {
 				while ($file = readdir($handle))
@@ -535,17 +535,17 @@
 					if (is_file(WPSG_PATH_USERVIEW.'/mods/mod_productindex/layouts/'.$file) && preg_match('/(.*).phtml$/', $file) && !in_array($file, $arTemplates))
 					{
-						
+
 						$arTemplates[] = $file;
-						
+
 					}
 				}
 			}
-			
+
 			@closedir($handle);
-			
+
 			return $arTemplates;
-			 
+
 		} // private function getTemplates()
-		
+
 	} // class wpsg_mod_productindex extends wpsg_mod_basic
 
Index: /views/mods/mod_productindex/layouts/grid.phtml
===================================================================
--- /views/mods/mod_productindex/layouts/grid.phtml	(revision 6340)
+++ /views/mods/mod_productindex/layouts/grid.phtml	(revision 6341)
@@ -3,5 +3,5 @@
 	/**
 	 * Template fÃŒr die ProduktÃŒbersichtsseite (Gitteransicht)
-	 */ 
+	 */
 
 	/* Modus fÃŒr das Vorschaubild */
@@ -11,10 +11,10 @@
 	$nPicWidth = 140;
 	$nPicHeight = 140;
-	
+
 	/* Wenn es auf false gesetzt wird, wird das erste Bild als Vorschaubild verwendet */
 	$nPicRand = true;
-	
+
 	$col = 4;
-	
+
 ?>
 
@@ -23,183 +23,24 @@
 	remove_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
 	the_content();
-	add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));	
-	
+	add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
+
 ?>
 
 <div class="wpsg_mod_productindex wpsg_mod_productindex_grid">
- 
+
 	<form method="get" id="wpsg_mod_productindex_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
- 		
+
  		<?php parse_str($_SERVER['QUERY_STRING'], $arGET); if (wpsg_isSizedArray($arGET)) { foreach ($arGET as $key => $value) { if (!wpsg_isSizedArray($value)) { ?>
  		<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>" />
  		<?php } } } ?>
- 		
+
 		<input type="hidden" id="wpsg_mod_productindex_filter_page" name="wpsg_mod_productindex[filter][page]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['page']; ?>" />
-		<input type="hidden" id="wpsg_mod_productindex_filter_order" name="wpsg_mod_productindex[filter][order]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['order']; ?>" /> 
+		<input type="hidden" id="wpsg_mod_productindex_filter_order" name="wpsg_mod_productindex[filter][order]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['order']; ?>" />
 		<input type="hidden" id="wpsg_mod_productindex_template" name="wpsg_mod_productindex[template]" value="<?php echo $this->view['wpsg_mod_productindex']['template']; ?>" />
-	
+
 	</form>
-	
+
 	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_top">
-		
-		<?php if ($this->view['hideOrder'] != '1') { ?>
-		<div class="wpsg_mod_productindex_order">		
-			<span><?php echo __('Sortierung:', 'wpsg'); ?></span>
-			<select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
-				<option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
-				<option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (GrÃ¶Ãter zuerst)', 'wpsg'); ?></option>
-				<option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
-				<option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
-				<option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Ãlteste zuerst)', 'wpsg'); ?></option>
-				<option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
-				<option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
-				<option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
-			</select>
-		</div>
-		<?php } ?>
-		
-		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
-		<div class="wpsg_mod_productindex_pager">
-			<span><?php echo __('Seite:', 'wpsg'); ?></span>
-			<ul>
-				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
-				<li>
-					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) {Â ?>
-					<span><?php echo $i; ?></span>
-					<?php } else {Â ?>
-					<a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
-					<?php } ?>
-				</li>
-				<?php } ?>
-			</ul>
-		</div>
-		<?php } ?>
-		
-		<?php if ($this->view['hideViewSelect'] != '1') { ?>
-		<div class="wpsg_mod_productindex_viewselect">
-			<a href="#" onclick="return wpsg_mod_productindex_viewselect('list.phtml');" title="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>">
-				<img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_list.png'); ?>" alt="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>" />
-			</a>
-		</div>
-		<?php } ?>
-		
-		<div class="wpsg_clear"></div>
-		
-	</div>
-
-	<?php if (wpsg_isSizedArray($this->view['arProducts'])) { ?>
-	
-		<?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
-		
-			<?php if (($i - 1) % $col == 0) { ?><div class="wpsg_mod_productindex_productrow"><?php } ?>
-		 
-			<div class="wpsg_mod_productindex_product <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>" style="width:<?php echo round((100 / $col), 2) ?>%;"> 
-				<div class="wpsg_mod_productindex_product_inner">
-					<?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($p['id'])); ?>
-					<div class="wpsg_mod_productindex_pic">
-						<?php if (wpsg_isSizedArray($arBilder)) { ?>
-						<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
-							<?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?> 
-							
-							<?php 
-							$href = wp_get_attachment_image_src($arBilder[$nPicIndex]['post_id'], Array(800, 600));
-							$imgtag = wp_get_attachment_image($arBilder[$nPicIndex]['post_id'], Array($nPicWidth, $nPicHeight));
-							?>	
-							<?php echo $imgtag; ?>
-						</a>
-						<?php } ?>
-					</div>
-					<?php } ?>
-					<div class="wpsg_mod_productindex_content">
-						<div class="wpsg_mod_productindex_title">
-							<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
-						</div> 
-						<div class="wpsg_mod_productindex_infos"> 
-							<div class="wpsg_mod_productindex_weight">
-								<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
-								<?php if ($p['min_weight'] == $p['max_weight']) { ?>
-								<?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?> 
-								<?php } else { ?>
-								<?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
-								<?php } ?>
-								<?php } ?>
-							</div>
-							
-							<div class="wpsg_mod_productindex_fmenge">
-								<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') {Â ?>
-								<?php echo wpsg_translate(__('FÃŒllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
-								<?php } ?>
-							</div>					
-							
-							<div class="wpsg_mod_productindex_gpreis">
-								<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
-								<?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'), 
-										wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
-										wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
-								); ?>
-								<?php } ?>
-							</div>	
-						</div>			
-																		
-						<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProductindex') == '1') { ?>
-							<div class="wpsg_mod_produktindex_stock">
-								<?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $p['stock']);  ?>	
-							</div>
-						<?php } ?>
-						
-						<?php /*Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer START*/?>
-						<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>				
-							<div class="wpsg_mod_productindex_price">
-								<?php if ($p['min_preis'] == $p['max_preis']) { ?>
-									<?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
-								<?php } else { ?>
-									<?php echo wpsg_translate(__('ab #1#', 'wpsg'), wpsg_ff($p['min_preis'], $this->get_option('wpsg_currency'))); ?>
-								<?php } ?>
-							</div>
-							<?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>		
-							<div class="wpsg_produkt_preishinweis">
-								<?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
-							</div>
-							<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>	
-							<div class="wpsg_produkt_preishinweis">		
-								<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
-								<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
-								<?php } else { /* Frontend = BRUTTO Preise */ ?>
-								<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
-								<?php } ?>
-							</div>	
-							<?php } ?>
-						<?php }else{?>
-								<?php echo wpsg_translate(__('Preise nur fÃŒr eingeloggte Benutzer', 'wpsg')); ?>
-						<?php } /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer ENDE */?>	
-																		
-						<div class="wpsg_mod_productindex_button">
-						
-							<?php //if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($this->getProduktID($p['id']), 1)) === false) { ?>
-							<?php if (false) { ?>
-							<span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
-							<?php } else { ?>						
-							<a class="wpsg_button" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
-							<?php } ?>
-							
-						</div>
-						
-					</div>
-					<div class="wpsg_clear"></div>
-				</div>				
-			</div> 
-		
-			<?php if (($i - 1) % $col == ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
-		
-		<?php } ?>
-		
-		<?php if (($i - 1) % $col != ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
-	
-	<?php } else { ?>
-	<div class="wpsg_mod_productindex_empty"><?php echo __('Keine passenden Produkte gefunden.', 'wpsg'); ?></div>
-	<?php } ?>
-	
-	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_bottom">
-		
+
 		<?php if ($this->view['hideOrder'] != '1') { ?>
 		<div class="wpsg_mod_productindex_order">
@@ -217,5 +58,5 @@
 		</div>
 		<?php } ?>
-		
+
 		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
 		<div class="wpsg_mod_productindex_pager">
@@ -224,7 +65,7 @@
 				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
 				<li>
-					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) {Â ?>
+					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
 					<span><?php echo $i; ?></span>
-					<?php } else {Â ?>
+					<?php } else { ?>
 					<a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
 					<?php } ?>
@@ -234,5 +75,5 @@
 		</div>
 		<?php } ?>
-		
+
 		<?php if ($this->view['hideViewSelect'] != '1') { ?>
 		<div class="wpsg_mod_productindex_viewselect">
@@ -242,7 +83,166 @@
 		</div>
 		<?php } ?>
-		
+
 		<div class="wpsg_clear"></div>
-		
+
+	</div>
+
+	<?php if (wpsg_isSizedArray($this->view['arProducts'])) { ?>
+
+		<?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
+
+			<?php if (($i - 1) % $col == 0) { ?><div class="wpsg_mod_productindex_productrow"><?php } ?>
+
+			<div class="wpsg_mod_productindex_product <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>" style="width:<?php echo round((100 / $col), 2) ?>%;">
+				<div class="wpsg_mod_productindex_product_inner">
+					<?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($p['id'])); ?>
+					<div class="wpsg_mod_productindex_pic">
+						<?php if (wpsg_isSizedArray($arBilder)) { ?>
+						<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
+							<?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
+
+							<?php
+							$href = wp_get_attachment_image_src($arBilder[$nPicIndex]['post_id'], Array(800, 600));
+							$imgtag = wp_get_attachment_image($arBilder[$nPicIndex]['post_id'], Array($nPicWidth, $nPicHeight));
+							?>
+							<?php echo $imgtag; ?>
+						</a>
+						<?php } ?>
+					</div>
+					<?php } ?>
+					<div class="wpsg_mod_productindex_content">
+						<div class="wpsg_mod_productindex_title">
+							<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
+						</div>
+						<div class="wpsg_mod_productindex_infos">
+							<div class="wpsg_mod_productindex_weight">
+								<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
+								<?php if ($p['min_weight'] == $p['max_weight']) { ?>
+								<?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+								<?php } else { ?>
+								<?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+								<?php } ?>
+								<?php } ?>
+							</div>
+
+							<div class="wpsg_mod_productindex_fmenge">
+								<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') {Â ?>
+								<?php echo wpsg_translate(__('FÃŒllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
+								<?php } ?>
+							</div>
+
+							<div class="wpsg_mod_productindex_gpreis">
+								<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
+								<?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
+										wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
+										wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
+								); ?>
+								<?php } ?>
+							</div>
+						</div>
+
+						<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProductindex') == '1') { ?>
+							<div class="wpsg_mod_produktindex_stock">
+								<?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $p['stock']);  ?>
+							</div>
+						<?php } ?>
+
+						<?php /*Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer START*/?>
+						<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>
+							<div class="wpsg_mod_productindex_price">
+								<?php if ($p['min_preis'] == $p['max_preis']) { ?>
+									<?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
+								<?php } else { ?>
+									<?php echo wpsg_translate(__('ab #1#', 'wpsg'), wpsg_ff($p['min_preis'], $this->get_option('wpsg_currency'))); ?>
+								<?php } ?>
+							</div>
+							<?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
+							<div class="wpsg_produkt_preishinweis">
+								<?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
+							</div>
+							<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
+							<div class="wpsg_produkt_preishinweis">
+								<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
+								<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+								<?php } else { /* Frontend = BRUTTO Preise */ ?>
+								<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+								<?php } ?>
+							</div>
+							<?php } ?>
+						<?php }else{?>
+								<?php echo wpsg_translate(__('Preise nur fÃŒr eingeloggte Benutzer', 'wpsg')); ?>
+						<?php } /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer ENDE */?>
+
+						<div class="wpsg_mod_productindex_button">
+
+							<?php //if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($this->getProduktID($p['id']), 1)) === false) { ?>
+							<?php if (false) { ?>
+							<span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
+							<?php } else { ?>
+							<a class="wpsg_button" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
+							<?php } ?>
+
+						</div>
+
+					</div>
+					<div class="wpsg_clear"></div>
+				</div>
+			</div>
+
+			<?php if (($i - 1) % $col == ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
+
+		<?php } ?>
+
+		<?php if (($i - 1) % $col != ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
+
+	<?php } else { ?>
+	<div class="wpsg_mod_productindex_empty"><?php echo __('Keine passenden Produkte gefunden.', 'wpsg'); ?></div>
+	<?php } ?>
+
+	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_bottom">
+
+		<?php if ($this->view['hideOrder'] != '1') { ?>
+		<div class="wpsg_mod_productindex_order">
+			<span><?php echo __('Sortierung:', 'wpsg'); ?></span>
+			<select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
+				<option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
+				<option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (GrÃ¶Ãter zuerst)', 'wpsg'); ?></option>
+				<option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
+				<option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
+				<option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Ãlteste zuerst)', 'wpsg'); ?></option>
+				<option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
+				<option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
+				<option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
+			</select>
+		</div>
+		<?php } ?>
+
+		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
+		<div class="wpsg_mod_productindex_pager">
+			<span><?php echo __('Seite:', 'wpsg'); ?></span>
+			<ul>
+				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
+				<li>
+					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
+					<span><?php echo $i; ?></span>
+					<?php } else { ?>
+					<a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
+					<?php } ?>
+				</li>
+				<?php } ?>
+			</ul>
+		</div>
+		<?php } ?>
+
+		<?php if ($this->view['hideViewSelect'] != '1') { ?>
+		<div class="wpsg_mod_productindex_viewselect">
+			<a href="#" onclick="return wpsg_mod_productindex_viewselect('list.phtml');" title="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>">
+				<img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_list.png'); ?>" alt="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>" />
+			</a>
+		</div>
+		<?php } ?>
+
+		<div class="wpsg_clear"></div>
+
 	</div>
 
@@ -263,5 +263,5 @@
 
 		return false;
-		
+
 	} // function wpsg_mod_productindex_goPage(page)
 
@@ -273,17 +273,17 @@
 
 		return false;
-		
+
 	} // function wpsg_mod_productindex_viewselect(template)
-	
+
 	jQuery(document).ready(function() {
 
 		jQuery('.wpsg_mod_productindex_filter_order').bind('change', function() {
-			
+
 			jQuery('#wpsg_mod_productindex_filter_order').val(jQuery(this).find('option:selected').attr('value'));
 			jQuery('#wpsg_mod_productindex_filter_page').val('1');
-			jQuery('#wpsg_mod_productindex_form').submit(); 
-					
+			jQuery('#wpsg_mod_productindex_form').submit();
+
 		} );
-		
+
 	} );
 
Index: /views/mods/mod_productindex/layouts/list.phtml
===================================================================
--- /views/mods/mod_productindex/layouts/list.phtml	(revision 6340)
+++ /views/mods/mod_productindex/layouts/list.phtml	(revision 6341)
@@ -3,5 +3,5 @@
 	/**
 	 * Template fÃŒr die ProduktÃŒbersichtsseite
-	 */ 
+	 */
 
 	/* Modus fÃŒr das Vorschaubild */
@@ -11,8 +11,8 @@
 	$nPicWidth = 100;
 	$nPicHeight = 100;
-	
+
 	/* Wenn es auf false gesetzt wird, wird das erste Bild als Vorschaubild verwendet */
 	$nPicRand = true;
-	
+
 ?>
 
@@ -21,24 +21,24 @@
 	remove_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
 	the_content();
-	add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));	
-	
+	add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
+
 ?>
 
 <div class="wpsg_mod_productindex wpsg_mod_productindex_list">
-	
+
 	<form method="get" id="wpsg_mod_productindex_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
- 		
+
  		<?php parse_str($_SERVER['QUERY_STRING'], $arGET); if (wpsg_isSizedArray($arGET)) { foreach ($arGET as $key => $value) { if (!wpsg_isSizedArray($value)) { ?>
  		<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>" />
  		<?php } } } ?>
- 		
+
 		<input type="hidden" id="wpsg_mod_productindex_filter_page" name="wpsg_mod_productindex[filter][page]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['page']; ?>" />
 		<input type="hidden" id="wpsg_mod_productindex_filter_order" name="wpsg_mod_productindex[filter][order]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['order']; ?>" />
 		<input type="hidden" id="wpsg_mod_productindex_template" name="wpsg_mod_productindex[template]" value="<?php echo $this->view['wpsg_mod_productindex']['template']; ?>" />
-	
+
 	</form>
-	
+
 	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_top">
-		
+
 		<?php if ($this->view['hideOrder'] != '1') { ?>
 		<div class="wpsg_mod_productindex_order">
@@ -56,5 +56,5 @@
 		</div>
 		<?php } ?>
-		
+
 		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
 		<div class="wpsg_mod_productindex_pager">
@@ -63,7 +63,7 @@
 				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
 				<li>
-					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) {Â ?>
+					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
 					<span><?php echo $i; ?></span>
-					<?php } else {Â ?>
+					<?php } else { ?>
 					<a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
 					<?php } ?>
@@ -73,5 +73,5 @@
 		</div>
 		<?php } ?>
-		
+
 		<?php if ($this->view['hideViewSelect'] != '1') { ?>
 		<div class="wpsg_mod_productindex_viewselect">
@@ -81,23 +81,23 @@
 		</div>
 		<?php } ?>
-		
+
 		<div class="wpsg_clear"></div>
-		
+
 	</div>
 
 	<?php if (wpsg_isSizedArray($this->view['arProducts'])) { ?>
-	
+
 		<?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
-		<div class="wpsg_mod_productindex_product <?php echo (($i % 2 == 0)?'odd':'even'); ?> <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>"> 
+		<div class="wpsg_mod_productindex_product <?php echo (($i % 2 == 0)?'odd':'even'); ?> <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>">
 			<?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($p['id'])); ?>
 			<div class="wpsg_mod_productindex_pic">
 				<?php if (wpsg_isSizedArray($arBilder)) { ?>
 				<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
-					<?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?> 
-
-					<?php 
+					<?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
+
+					<?php
 					$href = wp_get_attachment_image_src($arBilder[$nPicIndex]['post_id'], Array(800, 600));
 					$imgtag = wp_get_attachment_image($arBilder[$nPicIndex]['post_id'], Array($nPicWidth, $nPicHeight));
-					?>	
+					?>
 					<?php echo $imgtag; ?>
 				</a>
@@ -106,9 +106,9 @@
 			<?php } ?>
 			<div class="wpsg_mod_productindex_content">
-				<div class="wpsg_mod_productindex_infos"> 
+				<div class="wpsg_mod_productindex_infos">
 					<div class="wpsg_mod_productindex_weight">
 						<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
 						<?php if ($p['min_weight'] == $p['max_weight']) { ?>
-						<?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?> 
+						<?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
 						<?php } else { ?>
 						<?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
@@ -116,25 +116,25 @@
 						<?php } ?>
 					</div>
-					
+
 					<div class="wpsg_mod_productindex_fmenge">
 						<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') {Â ?>
 						<?php echo wpsg_translate(__('FÃŒllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
 						<?php } ?>
-					</div>				
-					
+					</div>
+
 					<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProductindex') == '1') { ?>
 						<div class="wpsg_mod_produktindex_stock">
-							<?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $p['stock']);  ?>	
+							<?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $p['stock']);  ?>
 						</div>
 					<?php } ?>
-					
+
 					<div class="wpsg_mod_productindex_gpreis">
 						<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
-						<?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'), 
+						<?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
 								wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
 								wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
 						); ?>
 						<?php } ?>
-					</div>	
+					</div>
 				</div>
 				<div class="wpsg_mod_productindex_title">
@@ -142,7 +142,7 @@
 				</div>
 				<div class="wpsg_mod_productindex_description"><?php echo $p['beschreibung']; ?></div>
-				
+
 				<?php /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer START */?>
-				<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>			
+				<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>
 					<div class="wpsg_mod_productindex_price">
 						<?php if ($p['min_preis'] == $p['max_preis']) { ?>
@@ -152,10 +152,10 @@
 						<?php } ?>
 					</div>
-					<?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>		
+					<?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
 					<div class="wpsg_produkt_preishinweis">
 						<?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
 					</div>
-					<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>	
-					<div class="wpsg_produkt_preishinweis">		
+					<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
+					<div class="wpsg_produkt_preishinweis">
 						<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
 						<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
@@ -163,30 +163,30 @@
 						<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
 						<?php } ?>
-					</div>	
+					</div>
 					<?php } ?>
 				<?php }else{?>
 						<?php echo wpsg_translate(__('Preise nur fÃŒr eingeloggte Benutzer', 'wpsg')); ?>
 				<?php } /* Abfrage Preisanzeige nur fÃŒr eingeloggte Benutzer ENDE */?>
-				
-				<div class="wpsg_mod_productindex_button">					
+
+				<div class="wpsg_mod_productindex_button">
 					<?php //if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($this->getProduktID($p['id']), 1)) === false) { ?>
 					<?php if (false) { ?>
 					<span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
-					<?php } else { ?>		
+					<?php } else { ?>
 					<a class="wpsg_button" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
 					<?php } ?>
 				</div>
-				
+
 			</div>
-			<div class="wpsg_clear"></div>				
-		</div>
-		<?php } ?>
-	
+			<div class="wpsg_clear"></div>
+		</div>
+		<?php } ?>
+
 	<?php } else { ?>
 	<div class="wpsg_mod_productindex_empty"><?php echo __('Keine passenden Produkte gefunden.', 'wpsg'); ?></div>
 	<?php } ?>
-	
+
 	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_bottom">
-		
+
 		<?php if ($this->view['hideOrder'] != '1') { ?>
 		<div class="wpsg_mod_productindex_order">
@@ -204,14 +204,14 @@
 		</div>
 		<?php } ?>
-		
+
 		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
 		<div class="wpsg_mod_productindex_pager">
 			<span><?php echo __('Seite:', 'wpsg'); ?></span>
 			<ul>
-				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
+				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i++) { ?>
 				<li>
-					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) {Â ?>
+					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
 					<span><?php echo $i; ?></span>
-					<?php } else {Â ?>
+					<?php } else { ?>
 					<a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
 					<?php } ?>
@@ -221,5 +221,5 @@
 		</div>
 		<?php } ?>
-		
+
 		<?php if ($this->view['hideViewSelect'] != '1') { ?>
 		<div class="wpsg_mod_productindex_viewselect">
@@ -229,7 +229,7 @@
 		</div>
 		<?php } ?>
-		
+
 		<div class="wpsg_clear"></div>
-		
+
 	</div>
 
@@ -250,5 +250,5 @@
 
 		return false;
-		
+
 	} // function wpsg_mod_productindex_goPage(page)
 
@@ -260,17 +260,17 @@
 
 		return false;
-		
+
 	} // function wpsg_mod_productindex_viewselect(template)
-	
+
 	jQuery(document).ready(function() {
 
 		jQuery('.wpsg_mod_productindex_filter_order').bind('change', function() {
-			
+
 			jQuery('#wpsg_mod_productindex_filter_order').val(jQuery(this).find('option:selected').attr('value'));
 			jQuery('#wpsg_mod_productindex_filter_page').val('1');
-			jQuery('#wpsg_mod_productindex_form').submit(); 
-					
+			jQuery('#wpsg_mod_productindex_form').submit();
+
 		} );
-		
+
 	} );
 
