Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 6154)
+++ /lib/wpsg_basket.class.php	(revision 6165)
@@ -318,9 +318,9 @@
 			
 			if (is_numeric($produkt_key)) return $produkt_key;
-			else if (preg_match('/vp_\d(.*)/', $produkt_key))
+			else if (preg_match('/pv_\d(.*)/', $produkt_key))
 			{
 				
 				// Varianten ProduktschlÃŒssel				
-				$produkt_id = preg_replace('/(vp_)|(\/(.*))/', '', $produkt_key);
+				$produkt_id = preg_replace('/(pv_)|(\|(.*))/', '', $produkt_key);
 
 				return $produkt_id;
Index: /mods/wpsg_mod_basketteaser.class.php
===================================================================
--- /mods/wpsg_mod_basketteaser.class.php	(revision 6154)
+++ /mods/wpsg_mod_basketteaser.class.php	(revision 6165)
@@ -158,7 +158,7 @@
 				{
 					
-					if (preg_match('/vp_(.*)/', $p['id']))
+					if (preg_match('/pv_(.*)/', $p['id']))
 					{
-						$produkt_id = preg_replace('/(vp_)|(\/(.*))/', '', $p['id']);
+						$produkt_id = preg_replace('/(pv_)|(\|(.*))/', '', $p['id']);
 					}
 					else 
Index: /mods/wpsg_mod_billsafe.class.php
===================================================================
--- /mods/wpsg_mod_billsafe.class.php	(revision 6154)
+++ /mods/wpsg_mod_billsafe.class.php	(revision 6165)
@@ -732,7 +732,7 @@
 			{
 				
-				if (preg_match('/^vp_(.*)/', $op['id']))
-				{
-					$produkt_id = preg_replace('/(^vp_)|(\/(.*)$)/', '', $op['id']);
+				if (preg_match('/^pv_(.*)/', $op['id']))
+				{
+					$produkt_id = preg_replace('/(^vp_)|(\|(.*)$)/', '', $op['id']);
 				}
 				else
Index: /mods/wpsg_mod_fuellmenge.class.php
===================================================================
--- /mods/wpsg_mod_fuellmenge.class.php	(revision 6154)
+++ /mods/wpsg_mod_fuellmenge.class.php	(revision 6165)
@@ -120,8 +120,8 @@
 			$arFeinheiten = explode(',', $this->shop->get_option('wpsg_mod_fuellmenge_einheit'));
 						
-			if ($this->shop->hasMod('wpsg_mod_varianten') && $this->shop->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($produkt['id'])))
+			if ($this->shop->hasMod('wpsg_mod_productvariants') && $this->shop->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', array($produkt['id'])))
 			{
 				
-				$variInfo = $this->shop->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($produkt['id']));
+				$variInfo = $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($produkt['id']));
 				$produkt['fmenge'] += $variInfo['fmenge'];
 				
Index: /mods/wpsg_mod_productgroups.class.php
===================================================================
--- /mods/wpsg_mod_productgroups.class.php	(revision 6154)
+++ /mods/wpsg_mod_productgroups.class.php	(revision 6165)
@@ -774,7 +774,7 @@
 		{
 			
-			if (preg_match('/(vp_)|(\/(.*))/', $produkt['id']))
-			{
-				$pID = preg_replace('/(vp_)|(\/(.*))/', '', $produkt['id']);
+			if (preg_match('/(pv_)|(\|(.*))/', $produkt['id']))
+			{
+				$pID = preg_replace('/(pv_)|(\|(.*))/', '', $produkt['id']);
 			}
 			else 
Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 6154)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 6165)
@@ -18,5 +18,5 @@
 		
 		/**
-		 * Costructor
+		 * Constructor
 		 */
 		public function __construct()
@@ -97,4 +97,6 @@
 				stock int(11) NOT NULL,
 				images text NOT NULL, 
+				weight double(10,2) NOT NULL,
+				fmenge double(10,2) NOT NULL,
 				PRIMARY KEY  (id),
 				KEY product_id (product_id),
@@ -115,4 +117,12 @@
 		} // public function settings_edit_afterform()
 		 
+		public function settings_save()
+		{
+				
+			$this->shop->update_option('wpsg_mod_productvariants', $_REQUEST['wpsg_mod_productvariants']);
+			$this->shop->update_option('wpsg_vp_detailview', $_REQUEST['wpsg_vp_detailview']);
+				
+		} // public function settings_save()
+		
 		public function be_ajax() 
 		{ 
@@ -178,5 +188,6 @@
                 
                 $this->getProductKeyFromRequest($product_key, $product_id, $form_data);
-								
+                //$product_key = $_REQUEST['product_key'];
+                
 				$product_data = $this->shop->loadProduktArray($product_id, array(
 					'id' => $product_key, 
@@ -184,6 +195,6 @@
 					'menge' => $form_data['wpsg']['menge'],
 					'referer' => $form_data['myReferer']
-				));				
-				 
+				));
+				
 				// Damit das Div die gleiche Index Id bekommt
 				$GLOBALS['wpsg_produkt_index'] = $_REQUEST['product_index'] - 1;
@@ -195,5 +206,5 @@
 				 
 				die($this->shop->renderProdukt($product_data, $template));
-								
+				
 			}
 			
@@ -277,10 +288,15 @@
         public function getProductKeyFromRequest(&$product_key, $product_id, $form_data) 
         {
+        	
+            //if (!wpsg_isSizedArray($form_data['wpsg_mod_productvariants'])) return false;
             
-            if (!wpsg_isSizedArray($form_data['wpsg_mod_productvariants'])) return false;
-            
-            foreach ($form_data['wpsg_mod_productvariants'] as $var_id => $vari_id) $form_data['wpsg_mod_productvariants'][$var_id] = $var_id.':'.$vari_id;
-            $product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_mod_productvariants']);            
-            
+            //foreach ($form_data['wpsg_mod_productvariants'] as $var_id => $vari_id) $form_data['wpsg_mod_productvariants'][$var_id] = $var_id.':'.$vari_id;
+            //$product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_mod_productvariants']);            
+
+        	if (!wpsg_isSizedArray($form_data['wpsg_vp'])) return false;
+        	
+        	foreach ($form_data['wpsg_vp'] as $var_id => $vari_id) $form_data['wpsg_mod_productvariants'][$var_id] = $var_id.':'.$vari_id;
+        	$product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_mod_productvariants']);
+        	     
         } // public function getProductKeyFromRequest($product_id, $form_data)
         
