Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 5519)
+++ /controller/wpsg_ShopController.class.php	(revision 5521)
@@ -1508,5 +1508,5 @@
 				
 			}
-			
+			 
 			// Artikelnummer
 			$produkt['anr'] = $this->getProductAnr($produkt['id']);
Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 5519)
+++ /lib/functions.inc.php	(revision 5521)
@@ -90,4 +90,16 @@
 		
 	} // function wpsg_isValidEMail($val)
+	
+	/**
+	 * Definiert eine Konstante, wenn Sie noch nicht definiert wurde
+	 * @param unknown $name
+	 * @param unknown $value
+	 */
+	function wpsg_define($name, $value)
+	{
+		
+		if (!defined($name)) define($name, $value);
+		
+	} // function wpsg_define($name, $value)
 	
 	/**
Index: /model/wpsg_product.class.php
===================================================================
--- /model/wpsg_product.class.php	(revision 5519)
+++ /model/wpsg_product.class.php	(revision 5521)
@@ -288,4 +288,50 @@
 		/* Statische Funktionen */
 		
+		public static function findMaxPrice($arFilter = array())
+		{
+			
+			list($strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
+				
+			$strQuery = "
+				SELECT
+					MAX(P.`preis`)
+				FROM
+					`".WPSG_TBL_PRODUCTS."` AS P
+						".$strQueryJOIN."
+				WHERE
+					1
+					".$strQueryWHERE."
+				HAVING
+					1
+					".$strQueryHAVING."
+			";
+				
+			return $GLOBALS['wpsg_db']->fetchOne($strQuery);
+			
+		}
+		
+		public static function findMinPrice($arFilter = array())
+		{
+		
+			list($strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
+			
+			$strQuery = "
+				SELECT
+					MIN(P.`preis`)
+				FROM
+					`".WPSG_TBL_PRODUCTS."` AS P
+						".$strQueryJOIN."
+				WHERE
+					1
+					".$strQueryWHERE."				
+				HAVING
+					1
+					".$strQueryHAVING."
+			";
+					 	
+			return $GLOBALS['wpsg_db']->fetchOne($strQuery);
+			
+		} // public static function getMinPrice($arFilter = array())
+				
 		public static function find($arFilter = array(), $load = true)
 		{
@@ -310,5 +356,5 @@
 					".$strQueryORDER."				
 			";
-				
+			 
 			$arID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
 			$arReturn = array();
@@ -328,10 +374,14 @@
 		public static function getQueryParts($arFilter = array())
 		{
-		
+		  
 			$strQueryWHERE = "";
 			$strQueryJOIN = "";
 			$strQueryHAVING = "";
-			$strQueryORDER = " P.`cdate` ASC ";
-				
+			$strQueryORDER = "";
+			
+			if (wpsg_isSizedString($arFilter['order_col'])) $strQueryORDER .= " ".$arFilter['order_col']." ";
+			if (wpsg_isSizedString($arFilter['order_direction'])) $strQueryORDER .= $arFilter['order_direction'];			
+			if (!wpsg_isSizedString($strQueryORDER)) $strQueryORDER = " P.`cdate` ASC ";
+			
 			if (wpsg_isSizedArray($arFilter['product_ids'])) $strQueryWHERE .= " AND P.`id` IN (".wpsg_q(implode(',', $arFilter['product_ids'])).") ";
 			if (wpsg_isSizedArray($arFilter['productgroup_ids'])) $strQueryWHERE .= " AND P.`pgruppe` IN (".wpsg_q(implode(',', $arFilter['productgroup_ids'])).") ";
@@ -339,12 +389,44 @@
 			if (wpsg_isSizedString($arFilter['price_max'])) $strQueryWHERE .= " AND P.`preis` <= '".wpsg_q($arFilter['price_max'])."' ";
 			
-			if (wpsg_isSizedArray($arFilter['cat_ids']))
+			if (wpsg_isSizedArray($arFilter['cat_ids']) && $GLOBALS['wpsg_sc']->hasMod('wpsg_mod_produktartikel'))
 			{
 				
 				$strQueryJOIN .= " LEFT JOIN `".wpsg_q($GLOBALS['wpsg_sc']->prefix.'posts')."` AS POST ON (POST.`wpsg_produkt_id` = P.`id`) ";
 				$strQueryJOIN .= " LEFT JOIN `".wpsg_q($GLOBALS['wpsg_sc']->prefix.'term_relationships')."` AS PCAT ON (POST.`ID` = PCAT.`object_id`) ";
-				
+			
 				$strQueryWHERE .= " AND PCAT.`term_taxonomy_id` IN (".wpsg_q(implode(',', $arFilter['cat_ids'])).") ";
 				
+			}
+			
+			if (wpsg_isSizedArray($arFilter['variants']))
+			{
+								
+				foreach (wpsg_trim($arFilter['variants']) as $variant_id => $variation_id) 
+				{
+									
+					$in = wpsg_q($variant_id);
+					$strQueryJOIN .= " RIGHT JOIN `".WPSG_TBL_PRODUCTS_VARIATION."` AS PVI".$in." ON (PVI".$in.".`product_id` = P.`id` AND PVI".$in.".`variation_id` IN (".wpsg_q($variation_id).") AND PVI".$in.".`active` = '1') ";
+										
+				}
+				 				
+			}
+			
+			if (wpsg_isSizedArray($arFilter['attributs']))
+			{
+				
+				foreach ($arFilter['attributs'] as $attribut_id => $attribut_value)
+				{
+					
+					$in = wpsg_q($attribut_id);
+					$arValues = wpsg_trim(explode(',', $attribut_value));
+					 
+					$strQueryJOIN_ATTRIBUTE_ON  = " ( 0 ";
+					foreach ($arValues as $k => $value) $strQueryJOIN_ATTRIBUTE_ON .= " OR PA".$in.".`value` = '".wpsg_q($value)."' ";
+					$strQueryJOIN_ATTRIBUTE_ON .= " ) ";
+					
+					$strQueryJOIN .= " RIGHT JOIN `".WPSG_TBL_PRODUCTS_AT."` AS PA".$in." ON (PA".$in.".`p_id` = P.`id` AND PA".$in.".`a_id` = '".wpsg_q($attribut_id)."' AND ".$strQueryJOIN_ATTRIBUTE_ON.") ";
+					
+				}
+				 
 			}
 			
Index: /mods/wpsg_mod_discount.class.php
===================================================================
--- /mods/wpsg_mod_discount.class.php	(revision 5519)
+++ /mods/wpsg_mod_discount.class.php	(revision 5521)
@@ -150,5 +150,5 @@
 				if (isset($_REQUEST['wpsg_lang'])) return;
 			
-				$this->shop->view['wpsg_mod_discount']['data'] = explode("_", $produkt_data['rabatt']);
+				$this->shop->view['wpsg_mod_discount']['data'] = explode("_", $product_data['rabatt']);
 			
 			}
Index: /mods/wpsg_mod_downloadplus.class.php
===================================================================
--- /mods/wpsg_mod_downloadplus.class.php	(revision 5519)
+++ /mods/wpsg_mod_downloadplus.class.php	(revision 5521)
@@ -264,6 +264,5 @@
 			
 		} // public function produkt_save(&$produkt_id)
-		
-		
+		 
 		/*
 		 * zeigt ein Upload-Formular im linken Bereich des Produktbackend an
@@ -272,10 +271,10 @@
 		{
 			if (isset($_REQUEST['wpsg_lang'])) return;
-				
-			if ($produkt_data['id'] > 0)
-			{
-			
-				$this->shop->view['data'] = $produkt_data;
-				$this->shop->view['filesList'] = $this->renderFilesList($produkt_data['id']);
+			
+			if ($product_data['id'] > 0)
+			{
+			
+				$this->shop->view['data'] = $product_data;
+				$this->shop->view['filesList'] = $this->renderFilesList($product_data['id']);
 			
 			}
@@ -284,11 +283,10 @@
 		
 			$product_content['wpsg_mod_downloadplus'] = array(
-					'title' => __('DownloadPlus Produkt', 'wpsg'),
-					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_downloadplus/produkt_addedit_sidebar.phtml', false)
+				'title' => __('DownloadPlus Produkt', 'wpsg'),
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_downloadplus/produkt_addedit_sidebar.phtml', false)
 			);
 		
 		} //public function product_addedit_content(&$product_content, &$product_data)
-
-		
+ 
 		public function setOrderStatus($order_id, $status_id, $inform)
 		{
Index: /mods/wpsg_mod_downloadprodukte.class.php
===================================================================
--- /mods/wpsg_mod_downloadprodukte.class.php	(revision 5519)
+++ /mods/wpsg_mod_downloadprodukte.class.php	(revision 5521)
@@ -81,7 +81,7 @@
 		{
 			
-			$this->shop->view['data'] = $produkt_data;
-			$this->shop->view['prodFiles'] = $this->getProdFileListe($produkt_data['id']);
-			$this->shop->view['wpsg_mod_downloadprodukte']['path'] = str_replace('\\', '\\\\', $this->getFilePath($produkt_data['id']));
+			$this->shop->view['data'] = $product_data;
+			$this->shop->view['prodFiles'] = $this->getProdFileListe($product_data['id']);
+			$this->shop->view['wpsg_mod_downloadprodukte']['path'] = str_replace('\\', '\\\\', $this->getFilePath($product_data['id']));
 			
 			$this->shop->view['wpsg_mod_downloadprodukte']['data'] = $product_data;
Index: /mods/wpsg_mod_productgroups.class.php
===================================================================
--- /mods/wpsg_mod_productgroups.class.php	(revision 5519)
+++ /mods/wpsg_mod_productgroups.class.php	(revision 5521)
@@ -299,5 +299,5 @@
 				if (isset($_REQUEST['wpsg_lang'])) return;
 			
-				$this->shop->view['wpsg_mod_productgroups']['produkt_data'] = $produkt_data;
+				$this->shop->view['wpsg_mod_productgroups']['produkt_data'] = $product_data;
 				$this->shop->view['wpsg_mod_productgroups']['data'] = array();
 				$this->shop->view['wpsg_mod_productgroups']['data'][0] = __('Nicht zugewiesen.', 'wpsg'); 
@@ -316,14 +316,14 @@
 				$this->shop->view['wpsg_mod_productgroups']['data'] = array_diff_key($this->shop->view['wpsg_mod_productgroups']['data'], $groups_db) + $groups_db;
 				
-				$sticky_data = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_STICKY."` WHERE `produkt_id` = '".wpsg_q($produkt_data['id'])."'");
+				$sticky_data = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_STICKY."` WHERE `produkt_id` = '".wpsg_q($product_data['id'])."'");
 							
 				if ($sticky_data['von'] > 0) $this->shop->view['wpsg_mod_productgroups']['sticky_von'] = date('d.m.Y', $sticky_data['von']);
 				if ($sticky_data['bis'] > 0) $this->shop->view['wpsg_mod_productgroups']['sticky_bis'] = date('d.m.Y', $sticky_data['bis']);;
 						
-				}
-		
+			}
+			
 			$product_content['wpsg_mod_productgroups'] = array(
-					'title' => __('Produktgruppen', 'wpsg'),
-					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productgroups/produkt_addedit_sidebar.phtml', false)
+				'title' => __('Produktgruppen', 'wpsg'),
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productgroups/produkt_addedit_sidebar.phtml', false)
 			);
 		
Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 5519)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 5521)
@@ -26,5 +26,5 @@
 				
 			self::$arTypeLabel = array(
-				self::TYPE_SELECT => __('anteilig', 'wpsg'),
+				self::TYPE_SELECT => __('Select Box', 'wpsg'),
 				self::TYPE_RADIO => __('Radio Boxen', 'wpsg'),
 				self::TYPE_IMAGE => __('Bilderauswahl', 'wpsg')
@@ -35,8 +35,8 @@
 			$this->desc = __('ErmÃ¶glicht es zentral Varianten anzulegen und diese im Produkt zu aktivieren.', 'wpsg');
 			
-			define('WPSG_TBL_VARIANTS', $this->shop->prefix.'wpsg_variants');
-			define('WPSG_TBL_VARIANTS_VARI', $this->shop->prefix.'wpsg_variants_vari');
-			define('WPSG_TBL_PRODUCTS_VARIANT', $this->shop->prefix.'wpsg_products_variant');
-			define('WPSG_TBL_PRODUCTS_VARIATION', $this->shop->prefix.'wpsg_products_variation');
+			wpsg_define('WPSG_TBL_VARIANTS', $this->shop->prefix.'wpsg_variants');
+			wpsg_define('WPSG_TBL_VARIANTS_VARI', $this->shop->prefix.'wpsg_variants_vari');
+			wpsg_define('WPSG_TBL_PRODUCTS_VARIANT', $this->shop->prefix.'wpsg_products_variant');
+			wpsg_define('WPSG_TBL_PRODUCTS_VARIATION', $this->shop->prefix.'wpsg_products_variation');
 						
 		} // public function __construct()
@@ -64,5 +64,6 @@
 				variant_id int(11) NOT NULL,
 				name varchar(255) NOT NULL,
-				
+				shortname varchar(255) NOT NULL,
+					
 				anr varchar(255) NOT NULL,
 				price double(10,2) NOT NULL,
@@ -131,5 +132,5 @@
 		public function product_addedit_content(&$product_content, &$product_data)
 		{
-				
+			
 			// Wenn eine Ãbersetzung bearbeitet wird, dann nichts machen
 			if (isset($_REQUEST['wpsg_lang'])) return;
@@ -141,5 +142,5 @@
 					
 			}
-				
+			
 			$product_content['wpsg_mod_productvariants'] = array(
 				'title' => __('Produktvarianten', 'wpsg'),
@@ -323,4 +324,10 @@
 				
 			}			
+			else if (wpsg_isSizedString($_REQUEST['field'], 'vari_shortname'))
+			{
+				
+				$this->db->UpdateQuery(WPSG_TBL_VARIANTS_VARI, array('shortname' => wpsg_q($_REQUEST['value'])), " `id` = '".wpsg_q($_REQUEST['field_id'])."' ");
+				
+			}
 			else if (wpsg_isSizedString($_REQUEST['field'], 'vari_pos'))
 			{
@@ -357,21 +364,34 @@
 		 * @param Integer $variant_id ID der Variante
 		 */
-		public function getVariationOfVariant($variant_id, $product_id = false)
-		{
-		
+		public function getVariationOfVariant($variant_id, $product_id = false, $arProductFilter = array())
+		{
+					
 			$strQuerySELECT = "";
 			$strQueryJOIN = "";
-						
-			if (wpsg_isSizedInt($product_id))
-			{
-				
+			$strQueryWHERE = "";
+						
+			if (wpsg_isSizedArray($arProductFilter))
+			{
+				
+				list($strQueryP_WHERE, $strQueryP_JOIN, $strQueryP_HAVING, $strQueryP_ORDER) = wpsg_product::getQueryParts($arProductFilter);
+				
+				$strQueryJOIN .= " LEFT JOIN `".WPSG_TBL_PRODUCTS_VARIATION."` AS PV ON (PV.`variation_id` = VI.`id`) ";
+				$strQueryJOIN .= " LEFT JOIN `".WPSG_TBL_PRODUCTS."` AS P ON (P.`id` = PV.`product_id`) ";
+			
+				$strQueryJOIN .= $strQueryP_JOIN;
+				$strQueryWHERE .= $strQueryP_WHERE;
+						
+			}
+			else if (wpsg_isSizedInt($product_id))
+			{
+							
 				$strQueryJOIN .= " LEFT JOIN `".WPSG_TBL_PRODUCTS_VARIATION."` AS PV ON (PV.`variation_id` = VI.`id` AND PV.`product_id` = '".wpsg_q($product_id)."') ";
 				$strQuerySELECT .= " , PV.`active`, PV.`anr`, PV.`price`, PV.`stock`, PV.`images` ";
-								
-			}
-			
-			$arVari = $this->db->fetchAssoc("
+							
+			}
+			
+			$strQuery = "
 				SELECT
-					VI.`id`, VI.`name`, VI.`deleted`, VI.`pos`
+					VI.`id`, VI.`name`, VI.`shortname`, VI.`deleted`, VI.`pos`
 					".$strQuerySELECT."
 				FROM
@@ -381,7 +401,12 @@
 					VI.`variant_id` = '".wpsg_q($variant_id)."' AND
 					VI.`deleted` != '1'
+					".$strQueryWHERE."
+				GROUP BY
+					VI.`id`
 				ORDER BY
 					VI.`pos`
-			");
+			";
+			 
+			$arVari = $this->db->fetchAssoc($strQuery);
 			
 			// TODO: Ãbersetzung
@@ -395,8 +420,12 @@
 		 * @param unknown $variant_id
 		 */
-		public function getVariant($variant_id)
-		{
-			
-			$arVariant = $this->db->fetchRow("
+		public function getVariant($variant_id, $bHideDeleted = true)
+		{
+			
+			$strQueryWHERE = "";
+			
+			if ($bHideDeleted === true) $strQueryWHERE .= " AND V.`deleted` != '1' ";
+			
+			$strQuery = "
 				SELECT
 					V.*
@@ -405,5 +434,10 @@
 				WHERE
 					V.`id` = '".wpsg_q($variant_id)."' 
-			");
+					".$strQueryWHERE."
+			";
+						
+			$arVariant = $this->db->fetchRow($strQuery);
+			
+			if (!wpsg_isSizedInt($arVariant['id'])) return false;
 			
 			// TODO: Ãbersetzung
@@ -514,5 +548,5 @@
 					".$strQueryORDER."
 					V.`product_id` ASC, V.`pos`
-			");
+			", "id");
 			
 			foreach ($arData as $k => $v)
Index: /mods/wpsg_mod_productview.class.php
===================================================================
--- /mods/wpsg_mod_productview.class.php	(revision 5519)
+++ /mods/wpsg_mod_productview.class.php	(revision 5521)
@@ -11,4 +11,7 @@
 		var $hilfeURL = false;
 				
+		const DISPLAYMODE_FILTER_SMALL = '0';
+		const DISPLAYMODE_FILTER_CHECKBOX = '1';
+		
 		public function __construct()
 		{
@@ -97,8 +100,5 @@
 		public function settings_save()
 		{
-			
-			$this->shop->update_option('wpsg_mod_productview_filter_min', $_REQUEST['wpsg_mod_productview_filter_min']);
-			$this->shop->update_option('wpsg_mod_productview_filter_max', $_REQUEST['wpsg_mod_productview_filter_max']);
-			
+			 
 		} // public function settings_save()
 		
@@ -109,6 +109,9 @@
 						
 			$atts = $_REQUEST['wpsg_atts'];
-			
+						
 			if (wpsg_isSizedString($atts['filter'])) parse_str($atts['filter'], $atts['filter']);
+			
+			if (isset($atts['filter']['attributs'])) $atts['filter']['attributs'] = wpsg_trim($atts['filter']['attributs']);
+			if (isset($atts['filter']['variants'])) $atts['filter']['variants'] = wpsg_trim($atts['filter']['variants']);
 			
 			die($this->wpsg_sc_productview($atts));
@@ -118,14 +121,115 @@
 		/**
 		 * Filter fÃŒr die Produktansicht
+		 * filter = Kommagetrennte Filter
+		 * 			pricefilter (Preisfilter)
+		 * 			catfilter (Liste mit Unterkategorien)
+		 * 			pv_1_checkbox = pv_1 (Produktvariable ID1 mit Mehrfachauswahl ÃŒber Checkboxen)
+		 * 			pv_2_small (Produktvariable ID2 mit Mehrfachauswahl ÃŒber grafische Boxen)
+		 * 			pa_1 (Produktattribut ID1 ÃŒber Checkboxen)
 		 */
 		public function wpsg_sc_productview_filter($atts)		
 		{
 			
-			if ($this->shop->hasMod('wpsg_mod_produktartikel'))
-			{
-				
-				if (is_tax('wpsg-tax')) $this->shop->view['arCat'] = $this->shop->callMod('wpsg_mod_produktartikel', 'getCategorySelectArray', array(get_queried_object()->term_id));
-				else $this->shop->view['arCat'] = $this->shop->callMod('wpsg_mod_produktartikel', 'getCategorySelectArray', array(get_queried_object()->term_id));
+			$arVariantsGlobal = false;
+			$arAttributsGlobal = false;
+			
+			$this->shop->view['displayMode'] = array();
+			$this->shop->view['arVariants'] = array();
+			$this->shop->view['arAttributs'] = array();
+			$this->shop->view['showFilter'] = array();
+			
+			$atts['filter'] = wpsg_trim(explode(',', $atts['filter']));
+			
+			if (!wpsg_isSizedArray($atts['filter'])) $atts['filter'] = array('catfilter', 'pricefilter');
+			
+			$arSubCatIDs = false;
+			if ($this->shop->hasMod('wpsg_mod_produktartikel')) $arSubCatIDs = $this->shop->callMod('wpsg_mod_produktartikel', 'getSubCategoryID', array(get_queried_object()->term_id));
+						
+			foreach ($atts['filter'] as $k => $v)
+			{
+				
+				$arCode = explode('_', $v);
+				
+				if ($v === 'catfilter' && $this->shop->hasMod('wpsg_mod_produktartikel'))
+				{
+					
+					$this->shop->view['showFilter'][] = array(
+						'type' => 'catfilter',
+						'cat' => $this->shop->callMod('wpsg_mod_produktartikel', 'getSubCategory', array(get_queried_object()->term_id))						
+					);
+					
+				}
+				else if (preg_match('/pricefilter/', $v)) 
+				{
+								 					
+					$this->shop->view['showFilter'][] = array(
+						'type' => 'pricefilter',
+						'min' => wpsg_product::findMinPrice(array('cat_ids' => $arSubCatIDs)), 
+						'max' => wpsg_product::findMaxPrice(array('cat_ids' => $arSubCatIDs))
+					);
+					
+				}
+				else if (preg_match('/^pv_\d/', $v) && $this->shop->hasMod('wpsg_mod_productvariants'))
+				{
+					
+					if ($arVariantsGlobal === false) $arVariantsGlobal = $this->shop->callMod('wpsg_mod_productvariants', 'getVariants', array(false, true));
+					 
+					if (array_key_exists($arCode[1], $arVariantsGlobal))
+					{
+													
+						if (wpsg_getStr($arCode[2]) === 'small' || wpsg_getStr($arCode[2]) === self::DISPLAYMODE_FILTER_SMALL) $displayMode = self::DISPLAYMODE_FILTER_SMALL;
+						else $displayMode = self::DISPLAYMODE_FILTER_CHECKBOX; 
+						
+						// VerfÃŒgbare Variationen ermitteln						
+						$variation = $this->shop->callMod('wpsg_mod_productvariants', 'getVariationOfVariant', array($arVariantsGlobal[$arCode[1]]['id'], false, array(
+							'cat_ids' => $arSubCatIDs
+						)));
+																		
+						if (wpsg_isSizedArray($variation))
+						{
+						
+							$this->shop->view['showFilter'][] = array(
+								'type' => 'productvariants',
+								'displayMode' => $displayMode,
+								'variant' => $arVariantsGlobal[$arCode[1]],
+								'variation' => $variation
+							);
+							
+						}
+						
+					}
+					
+				}
+				else if (preg_match('/^pa_\d/', $v) && $this->shop->hasMod('wpsg_mod_produktattribute'))
+				{
+					
+					if ($arAttributsGlobal === false) $arAttributsGlobal = $this->shop->callMod('wpsg_mod_produktattribute', 'getProductattributs');
+															
+					if (array_key_exists($arCode[1], $arAttributsGlobal))
+					{
+					
+						$arAttributValue = $this->shop->callMod('wpsg_mod_produktattribute', 'getAttributValues', array($arCode[1], array(
+							'cat_ids' => $arSubCatIDs
+						)));
+						
+						$attribute = $arAttributsGlobal[$arCode[1]];
+						
+						// EintrÃ€ge entfernen zu denen es keine Produkte gibt
+						foreach ($attribute['auswahl'] as $k => $value) if (!in_array($k, $arAttributValue)) unset($attribute['auswahl'][$k]);
 												
+						if (wpsg_isSizedArray($attribute['auswahl']))
+						{
+						
+							$this->shop->view['showFilter'][] = array(
+								'type' => 'productattributs',
+								'attribute' => $attribute							
+							);
+							
+						}
+						
+					}
+					
+				}
+				
 			}
 			
@@ -140,9 +244,26 @@
 		{
 						
+			$this->shop->view['wpsg_mod_productview']['arOrder'] = array(
+				'price_asc' => __('Preis aufsteigend', 'wpsg'),
+				'price_desc' => __('Preis absteigend', 'wpsg')
+			);
+				
+			if (wpsg_isSizedString($atts['order']) && array_key_exists($atts['order'], $this->shop->view['wpsg_mod_productview']['arOrder'])) $this->shop->view['wpsg_mod_productview']['order'] = $atts['order'];
+			else 
+			{
+				
+				$this->shop->view['wpsg_mod_productview']['order'] = 'price_asc';
+				$atts['order'] = $this->shop->view['wpsg_mod_productview']['order'];
+				
+			}
+			
 			$arProductviewArray = $this->getSelectedProductArray($atts);
 			
-			$this->shop->view['wpsg_mod_productview'] = $arProductviewArray;
+			$this->shop->view['wpsg_mod_productview'] = wpsg_array_merge($this->shop->view['wpsg_mod_productview'], $arProductviewArray);
 			$this->shop->view['wpsg_mod_productview']['index'] = wpsg_getInt($GLOBALS['wpsg_mod_productview_index'], 1);
 			$this->shop->view['wpsg_mod_productview']['atts'] = $atts;
+			
+			$this->shop->view['wpsg_mod_productview']['pageMax'] = $arProductviewArray['page'] * $arProductviewArray['per_page'];
+			if ($this->shop->view['wpsg_mod_productview']['pageMax'] > $arProductviewArray['count']) $this->shop->view['wpsg_mod_productview']['pageMax'] = $arProductviewArray['count']; 
 			
 			if (wpsg_isSizedInt($atts['cols'], 3))
@@ -166,9 +287,9 @@
 				
 			}
-			
+						
 			$this->shop->view['wpsg_mod_productview']['cols'] = wpsg_getStr($atts['cols'], '4');
 			
 			$GLOBALS['wpsg_mod_productview_index'] = $this->shop->view['wpsg_mod_productview']['index'] + 1; 
-			
+			 
 			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productview/productview.phtml', false);
 			
@@ -225,7 +346,21 @@
 				
 			}
-			
+						 
 			if (wpsg_isSizedString($atts['filter']['price_min'])) $arFilter = wpsg_array_merge($arFilter, array('price_min' => $atts['filter']['price_min']));
 			if (wpsg_isSizedString($atts['filter']['price_max'])) $arFilter = wpsg_array_merge($arFilter, array('price_max' => $atts['filter']['price_max']));
+			if ($this->shop->hasMod('wpsg_mod_productvariants') && wpsg_isSizedArray($atts['filter']['variants'])) $arFilter['variants'] = $atts['filter']['variants'];
+			if ($this->shop->hasMod('wpsg_mod_produktattribute') && wpsg_isSizedArray($atFilter)) $arFilter['attributs'] = $atts['filter']['attributs'];
+			 
+			if (wpsg_isSizedString($atts['order']))
+			{
+				
+				$arOrderCode = explode('_', $atts['order']);
+				
+				if ($arOrderCode[0] === 'price') $arFilter['order_col'] = " P.`preis` ";
+				
+				if ($arOrderCode[1] === 'asc' && wpsg_isSizedString($arFilter['order_col'])) $arFilter['order_direction'] = ' ASC ';
+				else $arFilter['order_direction'] = ' DESC ';
+				
+			}
 			
 			$arReturn = wpsg_product::find($arFilter, false);
Index: /mods/wpsg_mod_produktartikel.class.php
===================================================================
--- /mods/wpsg_mod_produktartikel.class.php	(revision 5519)
+++ /mods/wpsg_mod_produktartikel.class.php	(revision 5521)
@@ -879,5 +879,5 @@
 				WHERE 
 					TT.`parent` = '".wpsg_q($ref)."' AND 
-					TT.`taxonomy` = 'wpsg-tax ' AND
+					TT.`taxonomy` = 'wpsg-tax' AND
 					T.`term_id` > 0
 				ORDER BY
@@ -902,4 +902,40 @@
 		} // public function getCategorySelectArray($ref = 0)
 	
+		/**
+		 * Gibt einen Array mit KategorieIDs die unter einer Kategorie liegen zurÃŒck
+		 */
+		public function getSubCategoryID($child_of = 0)
+		{
+			
+			$arCat = get_categories(array(
+				'taxonomy' => 'wpsg-tax',
+				'child_of' => $child_of,
+				'hide_empty' => true,
+				'hierarchical' => true,
+				'fields' => 'ids'
+			));
+			
+			$arCat[] = $child_of;
+			
+			return $arCat;
+			
+		} // public function getSubCategoryID($parent = 0)
+		
+		/**
+		 * Gibt einen Array mit Kategorien unterhalb zurÃŒck 
+		 */
+		public function getSubCategory($parent = 0)
+		{
+			
+			$arCat = get_categories(array(
+				'taxonomy' => 'wpsg-tax',
+				'parent' => $parent,
+				'hide_empty' => true
+			));
+			
+			return $arCat;
+			
+		} // public function getSubCategory($parent = 0)
+		
 	} // class wpsg_mod_produktartikel extends wpsg_mod_basic
 
Index: /mods/wpsg_mod_produktattribute.class.php
===================================================================
--- /mods/wpsg_mod_produktattribute.class.php	(revision 5519)
+++ /mods/wpsg_mod_produktattribute.class.php	(revision 5521)
@@ -56,5 +56,5 @@
 			   		KEY p_id (p_id),
 			   		KEY a_id (a_id)
-			   	) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
+				) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
 	
 			dbDelta($sql);
@@ -259,10 +259,10 @@
 			// Nur fÃŒr angelegte Produkte
 			if ($product_data['id'] <= 0) return false;
-
+			
 			$this->shop->view['data'] = $product_data;
 			$this->shop->view['data']['pa'] = $this->shop->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->shop->getProduktID($product_data['id'])));
 		
 			$this->shop->view['wpsg_mod_produktattribute']['data'] = $product_data;
-		
+			
 			$product_content['wpsg_mod_produktattribute'] = array(
 				'title' => __('Produktattribute', 'wpsg'),
@@ -426,4 +426,66 @@
 		/* Modulfunktionen */
 		
+		/**
+		 * Gibt alle MÃ¶glichen Werte fÃŒr ein Attribut zurÃŒck
+		 */
+		public function getAttributValues($attribute_id, $arProductFilter = array())
+		{
+			
+			$strQueryWHERE = " AND AT.`a_id` = '".wpsg_q($attribute_id)."' ";
+			$strQueryHAVING = "";
+			$strQueryJOIN = " LEFT JOIN `".WPSG_TBL_PRODUCTS."` AS P ON (P.`id` = AT.`p_id`) ";
+			
+			list($strQueryP_WHERE, $strQueryP_JOIN, $strQueryP_HAVING, $strQueryP_ORDER) = wpsg_product::getQueryParts($arProductFilter);
+					
+			$strQueryJOIN .= $strQueryP_JOIN;
+			$strQueryWHERE .= $strQueryP_WHERE;
+			$strQueryHAVING .= $strQueryP_HAVING;
+			
+			$strQuery = "
+				SELECT
+					DISTINCT AT.`value`
+				FROM
+				 	`".WPSG_TBL_PRODUCTS_AT."` AS AT
+				 		".$strQueryJOIN."
+				WHERE
+				 	1
+					".$strQueryWHERE."
+				HAVING
+					1
+					".$strQueryHAVING."
+			";
+			
+			return $this->db->fetchAssocField($strQuery);
+			
+		} // public function getAttributValues($attribute_id, $arProductFilter = array())
+		
+		/**
+		 * Gibt alle Produktattribute zurÃŒck
+		 */
+		public function getProductattributs()
+		{
+			
+			$arReturn = $this->db->fetchAssoc("
+				SELECT
+					A.*
+				FROM
+					`".WPSG_TBL_AT."` AS A
+				WHERE
+					1
+			", "id");
+			
+			foreach ($arReturn as $k => $v)
+			{
+				
+				if ($v['typ'] === '2') $arReturn[$k]['auswahl'] = wpsg_trim(explode('|', $v['auswahl']));
+				
+			}
+			
+			// TODO: Ãbersetzung
+			
+			return $arReturn;
+			
+		} // public function getProductattributs()
+		
 		public function getProductAttributeByProductId($product_id)
 		{
Index: /mods/wpsg_mod_stock.class.php
===================================================================
--- /mods/wpsg_mod_stock.class.php	(revision 5519)
+++ /mods/wpsg_mod_stock.class.php	(revision 5521)
@@ -517,5 +517,5 @@
 			
 			$product_id = $this->shop->getProduktID($produkt_key);
-			$product_data = $this->shop->cache->loadProduct($produkt_id);
+			$product_data = $this->shop->cache->loadProduct($product_id);
 									
 			if ($this->shop->hasMod('wpsg_mod_productgroups'))
Index: /mods/wpsg_mod_varianten.class.php
===================================================================
--- /mods/wpsg_mod_varianten.class.php	(revision 5519)
+++ /mods/wpsg_mod_varianten.class.php	(revision 5521)
@@ -724,9 +724,9 @@
 		{
 				
+			/*
 			// FÃŒr die Varianten brauche ich immer das original Array ...
-				$produkt_data['id'] = $this->db->fetchOne("SELECT `lang_parent` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_data['id'])."'");
-					
-				
-			$this->shop->view['wpsg_mod_varianten']['data'] = $produkt_data;
+			$product_data['id'] = $this->db->fetchOne("SELECT `lang_parent` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($product_data['id'])."'");
+									
+			$this->shop->view['wpsg_mod_varianten']['data'] = $product_data;
 				
 			$product_content['wpsg_mod_varianten'] = array(
@@ -734,4 +734,5 @@
 					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_varianten/produkt_addedit_content.phtml', false)
 			);
+			*/
 				
 		}
Index: /views/css/frontend.css
===================================================================
--- /views/css/frontend.css	(revision 5519)
+++ /views/css/frontend.css	(revision 5521)
@@ -350,4 +350,11 @@
 .wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range .ui-slider-handle { cursor:pointer; width:16px; height:16px; background-color:#787878; position:absolute; } 
 .wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range .ui-slider-bg { margin-left:16px; background-color:#E1E1E1; width:100%; height:2px; position:absolute; top:8px; }
+.wpsg_mod_productview-order { position:relative; cursor:pointer; }
+.wpsg_mod_productview-order-layer { position:absolute; width:100%; display:none; margin-top:5px; left:0px; z-index:1; }
+.wpsg_mod_productview-order-layer > .inner { margin-left:15px; margin-right:15px; border:1px solid #29556E; background-color:#FFFFFF; }
+.wpsg_mod_productview-order-layer a:focus,
+.wpsg_mod_productview-order-layer a { display:block; line-height:25px; color:#29556E; padding:5px 5px 5px 10px; text-decoration:none; }
+.wpsg_mod_productview-order-layer a.selected,
+.wpsg_mod_productview-order-layer a:hover { text-decoration:none; color:#FFFFFF; background-color:#29556E; }
 
 @media screen and (max-width: 600px) {
Index: /views/js/editable.js
===================================================================
--- /views/js/editable.js	(revision 5519)
+++ /views/js/editable.js	(revision 5521)
@@ -19,5 +19,5 @@
 				'validate': function(value) {
 					
-				    if(jQuery.trim(value) == '') { return wpsg_ajax.ie_validate_empty; }
+				    //if(jQuery.trim(value) == '') { return wpsg_ajax.ie_validate_empty; }
 				    
 				}				
Index: /views/mods/mod_productvariants/admin_edit.phtml
===================================================================
--- /views/mods/mod_productvariants/admin_edit.phtml	(revision 5519)
+++ /views/mods/mod_productvariants/admin_edit.phtml	(revision 5521)
@@ -16,5 +16,5 @@
       		<tr>
       		
-      			<?php $colspan = 1; if (wpsg_isSizedInt($this->view['product_id'])) { $colspan ++; ?>
+      			<?php $colspan = 2; if (wpsg_isSizedInt($this->view['product_id'])) { $colspan ++; ?>
       			<th class="col_active"></th>
       			<?php } ?>
@@ -22,4 +22,5 @@
       			<th class="col_id"><?php echo __('Id', 'wpsg'); ?></th>
         		<th class="col1"><?php echo __('Name', 'wpsg'); ?></th> 
+        		<th class="col_shortname"><?php echo __('Kurzname'); ?></th>
         		
         		<?php if (wpsg_isSizedInt($this->view['product_id'])) { $colspan += 3; ?>
@@ -51,4 +52,11 @@
 							submitdata: { 
 					    		field: 'vari_name',
+					    		field_id: '<?php echo $vari['id']; ?>'
+							}
+						});	
+						
+						jQuery('#productvariation_shortname_<?php echo $vari['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+							submitdata: { 
+					    		field: 'vari_shortname',
 					    		field_id: '<?php echo $vari['id']; ?>'
 							}
@@ -101,4 +109,5 @@
     			</td>
     			<td class="col1"><span class="wpsg_editable" id="productvariation_name_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['name']); ?></span></td>
+    			<td class="col_shortname"><span class="wpsg_editable" id="productvariation_shortname_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['shortname']); ?></span></td>
     			
     			<?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
Index: /views/mods/mod_productvariants/produkt_addedit_content.phtml
===================================================================
--- /views/mods/mod_productvariants/produkt_addedit_content.phtml	(revision 5519)
+++ /views/mods/mod_productvariants/produkt_addedit_content.phtml	(revision 5521)
@@ -25,5 +25,5 @@
 <?php } else { ?>
 
-	<?php echo __('Bitte speichern Sie das Produkt zuerst.', 'wpsg'); ?>
+	<p><?php echo __('Bitte speichern Sie das Produkt zuerst.', 'wpsg'); ?></p>
 			
 <?php } ?>
Index: /views/mods/mod_productview/productview.js
===================================================================
--- /views/mods/mod_productview/productview.js	(revision 5519)
+++ /views/mods/mod_productview/productview.js	(revision 5521)
@@ -6,6 +6,7 @@
 			
 		atts.page = page;
-		atts.order = order;
-		atts.mode = mode; 
+		
+		if (typeof order !== "undefined") atts.order = order;
+		if (typeof mode !== "undefined") atts.mode = mode; 
 		
 		if (jQuery('#wpsg_mod_productview_filter').length > 0)
@@ -43,12 +44,59 @@
 		var max_height = 0; jQuery('#wpsg_productview_' + index + ' .wpsg_mod_productview_description').each(function() { if (jQuery(this).outerHeight() > max_height) max_height = jQuery(this).outerHeight(); } ).outerHeight(max_height);
 		
+		// Sortierungslayer
+		jQuery('.wpsg_mod_productview-order').bind('click', function(event) {
+			
+			if (jQuery(this).find('.wpsg_mod_productview-order-layer').is(':visible'))
+			{
+				
+				jQuery(this).find('.wpsg_mod_productview-order-layer').slideUp();
+				
+			}
+			else
+			{
+			
+				jQuery(this).find('.wpsg_mod_productview-order-layer').slideDown();
+				
+			}
+			
+			event.stopPropagation();
+			
+		} ).disableSelection();
+		
+		// Sortierung
+		jQuery('.wpsg_mod_productview-order-layer a').bind('click', function() {
+			
+			var productview_index = jQuery(this).attr("data-productview-index");
+			var order = jQuery(this).attr("data-order");
+			
+			wpsg_switchProductview(productview_index, 1, order);
+			
+			return false;
+			
+		} ).disableSelection();
+		
+	}
+	
+	function wpsg_filter_insert(values, set)
+	{
+		
+		var arValues = [];
+		
+		if (jQuery.trim(values) != '') arValues = jQuery.trim(values).split(',');
+		
+		if (jQuery.inArray(set, arValues) >= 0) arValues = jQuery.grep(arValues, function(value) { return value != set; } ); 
+		else arValues.push(set);
+		
+		return jQuery.unique(arValues).join(',');
+		
 	}
 	
 	jQuery(document).ready(function() {
 		
+		// Preisfilter
 		var filter_min = parseFloat(jQuery('#wpsg_mod_productview_filter_price_info input[name="price_min"]').val());
 		var filter_max = parseFloat(jQuery('#wpsg_mod_productview_filter_price_info input[name="price_max"]').val());
-		
-		jQuery("#wpsg_mod_productview_filter_price-range").slider( {
+						
+		jQuery("#wpsg_mod_productview_filter_price-range").slider( {		
 			range: true,
 			min: filter_min,
@@ -70,5 +118,19 @@
 			}
 		} );
-		
+					
+		// Variantenfilter Small
+		jQuery('.wpsg_mod_productview_filter_item a.switch').bind('click', function() {
+			
+			var input =  jQuery(this).parents('.wpsg_mod_productview_filter_item').find('input.val');			
+			input.val(wpsg_filter_insert(input.val(), jQuery(this).attr('data-value')));
+						
+			jQuery(this).toggleClass('active');
+			
+			wpsg_switchProductview(1, 1);
+			
+			return false;
+			
+		} );
+				 		
 		jQuery('.wpsg_productview').each(function() { 
 			
@@ -78,4 +140,10 @@
 		} );
 		
+		jQuery('body, html').bind('click', function() {
+			
+			jQuery('.wpsg_mod_productview-order-layer:visible').each(function() { jQuery(this).parent().click(); } ); 
+			
+		} );
+		
 	} );
 	
Index: /views/mods/mod_productview/productview.phtml
===================================================================
--- /views/mods/mod_productview/productview.phtml	(revision 5519)
+++ /views/mods/mod_productview/productview.phtml	(revision 5521)
@@ -19,6 +19,19 @@
 		<?php if (wpsg_isSizedArray($this->view['wpsg_mod_productview']['products'])) { ?>
 		<div class="wpsg_mod_productview-order <?php echo $this->view['wpsg_mod_productview']['col_class']['order']; ?>">
-			<?php echo __('Sortierung', 'wpsg'); ?><span class="glyphicon glyphicon-menu-down"></span>
-			<strong>Neueste zuerst</strong>
+			<?php echo __('Sortierung', 'wpsg'); $order = $this->view['wpsg_mod_productview']['order']; ?>
+			<?php if (substr($order, -3) === 'asc') { ?>
+			<span class="glyphicon glyphicon-menu-up"></span>
+			<?php } else { ?>
+			<span class="glyphicon glyphicon-menu-down"></span>
+			<?php } ?>
+			
+			<strong><?php echo $this->view['wpsg_mod_productview']['arOrder'][$order]; ?></strong>
+			<div class="wpsg_mod_productview-order-layer">
+				<div class="inner">
+					<?php foreach ($this->view['wpsg_mod_productview']['arOrder'] as $value => $label) { ?>
+					<a href="#" class="<?php echo (($this->view['wpsg_mod_productview']['order'] === $value)?'selected':''); ?>" data-productview-index="<?php echo $this->view['wpsg_mod_productview']['index']; ?>" data-order="<?php echo $value; ?>"><?php echo $label; ?></a>
+					<?php } ?>				
+				</div>			
+			</div>			
 		</div>
 		
@@ -27,7 +40,7 @@
 				echo wpsg_translate(__('Anzeige #1# - #2#', 'wpsg'), 
 					($this->view['wpsg_mod_productview']['page'] - 1) * $this->view['wpsg_mod_productview']['per_page'] + 1, 
-					((sizeof($this->view['wpsg_mod_productview']['products']) > $this->view['wpsg_mod_productview']['per_page'])?$this->view['wpsg_mod_productview']['page'] * $this->view['wpsg_mod_productview']['per_page']:sizeof($this->view['wpsg_mod_productview']['products']))
+					$this->view['wpsg_mod_productview']['pageMax']
 				); ?></strong>
-			<?php echo wpsg_translate(__('von #1# Ergebnissen', 'wpsg'), sizeof($this->view['wpsg_mod_productview']['products'])); ?>
+			<?php echo wpsg_translate(__('von #1# Ergebnissen', 'wpsg'), $this->view['wpsg_mod_productview']['count']); ?>
 		</div>
 		<?php } ?>
Index: /views/mods/mod_productview/productview_filter.phtml
===================================================================
--- /views/mods/mod_productview/productview_filter.phtml	(revision 5519)
+++ /views/mods/mod_productview/productview_filter.phtml	(revision 5521)
@@ -1,20 +1,123 @@
 <div class="wpsg_mod_productview_filter" id="wpsg_mod_productview_filter">
-	<?php if ($this->hasMod('wpsg_mod_produktartikel') && wpsg_isSizedArray($this->view['arCat'])) { ?>
-	<div class="wpsg_mod_productview_filter_item wpsg_mod_productview_filter_cat">
-		<ul>
-			<?php foreach ($this->view['arCat'] as $cat_id => $cat_name) { ?>
-			<li><a href="<?php echo get_term_link($cat_id); ?>" title="<?php echo wpsg_hspc($cat_name); ?>"><?php echo wpsg_hspc($cat_name); ?></a></li>
+
+	<?php foreach ($this->view['showFilter'] as $filter_data) { ?>
+	
+		<?php if ($filter_data['type'] === 'catfilter') { /* Kategoriefilter */ ?>
+		
+		<div class="wpsg_mod_productview_filter_item wpsg_mod_productview_filter_cat">
+		<h2><?php echo __('Produktkategorie', 'wpsg'); ?></h2>
+		<?php 
+		
+			function wpsg_renderCat(&$shop, $ar, $level = 1)
+			{
+				
+				if (wpsg_isSizedArray($ar))
+				{
+				
+					echo '<ul class="level'.$level.'">';
+					
+					foreach ($ar as $k => $cat)
+					{
+					
+						echo '<li>';
+						echo '<a href="'.get_term_link($cat->term_id).'" title="'.wpsg_hspc($cat->cat_name).'">'.wpsg_hspc($cat->cat_name).'</a>';
+						
+						$arSubCat = $shop->callMod('wpsg_mod_produktartikel', 'getSubCategory', array($cat->term_id));
+						wpsg_renderCat($shop, $arSubCat, $level + 1);
+						
+						echo '</li>';
+						
+					}
+					
+					echo '</ul>';
+					
+				}
+				
+			}
+		
+			wpsg_renderCat($this, $filter_data['cat']);
+			
+		?>
+		</div>
+		
+		<?php } else if ($filter_data['type'] === 'pricefilter') { ?>
+		
+		<div class="wpsg_mod_productview_filter_item wpsg_mod_productview_filter_price">	
+			<h2><?php echo __('Sortierung nach Preis', 'wpsg'); ?></h2>
+			<div id="wpsg_mod_productview_filter_price-range"><span class="ui-slider-bg"></span></div>
+			<div id="wpsg_mod_productview_filter_price_info">
+				<span class="min"><?php echo wpsg_ff($filter_data['min']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?> - <span class="max"><?php echo wpsg_ff($filter_data['max']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?>
+				<input type="hidden" name="price_min" value="<?php echo $filter_data['min']; ?>" />
+				<input type="hidden" name="price_max" value="<?php echo $filter_data['max']; ?>" />
+			</div>
+		</div>
+		
+		<?php } else if ($filter_data['type'] === 'productvariants') { $variant = $filter_data['variant']; ?>
+		
+			<?php if ($filter_data['displayMode'] === wpsg_mod_productview::DISPLAYMODE_FILTER_CHECKBOX) { ?>
+			<div class="wpsg_mod_productview_filter_item wpsg_mod_productview_filter_variant_checkbox wpsg_mod_productview_filter_variant wpsg_mod_productview_filter_variant_<?php echo $variant['type']; ?>">	
+				<h2><?php echo $variant['name']; ?></h2>
+				<input class="val" type=hidden name="variants[<?php echo $variant['id']; ?>]" value="" />
+				
+				<div class="variation_wrap">
+					<?php foreach ($filter_data['variation'] as $variation) { ?>
+					<a class="switch" href="#" data-value="<?php echo $variation['id']; ?>">
+						
+						<span class="fa fa-square-o"></span>
+						<span class="fa fa-check-square-o"></span>
+					
+						<?php if (wpsg_isSizedString($variation['shortname'])) { ?>
+						<?php echo wpsg_hspc($variation['shortname']); ?>
+						<?php } else { ?>
+						<?php echo wpsg_hspc($variation['name']); ?>
+						<?php } ?>
+							
+					</a>			 		
+					<?php } ?>
+				</div>	
+			</div>
+			<?php } else if ($filter_data['displayMode'] === wpsg_mod_productview::DISPLAYMODE_FILTER_SMALL) { ?>
+			<div class="wpsg_mod_productview_filter_item wpsg_mod_productview_filter_variant_small wpsg_mod_productview_filter_variant wpsg_mod_productview_filter_variant_<?php echo $variant['type']; ?>">
+				<h2><?php echo $variant['name']; ?></h2>
+				<input class="val" type=hidden name="variants[<?php echo $variant['id']; ?>]" value="" />
+				<div class="variation_wrap">
+					<?php foreach ($filter_data['variation'] as $variation) { ?>
+					<a class="switch" href="#" data-value="<?php echo $variation['id']; ?>">
+								
+						<?php if (wpsg_isSizedString($variation['shortname'])) { ?>
+						
+							<?php if (preg_match('/^\#[0-9a-fA-F]+$/', $variation['shortname'])) { ?>
+							<span class="color" style="background-color:<?php echo $variation['shortname']; ?>;"><span class="fa-check-square-o fa"></span></span>
+							<?php } else { ?>
+							<?php echo wpsg_hspc($variation['shortname']); ?>
+							<?php } ?>
+						
+						<?php } else { echo wpsg_hspc($variation['name']); } ?>
+					</a>
+					<?php } ?>	
+					<div class="wpsg_clear"></div>	
+				</div>	
+			</div>
 			<?php } ?>
-		</ul>
-	</div> 
+		
+		<?php } else if ($filter_data['type'] === 'productattributs') { $attribut = $filter_data['attribute']; ?>
+		<div class="wpsg_mod_productview_filter_item wpsg_mod_productview_filter_attribut wpsg_mod_productview_filter_attribut_select">
+			<h2><?php echo wpsg_hspc($attribut['name']); ?></h2>
+			<input class="val" type=hidden name="attributs[<?php echo $attribut['id']; ?>]" value="" />
+			<div class="attribut_wrap">
+				<?php foreach ($attribut['auswahl'] as $index => $auswahl) { ?>
+				<a class="switch" href="#" data-value="<?php echo wpsg_hspc($index); ?>">
+				
+					<span class="fa fa-square-o"></span>
+					<span class="fa fa-check-square-o"></span>
+					<?php echo wpsg_hspc($auswahl); ?>
+				
+				</a>
+				<?php } ?>
+			</div>	
+		</div>
+		<?php } ?>
+	
 	<?php } ?>
-	<div class="wpsg_mod_productview_filter_item wpsg_mod_productview_filter_price">	
-		<h2><?php echo __('Sortierung nach Preis', 'wpsg'); ?></h2>
-		<div id="wpsg_mod_productview_filter_price-range"><span class="ui-slider-bg"></span></div>
-	</div>
-	<div id="wpsg_mod_productview_filter_price_info">
-		<?php echo __('Preis:', 'wpsg'); ?><span class="min"><?php echo wpsg_ff($this->get_option('wpsg_mod_productview_filter_min')); ?></span> <?php echo $this->get_option('wpsg_currency'); ?> - <span class="max"><?php echo wpsg_ff($this->get_option('wpsg_mod_productview_filter_max')); ?></span> <?php echo $this->get_option('wpsg_currency'); ?>
-		<input type="hidden" name="price_min" value="<?php echo $this->get_option('wpsg_mod_productview_filter_min'); ?>" />
-		<input type="hidden" name="price_max" value="<?php echo $this->get_option('wpsg_mod_productview_filter_max'); ?>" />
-	</div>
+ 	
 </div>
Index: /views/mods/mod_productview/settings_edit.phtml
===================================================================
--- /views/mods/mod_productview/settings_edit.phtml	(revision 5519)
+++ /views/mods/mod_productview/settings_edit.phtml	(revision 5521)
@@ -6,4 +6,3 @@
 
 ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_productview_filter_min', __('Minimaler Preis fÃŒr Preisfilter', 'wpsg'), $this->get_option('wpsg_mod_productview_filter_min')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_productview_filter_max', __('Maximaler Preis fÃŒr Preisfilter', 'wpsg'), $this->get_option('wpsg_mod_productview_filter_max')); ?>
+ 
Index: /views/mods/mod_produktattribute/produkt_addedit_content.phtml
===================================================================
--- /views/mods/mod_produktattribute/produkt_addedit_content.phtml	(revision 5519)
+++ /views/mods/mod_produktattribute/produkt_addedit_content.phtml	(revision 5521)
@@ -5,41 +5,34 @@
 	 */
 
-?>
-<?php if (sizeof($this->view['data']['pa']) > 0) { ?>
-<div class="postbox" id="wpsg_produktattribute">		
-	<h3 class="wpsg_handlediv">
-		<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-		<span><?php echo __('Produktattribute', 'wpsg'); ?></span>
-	</h3>	
-	<div class="inside">
+?> 
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Produktattribute', 'wpsg')); ?>
+
+	<?php if (wpsg_isSizedArray($this->view['data']['pa'])) { ?>
+
+		<?php foreach ($this->view['data']['pa'] as $pa) { ?>
+		
+			<?php if ($pa['typ'] == '1') { /* RTE */ ?>
+			<div class="form-horizontal"><div class="form-group-sm"> 
+				<label class="control-label" for="pa_5" style="padding-bottom:5px;"><?php echo wpsg_hspc($pa['name']); ?></label><br />
+				<?php wp_editor($pa['value'], 'pa_'.$pa['id'].''); ?><br />
+			</div></div>
+			<?php } else if ($pa['typ'] == '2') { /* Auswahl */ ?>
+			<?php echo wpsg_drawForm_Select('pa_'.$pa['id'], $pa['name'], (array)explode('|', $pa['auswahl']), $pa['value']);?>
+			<?php } else if ($pa['typ'] == '3') { /* Checkbox */ ?>
+			<?php echo wpsg_drawForm_Checkbox('pa_'.$pa['id'], $pa['name'], $pa['value']); ?>
+			<?php } else { /* Normales Eingabefeld */ ?>
+			<?php echo wpsg_drawForm_Input('pa_'.$pa['id'], $pa['name'], $pa['value']); ?>
+			<?php } ?>		
+				
+		<?php } ?>
+		
+	<?php } else { ?>
+	<p><?php echo __('Bisher wurden keine Attribute im System angelegt.', 'wpsg'); ?></p>
+	<?php } ?>
 	
-		<?php foreach ($this->view['data']['pa'] as $pa) { ?>			
-			<div class="wpsg_form_field">
-				<div class="wpsg_form_left">
-					<label class="wpsg_produkt_pa_label" for="produkt_pa_<?php echo $pa['id']; ?>"><?php echo __($pa['name'], 'wpsg'); ?>:</label>
-				</div>
-				<div class="wpsg_form_right">
-					<?php if ($pa['typ'] == '1') { /* RTE */ ?>
-					
-						<?php wp_editor($pa['value'], 'pa_'.$pa['id'].''); ?>
-						
-					<?php } else if ($pa['typ'] == '2') { /* Auswahl */ ?>
-						<select id="produkt_pa_<?php echo $pa['id']; ?>" name="pa_<?php echo $pa['id']; ?>">
-							<?php foreach ((array)explode("|", $pa['auswahl']) as $option) { ?>
-							<option <?php echo (($pa['value'] == $option)?'selected="selected"':''); ?> value="<?php echo wpsg_hspc($option); ?>"><?php echo wpsg_hspc($option); ?></option>
-							<?php } ?>
-						</select>
-					<?php } else if ($pa['typ'] == '3') { /* Checkbox */ ?>
-						<input type="hidden" value="0" name="pa_<?php echo $pa['id']; ?>" />
-						<input id="produkt_pa_<?php echo $pa['id']; ?>" class="checkbox" type="checkbox" value="1" name="pa_<?php echo $pa['id']; ?>" <?php echo (($pa['value'] == '1')?'checked="checked"':''); ?> />
-					<?php } else { /* Normales Eingabefeld */ ?>
-						<input id="produkt_pa_<?php echo $pa['id']; ?>" type="text" name="pa_<?php echo $pa['id']; ?>" value="<?php echo wpsg_hspc($pa['value']); ?>" />
-					<?php } ?>
-				</div>
-			</div>
-			<div class="wpsg_clear"></div>
-		<?php } ?>
+	<br />
 	
-	</div>
-</div>
-<?php } ?>
+	<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktattribute"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Produktattribute', 'wpsg'); ?></a>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