@@ -842,5 +858,5 @@
         				
         				$strQuery = 
-        				"SELECT PVV.`id`, PVV.`variation_id`, PVV.`product_id`, PVV.`anr`, PVV.`price`, PVV.`stock`, PVV.`images`, PVV.`active`,
+        				"SELECT PVV.`id`, PVV.`variation_id`, PVV.`product_id`, PVV.`anr`, PVV.`price`, PVV.`stock`, PVV.`images`, PVV.`weight`, PVV.`fmenge`, PVV.`active`,
         				 VV.`variant_id`, VV.`name` AS VVname, VV.`shortname`, PV.`pos` AS PVpos, VV.`pos` AS VVpos,
         				 V.`name` AS Vname, V.`type`
@@ -1008,5 +1024,5 @@
 		public function renderTemplate($product_key)
 		{
-		
+
 			$produkt_id = $this->shop->getProduktId($product_key);
 			$produkt_data = $this->shop->cache->loadProduct($produkt_id);
@@ -1027,10 +1043,12 @@
 			$vp_data = $this->getVariants($produkt_id, true, true, true);
 			$this->unserializeVariant($vp_data);
-			//$vdata['pic'] = $vp_data[4]['arVariation'][2]['pic'];
-			//$vdata['picOrder'] = $vp_data[4]['arVariation'][2]['picOrder'];
-			//$temp = $vp_data[4]['arVariation'][1]['images'];
-			//$temp = wpsg_q(serialize($vdata));
-			//saveVarianten($produkt_id, $vdata);
-				
+			if ($this->isVariantsProductKey($product_key)) {
+				$arVar = $this->explodeProductKey($product_key);
+				foreach ($arVar['arVari'] as $v => $vv) {
+					$vp_data[$v]['arVariation'][$vv]['sel'] = 1;
+					
+				}
+				
+			}
 			
 			if (is_array($vp_data) && sizeof($vp_data) > 0)
@@ -1081,12 +1099,5 @@
 				unset($v1);
 				unset($v2);
-				
-				foreach ($vp_data as $k1 => &$var) {
-					if ($var['type'] == 0) $var['typ'] = 'select';
-					if ($var['type'] == 1) $var['typ'] = 'radio';
-					if ($var['type'] == 2) $var['typ'] = 'image';
-					$var['active'] = 1;
-				}
-				
+
 				$this->shop->view['data']['vp_data'] = $vp_data;
 				
@@ -1140,5 +1151,5 @@
 		
 		/**
-		 * Gibt einene Array mit Informationen aus dem VariantenschlÃŒssel zurÃŒck
+		 * Gibt ein Array mit Informationen aus dem VariantenschlÃŒssel zurÃŒck
 		 * Besp: pv_1|1:1 
 		 * Array
@@ -1438,11 +1449,12 @@
 			if (!$this->isVariantsProductKey($product_key)) return array();
 				
-			$arVariSet = explode(':', preg_replace('/^vp_\d*\//', '', $product_key));
+			$arVariSet = explode('|', preg_replace('/^pv_\d*\//', '', $product_key));
 			$arReturn = array();
+			unset($arVariSet[0]);
 				
 			foreach ($arVariSet as $var_combi)
 			{
 		
-				$var_combi = explode('_', $var_combi);
+				$var_combi = explode(':', $var_combi);
 				$var = $var_combi[0];
 				$vari = $var_combi[1];
@@ -1489,5 +1501,5 @@
 							
 				$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.`id` AS iid, PV.`variation_id`, PV.`active`, PV.`anr`, PV.`price`, PV.`stock`, PV.`images` ";
+				$strQuerySELECT .= " , PV.`id` AS iid, PV.`variation_id`, PV.`active`, PV.`anr`, PV.`price`, PV.`stock`, PV.`images`, PV.`weight`, PV.`fmenge` ";
 							
 			}
@@ -1526,4 +1538,5 @@
 				$ar = @unserialize($vi['images']);
 				$vi['pic'] = '';
+				$vi['sel'] = 0;
 				$vi['picOrder'] = Array();
 				if (wpsg_isSizedArray($ar)) {
@@ -1540,7 +1553,12 @@
 		private function unserializeVariant(&$arVar) {
 			foreach ($arVar as &$va) {
+				if ($va['type'] == 0) $va['typ'] = 'select';
+				if ($va['type'] == 1) $va['typ'] = 'radio';
+				if ($va['type'] == 2) $va['typ'] = 'image';
+				
 				foreach ($va['arVariation'] as &$vi) {
 					$ar = @unserialize($vi['images']);
 					$vi['pic'] = '';
+					$vi['sel'] = 0;
 					$vi['picOrder'] = Array();
 					if (wpsg_isSizedArray($ar)) {
@@ -1562,13 +1580,70 @@
 			//$this->shop->view['variant'] = $this->getVariant($_REQUEST['variant_id']);
 			//$this->shop->view['arVariation'] = $this->getVariationOfVariant($_REQUEST['variant_id'], $_REQUEST['product_id']);
-			$this->shop->view['arVariant'] = $this->getVariants($product_id, true, true, true);
-			
-			//die($this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/stockVarianten.phtml'));
-			//$html = ($this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/admin_html.phtml', false));
-			//die($this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/stock2.phtml', false));
-			$html = ($this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/stock2.phtml', false));
-			echo $html;	
-			
-		} // private function admin_editAction()
+			//$this->shop->view['arVariant']
+			$vp_data = $this->getVariants($product_id, true, true, true);
+			$this->unserializeVariant($vp_data);
+				
+			$html = '<table>';
+			foreach ($vp_data as $var) {
+				$html .= '<tr>';   		
+				$html .= '<td class="col_shortname" colspan="3">'.wpsg_hspc($var['name']).'</td>';
+				$html .= '</tr>';
+			    foreach ($var['arVariation'] as $vari) {
+			    	$html .= '<tr>';    		
+			    	$html .= '<td class="col_active">&nbsp;';
+			    	$html .= '</td>';
+			    	$txt = wpsg_hspc($vari['name']).' : '.wpsg_hspc($vari['stock']);
+			    	$html .= '<td class="col_shortname">'.$txt.'</td>';
+			    	$html .= '<td class="col_1">';
+			    	$html .= '</td>';
+			    	$html .= '</tr>';
+				}
+			}
+			$html .= '</table>';
+			die($html);		
+			
+		} // private function stockVarianten($product_id)
+		
+		/**
+		 * Reduziert den Bestand der Variationen in dem Array
+		 */
+		public function reduceStock($produkt_key, $menge, $reduce = true)
+		{
+		
+			//$produkt_id = preg_replace('/(^pv_)|(\|(.*)$)/', '', $produkt_key);
+			//$vari_teil = preg_replace('/(.*)\//', '', $produkt_key);
+			//$arVarianten = explode('|', $vari_teil);
+			$arVar = $this->explodeProductKey($produkt_key);
+			
+			//$vari_data = $this->loadVarianten($produkt_id, true, true);
+		
+			foreach ($arVar['arVari'] as $v => $vv)
+			{
+		
+				if ($reduce === true)
+				{
+				
+					//$vari_data[$variante_id]['vari'][$vari_id]['stock'] -= $menge;
+					$this->db->Query("
+							UPDATE ".WPSG_TBL_PRODUCTS_VARIATION." SET `stock` = `stock` - ".wpsg_q($p['menge'])." WHERE `id` = '".wpsg_q($vv)."'
+						");
+						
+				}
+				else
+				{
+		
+					//$vari_data[$variante_id]['vari'][$vari_id]['stock'] += $menge;
+					$this->db->Query("
+							UPDATE ".WPSG_TBL_PRODUCTS_VARIATION." SET `stock` = `stock` + ".wpsg_q($p['menge'])." WHERE `id` = '".wpsg_q($vv)."'
+						");
+						
+				}
+		
+			}
+				
+			// Array zurÃŒckspeichern
+			//$this->saveVarianten($produkt_id, $vari_data);
+		
+		} // public function reduceStock($produkt_id, $menge)
 		
 		/**
@@ -1579,5 +1654,5 @@
 		{
 				
-			if (preg_match('/^vp_\d+/', $productkey))
+			if (preg_match('/^pv_\d+/', $productkey))
 			{
 		
@@ -1766,5 +1841,157 @@
 			
 		}
-        		 
+		
+		public function basket_row(&$p, $i)
+		{
+				
+			if (!preg_match('/pv_(.*)/', $p['id'])) return;
+				
+			$this->shop->view['variante'] = $this->getVariantenInfoArray($p['id']);
+				
+			$this->shop->view['i'] = $i;
+				
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/basket_row.phtml');
+				
+		} // public function basket_row(&$p)
+        		
+		/**
+		 * Liest die Informationen anhand eines VariantenschlÃŒssels aus
+		 */
+		public function getVariantenInfoArray($vari_key)
+		{
+			
+			//$produkt_id = preg_replace('/(vp_)|(\/(.*))/', '', $vari_key);
+			$produkt_id = preg_replace('/(pv_)|(\|(.*))/', '', $vari_key);
+			//$arVari = explode('|', preg_replace('/vp_'.$produkt_id.'\//', '', $vari_key));
+			$arVari = explode('|', preg_replace('/pv_'.$produkt_id.'\|/', '', $vari_key));
+				
+			//$vp_data = $this->loadVarianten($produkt_id);
+			$vp_data = $this->getVariants($produkt_id, true, true, true);
+			$this->unserializeVariant($vp_data);
+				
+			$arKey = array();
+			$arAKey = array();
+			$arPics = array();
+				
+			$arReturn = array();
+				
+			if ($this->shop->hasMod('wpsg_mod_fuellmenge')) $arReturn['fmenge'] = 0;
+			if ($this->shop->hasMod('wpsg_mod_weight')) $arReturn['weight'] = 0;
+				
+			foreach ($arVari as $var_key)
+			{
+		
+				$var_id = preg_replace('/\:(.*)/', '', $var_key);
+				$var_value = preg_replace('/(.*)\:/', '', $var_key);
+					
+				if ($vp_data[$var_id]['typ'] == 'checkbox')
+				{
+						
+					$arPicsVariante = array();
+		
+					if (isset($vp_data[$var_id]['pic']))
+					{
+							
+						$arPicsVariante = wpsg_trim(explode(',', $vp_data[$var_id]['pic']));
+							
+					}
+						
+					if ($var_value == '1')
+					{
+		
+						$r = array(
+								'name' => $vp_data[$var_id]['name'],
+								'preis' => $vp_data[$var_id]['price'],
+								'artnr'	=> $vp_data[$var_id]['arVariation'][2]['anr'],
+								'pics' => $arPicsVariante
+						);
+							
+						if ($this->shop->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($vp_data[$var_id]['weight']))
+						{
+								
+							$r['weight'] = $vp_data[$var_id]['weight'];
+							$arReturn['weight'] += $r['weight'];
+								
+						}
+		
+						if ($this->shop->hasMod('wpsg_mod_fuellmenge') && wpsg_isSizedInt($vp_data[$var_id]['fmenge']))
+						{
+								
+							$r['fmenge'] = $vp_data[$var_id]['fmenge'];
+							$arReturn['fmenge'] += $r['fmenge'];
+								
+						}
+		
+						$arReturn[] = $r;
+		
+						$arKey[] = $vp_data[$var_id]['name'];
+		
+						$arPics = array_intersect($arPics, $arPicsVariante);
+		
+					}
+					else
+					{
+		
+						// Checkbox ist nicht markiert
+						//$arPics = array_unique(array_merge($arPics, $arPicsVariante));
+		
+					}
+						
+				}
+				else
+				{
+						
+					$arPicsVariante = array();
+						
+					if (isset($vp_data[$var_id]['arVariation'][$var_value]['pic']))
+					{
+		
+						$arPicsVariante = wpsg_trim(explode(',', $vp_data[$var_id]['arVariation'][$var_value]['pic']));
+						$arPics = array_unique(array_merge($arPics, $arPicsVariante));
+		
+					}
+		
+					$r = array(
+							'name' 	=> $vp_data[$var_id]['name'],
+							'value' => $vp_data[$var_id]['arVariation'][$var_value]['name'],
+							'preis'	=> $vp_data[$var_id]['arVariation'][$var_value]['price'],
+							'artnr'	=> @$vp_data[$var_id]['arVariation'][$var_value]['artnr'],
+							'pics' => $arPicsVariante
+					);
+						
+					if ($this->shop->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($vp_data[$var_id]['arVariation'][$var_value]['weight']))
+					{
+							
+						$r['weight'] = $vp_data[$var_id]['arVariation'][$var_value]['weight'];
+						$arReturn['weight'] += $r['weight'];
+							
+					}
+						
+					if ($this->shop->hasMod('wpsg_mod_fuellmenge') && wpsg_isSizedInt($vp_data[$var_id]['arVariation'][$var_value]['fmenge']))
+					{
+		
+						$r['fmenge'] = $vp_data[$var_id]['arVariation'][$var_value]['fmenge'];
+						$arReturn['fmenge'] += $r['fmenge'];
+		
+					}
+						
+					$arReturn[] = $r;
+						
+					$arKey[] = $vp_data[$var_id]['arVariation'][$var_value]['name'];
+					$arAKey[] = @$vp_data[$var_id]['arVariation'][$var_value]['anr'];
+		
+				}
+		
+			}
+				
+			$arReturn['key'] = implode(' / ', $arKey);
+			$arReturn['akey'] = implode(' / ', $arAKey);
+			$arReturn['pics'] = array_unique($arPics);
+		
+			return $arReturn;
+				
+		} // public function getVariantenInfoArray($vari_key)
+		
+		
 	} // class wpsg_mod_productvariants extends wpsg_mod_basic
 
Index: /mods/wpsg_mod_stock.class.php
===================================================================
--- /mods/wpsg_mod_stock.class.php	(revision 6154)
+++ /mods/wpsg_mod_stock.class.php	(revision 6165)
@@ -91,26 +91,5 @@
 				if ($this->shop->hasMod('wpsg_mod_productvariants'))
 				{
-					/*
-					$arVar = $this->shop->callMod('wpsg_mod_productvariants', 'getVariants', array($_REQUEST['edit_id'], true, true, true));
-					
-					foreach ((array)$arVar as $var_id => $var)
-					{
-						
-						echo '<b>'.__($var['name'], 'wpsg').':</b><br />';
-						echo '<ul>';
-						
-						foreach ((array)$var['arVariation'] as $vari_id => $vari)
-						{
-							
-							echo '<li>';
-							echo __($vari['name'], 'wpsg').': '.((wpsg_isSizedString($vari['stock']))?$vari['stock']:__('Nicht angegeben!', 'wpsg'));
-							echo '</li>';
-							
-						}
-						
-						echo '</ul>';
-						
-					}
-					*/
+
 					$this->shop->callMod('wpsg_mod_productvariants', 'stockVarianten', array($_REQUEST['edit_id']));
 					
@@ -232,8 +211,8 @@
 					$var_key = false;
 
-					if ($this->shop->hasMod('wpsg_mod_varianten'))
-					{
-					
-						if (wpsg_isSizedString($p['mod_vp_varkey']) && preg_match('/^vp_\d+(.*)/', $p['mod_vp_varkey']))
+					if ($this->shop->hasMod('wpsg_mod_productvariants'))
+					{
+					
+						if (wpsg_isSizedString($p['mod_vp_varkey']) && preg_match('/^pv_\d+(.*)/', $p['mod_vp_varkey']))
 						{
 							
@@ -241,5 +220,5 @@
 							
 						}
-						else if (wpsg_isSizedString($p['productkey']) && preg_match('/^vp_\d+(.*)/', $p['productkey']))
+						else if (wpsg_isSizedString($p['productkey']) && preg_match('/^pv_\d+(.*)/', $p['productkey']))
 						{
 							
@@ -277,5 +256,5 @@
 						{
 						
-							$this->shop->callMod('wpsg_mod_varianten', 'reduceStock', array($var_key, $p['menge'], true));
+							$this->shop->callMod('wpsg_mod_productvariants', 'reduceStock', array($var_key, $p['menge'], true));
 
 						}
@@ -283,5 +262,5 @@
 						{
 							
-							$this->shop->callMod('wpsg_mod_varianten', 'reduceStock', array($var_key, $p['menge'], false));
+							$this->shop->callMod('wpsg_mod_productvariants', 'reduceStock', array($var_key, $p['menge'], false));
 							
 						}
@@ -596,9 +575,9 @@
 			if ($product_data['stock_count'] != '1') return;
 			 
-			if ($this->shop->hasMod('wpsg_mod_varianten') && preg_match('/^vp_(.*)/', $data['productkey']))
+			if ($this->shop->hasMod('wpsg_mod_productvariants') && preg_match('/^pv_(.*)/', $data['productkey']))
 			{
 					
 				// Bestand der Variationen runterzÃ€hlen
-				$this->shop->callMod('wpsg_mod_varianten', 'reduceStock', array($data['productkey'], $stock));
+				$this->shop->callMod('wpsg_mod_productvariants', 'reduceStock', array($data['productkey'], $stock));
 					
 			}
@@ -672,9 +651,9 @@
 			{
 				
-				if ($this->shop->hasMod('wpsg_mod_varianten') && preg_match('/^vp_(.*)/', $data['productkey']))
+				if ($this->shop->hasMod('wpsg_mod_productvariants') && preg_match('/^pv_(.*)/', $data['productkey']))
 				{
 						
 					// Bestand der Variationen runterzÃ€hlen
-					$this->shop->callMod('wpsg_mod_varianten', 'reduceStock', array($data['productkey'], $stock));
+					$this->shop->callMod('wpsg_mod_productvariants', 'reduceStock', array($data['productkey'], $stock));
 						
 				}
Index: /mods/wpsg_mod_weight.class.php
===================================================================
--- /mods/wpsg_mod_weight.class.php	(revision 6154)
+++ /mods/wpsg_mod_weight.class.php	(revision 6165)
@@ -236,8 +236,8 @@
 			$product_data_db = $this->shop->cache->loadProduct($this->shop->getProduktId($product_key));
 			
-			if ($this->shop->hasMod('wpsg_mod_varianten') && $this->shop->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($product_key)))
-			{
-			
-				$variInfo = $this->shop->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($product_key));
+			if ($this->shop->hasMod('wpsg_mod_productvariants') && $this->shop->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', array($product_key)))
+			{
+			
+				$variInfo = $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($product_key));
 				$weight = $product_data_db['weight'] + $variInfo['weight'];
 				
Index: /views/css/frontend.css
===================================================================
--- /views/css/frontend.css	(revision 6154)
+++ /views/css/frontend.css	(revision 6165)
@@ -214,8 +214,8 @@
 .wpsg_produkt_wrapper .wpsg_vp_field_typ_radio label { clear: both; float: left; }
 .wpsg_overview .wpsg_mod_varianten_value { text-align:right; }
-.wpsg_mod_varianten_imageselect {}
-.wpsg_mod_varianten_imageselect .image { padding:10px; display:inline-block; }
-.wpsg_mod_varianten_imageselect .akt { padding:5px; border:5px solid #C5C5C5; }
-.wpsg_mod_varianten_imageselect a { text-decoration:none; }
+.wpsg_mod_productvariants_imageselect {}
+.wpsg_mod_productvariants_imageselect .image { padding:10px; display:inline-block; }
+.wpsg_mod_productvariants_imageselect .akt { padding:5px; border:5px solid #C5C5C5; }
+.wpsg_mod_productvariants_imageselect a { text-decoration:none; }
 
 /* Warenkorbwidget */
Index: /views/mods/mod_deliverynote/deliverynote_pdf.phtml
===================================================================
--- /views/mods/mod_deliverynote/deliverynote_pdf.phtml	(revision 6154)
+++ /views/mods/mod_deliverynote/deliverynote_pdf.phtml	(revision 6165)
@@ -163,8 +163,8 @@
 
 		/*
-		if ($this->hasMod('wpsg_mod_varianten') && isset($p['mod_vp_varkey']))
-		{
-		
-			$variante = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['mod_vp_varkey']));
+		if ($this->hasMod('wpsg_mod_productvariants') && isset($p['mod_vp_varkey']))
+		{
+		
+			$variante = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['mod_vp_varkey']));
 			$anr = $variante['akey'];
 			
@@ -301,8 +301,9 @@
 		 * Variante ?
 		 */
-		if ($this->get_option("wpsg_mod_deliverynote_pdf_varianten") == "1" && preg_match('/vp_(.*)/', $p['productkey']))
-		{
-				
-			$variInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['productkey']));
+		//$p['productkey'] = 'pv_6|4:1|7:3';
+		if ($this->get_option("wpsg_mod_deliverynote_pdf_varianten") == "1" && preg_match('/pv_(.*)/', $p['productkey']))
+		{
+				
+			$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
 		
 			$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 1.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);
Index: /views/mods/mod_kundenverwaltung/order.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/order.phtml	(revision 6154)
+++ /views/mods/mod_kundenverwaltung/order.phtml	(revision 6165)
@@ -46,5 +46,5 @@
 							<a href="<?php echo $p['url']; ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
 							<br /><?php echo __('Artikelnummer', 'wpsg'); ?>: <?php echo $p['anr']; ?>
-							<?php if ($this->hasMod('wpsg_mod_varianten') && wpsg_isSizedString($p['mod_vp_varkey'])) { $arVarInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['mod_vp_varkey'])); ?>
+							<?php if ($this->hasMod('wpsg_mod_productvariants') && wpsg_isSizedString($p['mod_vp_varkey'])) { $arVarInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['mod_vp_varkey'])); ?>
 							<br /><?php echo __('Variante', 'wpsg'); ?>: <?php echo $arVarInfo['key']; ?>
 							<?php } ?>	
Index: /views/mods/mod_productfilter/settings_edit.phtml
===================================================================
--- /views/mods/mod_productfilter/settings_edit.phtml	(revision 6154)
+++ /views/mods/mod_productfilter/settings_edit.phtml	(revision 6165)
@@ -46,5 +46,5 @@
 <br />
 
-<?php if ($this->hasMod('wpsg_mod_varianten')) { ?>
+<?php if ($this->hasMod('wpsg_mod_productvariants')) { ?>
 <div class="wpsg_admin_box" id="wpsg_mod_productfilter_varianten_box">
 	<div id="wpsg_mod_productfilter_varianten" class="head" style="border-bottom:0px none;">
@@ -54,5 +54,5 @@
 		<div class="content wpsg_admin_box_content" style="display:block;">
 			<?php if (!wpsg_isSizedArray($this->view['wpsg_mod_productfilter']['arVarianten'])) { ?>
-			<?php echo wpsg_translate(__('Noch keine Varianten hinterlegt. Definieren Sie in der <a href="#1#">Variantenverwaltung</a> Ihre Varianten.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_varianten'); ?>
+			<?php echo wpsg_translate(__('Noch keine Varianten hinterlegt. Definieren Sie in der <a href="#1#">Variantenverwaltung</a> Ihre Varianten.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants'); ?>
 			<?php } else { ?>
 			<?php $index = 0; foreach ($this->view['wpsg_mod_productfilter']['arVarianten'] as $var_name => $set) { $index ++; ?>
Index: /views/mods/mod_productvariants/admin_edit.phtml
===================================================================
--- /views/mods/mod_productvariants/admin_edit.phtml	(revision 6154)
+++ /views/mods/mod_productvariants/admin_edit.phtml	(revision 6165)
@@ -28,4 +28,12 @@
         		<th class="col_price"><?php echo __('Preis', 'wpsg'); ?></th>
         		<th class="col_stock"><?php echo __('Lagerbestand', 'wpsg'); ?></th>
+
+				<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+        		<th class="col_stock"><?php echo __('Gewicht', 'wpsg'); ?></th>
+        		<?php } ?>
+				<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+        		<th class="col_stock"><?php echo __('FÃŒllmenge', 'wpsg'); ?></th>
+        		<?php } ?>
+
         		<?php } ?>
 
@@ -107,4 +115,20 @@
 						});
 
+						jQuery('#productvariation_weight_<?php echo $vari['id']; ?>').wpsg_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_weight',
+					    		product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
+					    		field_id: '<?php echo $vari['id']; ?>'
+							}
+						});
+
+						jQuery('#productvariation_fmenge_<?php echo $vari['id']; ?>').wpsg_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_fmenge',
+					    		product_id: jQuery('#wpsg_mod_productvariants_product_id').val(),
+					    		field_id: '<?php echo $vari['id']; ?>'
+							}
+						});
+						
 		
 					/* ]]> */</script>	
@@ -120,4 +144,12 @@
     			<td class="col_price"><span class="wpsg_editable" id="productvariation_price_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc(wpsg_ff($vari['price'], $this->get_option('wpsg_currency'))); ?></span></td>
     			<td class="col_stock"><span class="wpsg_editable" id="productvariation_stock_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['stock']); ?></span></td>
+
+				<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
+    			<td class="col_stock"><span class="wpsg_editable" id="productvariation_weight_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['weight']); ?></span></td>
+        		<?php } ?>
+				<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
+    			<td class="col_stock"><span class="wpsg_editable" id="productvariation_fmenge_<?php echo $vari['id']; ?>"><?php echo wpsg_hspc($vari['fmenge']); ?></span></td>
+        		<?php } ?>
+
     			<?php } ?>
 
Index: /views/mods/mod_productvariants/basket_row.phtml
===================================================================
--- /views/mods/mod_productvariants/basket_row.phtml	(revision 6165)
+++ /views/mods/mod_productvariants/basket_row.phtml	(revision 6165)
@@ -0,0 +1,23 @@
+ <?php
+
+	/**
+	 * Render ein Variantenprodukt im Warenkorb (basket.phtml)
+	 */
+
+?>
+<?php //wpsg_debug($this->view['variante']) ?> 
+<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
+	<td><?php echo __('Variante', 'wpsg'); ?>:</td>
+	<td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'3':'2'); ?>">
+		<?php if (get_option('wpsg_vp_detailview') == 1) { ?>
+		<?php foreach ($this->view['variante'] as $vari => $value) { ?>
+		<?php if (is_numeric($vari)) { ?>
+		<?php echo $value['name'] ?>: <?php echo $value['value'] ?>; <?php echo __('Art. Nr.', 'wpsg').': '.$value['artnr'] ?>; <?php echo $value['preis'] ?> <?php echo $this->get_option('wpsg_currency') ?>
+		<br />
+		<?php } ?>
+		<?php } ?>							
+		<?php } else { ?>
+		<?php echo $this->view['variante']['key']; ?>
+		<?php } ?>
+	</td>
+</tr>
Index: /views/mods/mod_productvariants/frontend.js
===================================================================
--- /views/mods/mod_productvariants/frontend.js	(revision 6154)
+++ /views/mods/mod_productvariants/frontend.js	(revision 6165)
@@ -1,2 +1,69 @@
+
+	var wpsg_vp_vari = new Array();	
+		  
+	function wpsg_vp_switch(product_id, product_index)
+	{
+			 
+		var var_key = 'pv_' + product_id + "|";
+		//alert('LÃ€nge: ' + wpsg_vp_vari[product_id].length);
+		
+		for (var i = 0; i < wpsg_vp_vari[product_id].length; i ++)
+		{
+			
+			vkey1 = i + ":";
+			vkey2 = '';
+			
+			if (wpsg_vp_vari[product_id][i] == "select")
+			{				
+				vkey2 = jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + " #wpsg_vpfield_" + product_id + "_" + i).val();				
+			}
+			else if (wpsg_vp_vari[product_id][i] == "radio")
+			{
+				vkey2 = jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' input[name="wpsg_vp[' + i + ']"]:checked').val();
+			}
+			else if (wpsg_vp_vari[product_id][i] == "checkbox")
+			{
+				vkey2 = jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' input[name="wpsg_vp[' + i + ']"]:checked').length;
+			} 
+			else if (wpsg_vp_vari[product_id][i] == "image")
+			{
+				vkey2 = jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' .wpsg_mod_productvariants_imageselect_' + i + ' .akt').attr("data-wpsg-id");
+			}
+			
+			if (vkey2 != '') {
+				if (wpsg_vp_vari[product_id][i] == "image")
+					jQuery('#wpsg_vp_' + i).val(vkey2);
+				var_key += vkey1 + vkey2; 
+				if (i < (wpsg_vp_vari[product_id].length - 1)) var_key += "|";
+			}
+		}
+		 
+		//console.log(jQuery('#wpsg_produktform_' + product_index).serialize());
+		//console.log(var_key);
+		//return;
+		
+		jQuery('#wpsg_produktform_' + product_index).append('<div class="wpsg_product_layer"><img src="' + wpsg_ajax.img_ajaxloading + '" alt="' + wpsg_ajax.label_pleasewait + '" /></div>');
+ 
+		jQuery.ajax( {
+			'url': wpsg_ajax.ajaxurl,
+			'method': 'get',
+			'data': {
+				'action': 'wpsg_productvariants_switch',
+				'wpsg_post_id': jQuery('#wpsg_produktform_' + product_index + ' input[name="wpsg_post_id"]').val(),
+				'quantity': jQuery('#wpsg_menge_' + product_index).val(),
+				'template': jQuery('#wpsg_produktform_' + product_index + ' input[name="wpsg[template]"]').val(),
+				'referer': jQuery('#wpsg_produktform_' + product_index + ' input[name="myReferer"]').val(),
+				'form_data': jQuery('#wpsg_produktform_' + product_index).serialize(),
+				'product_key': var_key,
+				'product_index': product_index
+			},
+			'success': function(data) {
+		 
+				jQuery('#wpsg_produktform_' + product_index).replaceWith(data);
+				
+			}
+		} );
+		
+	} // function wpsg_vp_switch(produkt_id)
 
     function wpsg_mod_productvariants_reload(event)
Index: /views/mods/mod_productvariants/produkt.phtml
===================================================================
--- /views/mods/mod_productvariants/produkt.phtml	(revision 6154)
+++ /views/mods/mod_productvariants/produkt.phtml	(revision 6165)
@@ -19,5 +19,6 @@
 		
 		$kk++;
-		if ($var['active'] == "1") { 
+		//if ($var['active'] == "1") 
+		{ 
 
 			$vAktiv = true; ?>
@@ -111,6 +112,6 @@
 					<?php /* IMAGE START */ ?>
 					<?php if ($var['typ'] == 'image' && $this->hasMod('wpsg_mod_produktbilder')) { ?>
-						<div class="wpsg_mod_varianten_imageselect wpsg_mod_varianten_imageselect_<?php echo $k; ?>">
-						<input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]); ?>" />
+						<div class="wpsg_mod_productvariants_imageselect wpsg_mod_productvariants_imageselect_<?php echo $k; ?>">
+						<input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vp_<?php echo $k; ?>" value="<?php echo wpsg_getStr($this->view['wpsg_mod_productvariants']['set'][$k]); ?>" />
 							<?php $kkv = -1; foreach ($var['arVariation'] as $kv => $vari) { $kkv++;
 								if ($vari['active'] == '1' && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
Index: /views/mods/mod_productvariants/settings_edit.phtml
===================================================================
--- /views/mods/mod_productvariants/settings_edit.phtml	(revision 6154)
+++ /views/mods/mod_productvariants/settings_edit.phtml	(revision 6165)
@@ -21,4 +21,5 @@
 			
 			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_productvariants', __('Preis der Variation direkt anzeigen'), $this->get_option('wpsg_mod_productvariants')); ?>
+			<?php echo wpsg_drawForm_Checkbox('wpsg_vp_detailview', __('Erweiterte Variantenanzeige aktivieren', 'wpsg'), $this->get_option('wpsg_vp_detailview'), array('help' => 'wpsg_vp_detailview')); ?>
 			
 		</div>
Index: ews/mods/mod_productvariants/stock2.phtml
===================================================================
--- /views/mods/mod_productvariants/stock2.phtml	(revision 6154)
+++ 	(revision )
@@ -1,59 +1,0 @@
-<?php
-
-	/**
-	 * HTML Teil fÃŒr die Produktvariablenverwaltung
-	 * (GLOBAL und Produktbezogen)
-	 */
-
-?>
-
-<div id="wpsg_mod_productvariants_dialog_modal" class="modal fade" tabindex="-1" role="dialog">
-	<div class="modal-dialog" role="document">
-		<div class="modal-content">
-			<div class="modal-header">
-				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-				<h4 class="modal-title"><?php echo __('Produktvariation bearbeiten', 'wpsg'); ?></h4>
-			</div>
-			<div class="modal-body">
-
-			</div>
-			<div class="modal-footer">
-
-				<button type="button" class="btn-sm wpsg_mod_productvariants_variation_add_button btn btn-default" id="wpsg_mod_productvariants_variation_add_button" style="display:none;" onclick="return wpsg_mod_productvariants_variation_add();"><span class="glyphicon glyphicon-plus"></span>&nbsp;<?php echo __('Neue Variation', 'wpsg'); ?></button>
-				<button type="button" class="btn-sm wpsg_mod_productvariants_variants_close wpsg_mod_productvariants_variants_vari btn btn-default" style="display:none;" onclick="return wpsg_mod_productvariants_back();"><span class="glyphicon glyphicon-remove"></span>&nbsp;<?php echo __('SchlieÃen', 'wpsg'); ?></button>
-
-			</div>
-		</div>
-	</div>
-</div>
-
-<script type="text/javascript">/* <![CDATA[ */
-
-	function wpsg_mod_productvariants_show(product_id)
-	{
-
-		jQuery('#wpsg_mod_productvariants_dialog button').prop('disabled', true);
-		jQuery('#wpsg_mod_productvariants_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-		 
-		jQuery.ajax( {
-			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&noheader=1',
-			data: {  
-				'subaction': 'admin_show',
-				'product_id': product_id
-			},
-			success: function(data) { 
-
-				jQuery('.wpsg_mod_productvariants_variants').show();
-				jQuery('.wpsg_mod_productvariants_variants_vari').hide();
-				
-				jQuery('#wpsg_mod_productvariants_dialog .modal-body').html(data);
-				jQuery('#wpsg_mod_productvariants_dialog button').prop('disabled', false); 
-
-			}
-    	} ); 
-		 
-		return false;
-		
-	} // function wpsg_mod_productvariants_show()
-
-/* ]]> */</script>
Index: ews/mods/mod_productvariants/stockVarianten.phtml
===================================================================
--- /views/mods/mod_productvariants/stockVarianten.phtml	(revision 6154)
+++ 	(revision )
@@ -1,59 +1,0 @@
-<?php
-
-	/**
-	 * Template um eine Variante zu bearbeiten
-	 */
-
-?>
-
-<?php if (wpsg_isSizedArray($this->view['arVariant'])) { ?>
-
-	<table class="table wpsg_mod_productvariants_table_variation">
-    	<tbody >
-
-    	<?php foreach ($this->view['arVariant'] as $var) { ?>
-    		<tr>    		
-    		
-    			<td class="col_shortname" colspan="3"><?php echo wpsg_hspc($var['name']); ?></td>
-
-    			
-    		</tr>
-    		<?php foreach ($var['arVariation'] as $vari) {  ?>
-	    		<tr>    		
-    			<td class="col_active">
-    			</td>
-    			<?php 
-    			$txt = wpsg_hspc($vari['name']).' : '.wpsg_hspc($vari['stock']);
-    			 
-    			?>
-    			<td class="col_shortname"><?php echo $txt; ?></td>
-    			<td class="col_1">
-    			</td>
-
-				</tr>
-			<?php } ?>
-    	<?php } ?>    	
-
-    	</tbody>
-    </table>
-
-	<script type="text/javascript">/* <![CDATA[ */
-
-		
-	function wpsg_vp_ajaxloading_show()
-	{
-
-		jQuery('.wpsg_mod_productvariants_ajaxloading').show();
-		
-	}
-
-	function wpsg_vp_ajaxloading_hide()
-	{
-
-		jQuery('.wpsg_mod_productvariants_ajaxloading').hide();
-		
-	} 
-
-	/* ]]> */</script> 
-    
-<?php } ?>
Index: /views/mods/mod_rechnungen/accounting_pdf.phtml
===================================================================
--- /views/mods/mod_rechnungen/accounting_pdf.phtml	(revision 6154)
+++ /views/mods/mod_rechnungen/accounting_pdf.phtml	(revision 6165)
@@ -348,8 +348,8 @@
 		 * Variante ? 
 		 */
-		if (preg_match('/vp_(.*)/', $p['productkey']))
-		{
-			
-			$variInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['productkey']));
+		if (preg_match('/pv_(.*)/', $p['productkey']))
+		{
+			
+			$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
 
 			$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);			
Index: /views/mods/mod_rechnungen/invoice_pdf.phtml
===================================================================
--- /views/mods/mod_rechnungen/invoice_pdf.phtml	(revision 6154)
+++ /views/mods/mod_rechnungen/invoice_pdf.phtml	(revision 6165)
@@ -348,8 +348,8 @@
 		 * Variante ? 
 		 */
-		if (preg_match('/vp_(.*)/', $p['productkey']))
-		{
-			
-			$variInfo = $this->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p['productkey']));
+		if (preg_match('/pv_(.*)/', $p['productkey']))
+		{
+			
+			$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
 
 			$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);			
Index: /views/mods/mod_request/requestmail.phtml
===================================================================
--- /views/mods/mod_request/requestmail.phtml	(revision 6154)
+++ /views/mods/mod_request/requestmail.phtml	(revision 6165)
@@ -27,5 +27,5 @@
 <?php echo wpsg_pad_left(wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')), 15); ?> 
 <?php /* Variantenanzeige im Produkt BEGIN */ ?>
-<?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+<?php if ($this->hasMod('wpsg_mod_productvariant') && $this->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
 <?php echo wpsg_pad_right(' ', 5); ?>
 <?php echo __('Variante', 'wpsg'); ?>: <?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?> 
Index: /views/mods/mod_request/requestmail_html.phtml
===================================================================
--- /views/mods/mod_request/requestmail_html.phtml	(revision 6154)
+++ /views/mods/mod_request/requestmail_html.phtml	(revision 6165)
@@ -32,5 +32,5 @@
 		
 		<?php /* Variantenanzeige im Produkt BEGIN */ ?>
-		<?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+		<?php if ($this->hasMod('wpsg_mod_productvariants') && $this->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
 		<tr>
 			<td colspan="2"><?php echo __('Variante', 'wpsg'); ?>:</td>
Index: /views/mods/mod_request/requestpage.phtml
===================================================================
--- /views/mods/mod_request/requestpage.phtml	(revision 6154)
+++ /views/mods/mod_request/requestpage.phtml	(revision 6165)
@@ -140,5 +140,5 @@
 					
 					<?php /* Variantenanzeige im Produkt BEGIN */ ?>
-					<?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
+					<?php if ($this->hasMod('wpsg_mod_productvariants') && $this->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
 					<tr class="wpsg_row_product_varianten">
 						<td class="wpsg_cell_label"><?php echo __('Variante', 'wpsg'); ?>:</td>
Index: /views/produkt/index.phtml
===================================================================
--- /views/produkt/index.phtml	(revision 6154)
+++ /views/produkt/index.phtml	(revision 6165)
@@ -175,5 +175,5 @@
                             <?php if ($this->hasMod('wpsg_mod_productvariants')) $arVarianten = $this->callMod('wpsg_mod_productvariants', 'getVariants', array($d['id'], true, true, true)); if (wpsg_isSizedArray($arVarianten)) { ?>
                             <div style="line-height:inherit; padding:2px 0px 0px;">
-                                <a class="clueTip" rel="#" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_stock&edit_id=<?php echo $d['id']; ?>&noheader=1&wpsg_cmd=getVariInfo"><?php echo __('Variantenbestand', 'wpsg'); ?></a>
+                                <a class="clueTip" rel="#" href="#" onclick="return wpsg_mod_productvariations_show(<?php echo $d['id']; ?>)" ><?php echo __('Variantenbestand', 'wpsg'); ?></a>
                             </div>
                             <?php } ?>
@@ -221,4 +221,25 @@
 </div>
 
+<?php if ($this->hasMod('wpsg_mod_productvariants') && $this->hasMod('wpsg_mod_stock')) { ?>
+<div id="wpsg_mod_productvariations_dialog" class="modal fade" tabindex="-1" role="dialog">
+	<div class="modal-dialog" role="document">
+		<div class="modal-content">
+			<div class="modal-header">
+				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+				<h4 class="modal-title"><?php echo __('Produktvariationen Lagerbestand anzeigen', 'wpsg'); ?></h4>
+			</div>
+			<div class="modal-body">
+
+			</div>
+			<div class="modal-footer">
+
+				<button type="button" class="btn-sm wpsg_mod_productvariants_variants_close wpsg_mod_productvariants_variants_vari btn btn-default" style="display:none;" onclick="return wpsg_mod_productvariants_back();"><span class="glyphicon glyphicon-remove"></span>&nbsp;<?php echo __('SchlieÃen', 'wpsg'); ?></button>
+
+			</div>
+		</div>
+	</div>
+</div>
+<?php } ?>
+
 <script type="text/javascript">/* <![CDATA[ */
 
@@ -227,4 +248,34 @@
     <?php } ?>
 
+	function wpsg_mod_productvariations_show(product_id)
+	{
+
+		jQuery('#wpsg_mod_productvariations_dialog button').prop('disabled', true);
+		jQuery('#wpsg_mod_productvariations_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+		
+		//	wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&noheader=1',
+		jQuery('#wpsg_mod_productvariations_dialog').modal();
+		
+		jQuery.ajax( {
+			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_stock&edit_id=<?php echo $d['id']; ?>&noheader=1&wpsg_cmd=getVariInfo',
+			data: {  
+				'subaction': 'admin_show',
+				'product_id': product_id
+			},
+			success: function(data) { 
+				
+				jQuery('.wpsg_mod_productvariants_variants').show();
+				jQuery('.wpsg_mod_productvariants_variants_vari').hide();
+				
+				jQuery('#wpsg_mod_productvariations_dialog .modal-body').html(data);
+				jQuery('#wpsg_mod_productvariations_dialog button').prop('disabled', false); 
+
+			}
+    	} ); 
+		 
+		return false;
+		
+	} // function wpsg_mod_productvariations_show()
+    
 	function goPage(page)
 	{
