Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 6168)
+++ /controller/wpsg_ShopController.class.php	(revision 6169)
@@ -2723,4 +2723,6 @@
 			
 			if (is_admin()) $this->addShipPay();
+			
+			$this->basket->save(false);
 				
 			load_plugin_textdomain('wpsg', false, dirname( plugin_basename( __FILE__ ) ).'/../lang/');
Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 6168)
+++ /lib/wpsg_basket.class.php	(revision 6169)
@@ -600,4 +600,5 @@
 				$data = array(					
 					'email' 	=> wpsg_q(wpsg_getStr($this->arCheckout['email'])),					
+					'invisible' => 1, 	// 1=unvollstÃ€ndige Bestellung
 					'geb' 		=> wpsg_q(wpsg_toDate(wpsg_getStr($this->arCheckout['geb']))),
 					'ustidnr' 	=> wpsg_q(wpsg_getStr($this->arCheckout['ustidnr']))
@@ -712,8 +713,9 @@
 					'land' => wpsg_q(wpsg_getStr($this->arCheckout['land']))
 				);
-				$adress_data['cdate'] = 'NOW()';
+				//$adress_data['cdate'] = 'NOW()';
 				
 				$re_adress_id = 0;
-				if ($finish_order === true) {
+				if (false && $finish_order === true) 
+				{
 					
 					// Adresse als Rechnungsadresse anlegen
@@ -725,5 +727,4 @@
 				}
 				
-				/*
 				if (!wpsg_isSizedInt($customer_data['adress_id']))
 				{
@@ -741,5 +742,5 @@
 					
 				}
-				*/
+				$re_adress_id = $customer_data['adress_id'];
 				
 				// Kundendaten ggf. aktualisieren
@@ -1034,4 +1035,11 @@
 					}
 					
+
+					// Eintrag in die Kundentabelle
+					$kdata = array(
+							'invisible' => 0 	// 0=vollstÃ€ndige Bestellung
+					);
+					$this->db->UpdateQuery(WPSG_TBL_KU, $kdata, "`id` = '".wpsg_q($k_id)."'");
+					
 					// Alte BestellID muss nach AbschluÃ entfernt werden
 					unset($_SESSION['wpsg']['order_id']);
Index: /mods/wpsg_mod_discount.class.php
===================================================================
--- /mods/wpsg_mod_discount.class.php	(revision 6168)
+++ /mods/wpsg_mod_discount.class.php	(revision 6169)
@@ -761,5 +761,5 @@
 					{
 						
-						foreach ($var['vari'] as $vari_key => &$vari)
+						foreach ($var['arVariation'] as $vari_key => &$vari)
 						{
 							
Index: /mods/wpsg_mod_downloadplus.class.php
===================================================================
--- /mods/wpsg_mod_downloadplus.class.php	(revision 6168)
+++ /mods/wpsg_mod_downloadplus.class.php	(revision 6169)
@@ -753,5 +753,5 @@
 			{
 				
-				$variInfo = $this->shop->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($p_key));
+				$variInfo = $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p_key));
 				
 				if (wpsg_isSizedArray($variInfo))
@@ -774,12 +774,16 @@
 				$arPkeys = $this->db->fetchAssoc("SELECT `p_key` FROM `".WPSG_TBL_PDFINDIV."` WHERE `o_id` = '".$order_id."'");
 				
-				$arVarianten = $this->shop->callMod('wpsg_mod_varianten', 'loadVarianten', array($p_id));
-				
-				$strVarKey = preg_replace('/(^vp_\d+\/)/', '', $p_key);
-
-				if (strpos($strVarKey, ':'))
-				{
-					
-					$arVar = explode(':', $strVarKey);
+				//$arVarianten = $this->shop->callMod('wpsg_mod_varianten', 'loadVarianten', array($p_id));
+				$arVariants = $this->shop->callMod('wpsg_mod_productvariants', 'getVariants', array($p_id, true, true, true));
+				$this->unserializeVariant($vp_data);
+				
+				$arVarianten = $arVariants;
+				
+				$strVarKey = preg_replace('/(^pv_\d+\|)/', '', $p_key);
+
+				if (strpos($strVarKey, '|'))
+				{
+					
+					$arVar = explode('|', $strVarKey);
 					
 					$varName = '';
@@ -788,10 +792,10 @@
 					{
 						
-						$arPvar = explode('_', $vars);
+						$arPvar = explode(':', $vars);
 						
 						if ($arPvar[1] == 1 && $arVarianten[$arPvar[0]]['typ'] == 'checkbox')
 						{
 							
-							$varName .= $this->shop->callMod('wpsg_mod_varianten', 'getVariantenName', array($arVarianten, $arPvar[0]));
+							$varName .= $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenName', array($arVarianten, $arPvar[0]));
 							$varName .= " / ";
 							
@@ -800,11 +804,11 @@
 						{
 							
-							$varName .= $this->shop->callMod('wpsg_mod_varianten', 'getVariantenName', array($arVarianten, $arPvar[0]));
+							$varName .= $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenName', array($arVarianten, $arPvar[0]));
 							$varName .= ': ';
-							$varName .= $this->shop->callMod('wpsg_mod_varianten', 'getVariName', array($arVarianten, $arPvar[0], $arPvar[1]));
+							$varName .= $this->shop->callMod('wpsg_mod_productvariants', 'getVariName', array($arVarianten, $arPvar[0], $arPvar[1]));
 							$varName .= " / ";
 							
 						}
-												
+											
 					}
 					
@@ -820,5 +824,5 @@
 					{
 							
-						$varName .= $this->shop->callMod('wpsg_mod_varianten', 'getVariantenName', array($arVarianten, $arPvar[0]));
+						$varName .= $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenName', array($arVarianten, $arPvar[0]));
 						$varName .= " / ";
 							
@@ -827,7 +831,7 @@
 					{
 							
-						$varName .= $this->shop->callMod('wpsg_mod_varianten', 'getVariantenName', array($arVarianten, $arPvar[0]));
+						$varName .= $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenName', array($arVarianten, $arPvar[0]));
 						$varName .= ': ';
-						$varName .= $this->shop->callMod('wpsg_mod_varianten', 'getVariName', array($arVarianten, $arPvar[0], $arPvar[1]));
+						$varName .= $this->shop->callMod('wpsg_mod_productvariants', 'getVariName', array($arVarianten, $arPvar[0], $arPvar[1]));
 						$varName .= " / ";
 							
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 6168)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 6169)
@@ -58,5 +58,6 @@
 		   		comment TEXT NOT NULL,
 		   		wp_user_id INT(11) DEFAULT 0 NOT NULL,
-		   		status VARCHAR(255) NOT NULL,
+		   		invisible INT(1) DEFAULT 0 NOT NULL COMMENT '1=unvollstÃ€ndige Bestellung',
+				status VARCHAR(255) NOT NULL,
 		   	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
    	   	 
Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 6168)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 6169)
@@ -989,4 +989,44 @@
         	
         } // public function getVariImages($product_id, $var_id, $vari_id)
+   
+        /**
+         * Gibt den Namen der Variante zurÃŒck
+         */
+        public function getVariantenName($vp_data, $var_id)
+        {
+        		
+        	$name = $vp_data[$var_id]['name'];
+        
+        	if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
+        	{
+        		if ($vp_data[$var_id]['lang'][$_REQUEST['wpsg_lang']]['name'] != "")
+        		{
+        			$name = $vp_data[$var_id]['lang'][$_REQUEST['wpsg_lang']]['name'];
+        		}
+        	}
+        		
+        	return ((trim($name) == "")?"----":$name);
+        		
+        } // public function getVariantenName($vp_data, $v_id)
+        
+        /**
+         * Gibt den Namen der Variation zurÃŒck
+         */
+        public function getVariName($vp_data, $var_id, $vari_id)
+        {
+        		
+        	$name = $vp_data[$var_id]['arVariation'][$vari_id]['name'];
+        
+        	if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
+        	{
+        		if ($vp_data[$var_id]['lang'][$_REQUEST['wpsg_lang']]['arVariation'][$vari_id]['name'] != "")
+        		{
+        			$name = $vp_data[$var_id]['lang'][$_REQUEST['wpsg_lang']]['arVariation'][$vari_id]['name'];
+        		}
+        	}
+        
+        	return ((trim($name) == "")?"----":$name);
+        		
+        } // public function getVariName($vp_data, $var_id, $vari_id)
         
 		/**
@@ -1043,4 +1083,5 @@
 			$vp_data = $this->getVariants($produkt_id, true, true, true);
 			$this->unserializeVariant($vp_data);
+			
 			if ($this->isVariantsProductKey($product_key)) {
 				$arVar = $this->explodeProductKey($product_key);
@@ -1543,7 +1584,4 @@
 					foreach($ar as $k => $v) {
 						$vi[$k] = $v;
-						//$arr = $ar[$k]['vari'][$vi['id']];
-						//foreach ($arr as $kk => $vv)
-						//	$vi[$kk] = $vv;
 					}
 				}
@@ -1565,7 +1603,4 @@
 						foreach($ar as $k => $v) {
 							$vi[$k] = $v;
-							//$arr = $ar[$k]['vari'][$vi['id']];
-							//foreach ($arr as $kk => $vv)
-							//	$vi[$kk] = $vv;
 						}
 					}
@@ -1841,4 +1876,27 @@
 			
 		}
+	
+		public function basket_preInsertDefekt()
+		{
+		
+			if (is_array($_REQUEST['wpsg_vp']) && sizeof($_REQUEST['wpsg_vp']) > 0)
+			{
+		
+				$var_key = 'pv_'.$_REQUEST['wpsg']['produkt_id'].'|';
+		
+				foreach ($_REQUEST['wpsg_vp'] as $var => $var_value)
+				{
+						
+					$var_key .= $var.":".$var_value."|";
+						
+				}
+		
+				$var_key = substr($var_key, 0, -1);
+		
+				$_REQUEST['wpsg']['produkt_id'] = $var_key;
+		
+			}
+				
+		} // public function basket_preInsert()
 		
 		public function basket_row(&$p, $i)
Index: /mods/wpsg_mod_request.class.php
===================================================================
--- /mods/wpsg_mod_request.class.php	(revision 6168)
+++ /mods/wpsg_mod_request.class.php	(revision 6169)
@@ -84,5 +84,5 @@
  
 				// VariantenmodulschlÃŒssel generieren
-				$this->shop->callMod('wpsg_mod_varianten', 'basket_preInsert');
+				$this->shop->callMod('wpsg_mod_productvariants', 'basket_preInsert');
 				
 				$this->addProductToRequestlist($_REQUEST['wpsg']['produkt_id'], $_REQUEST['wpsg']['menge']);
@@ -420,8 +420,8 @@
 				// Eventuelle Zusatzzeilen zÃ€hlen fÃŒr Ausgabe rowspan	
 				$arProductReturn['addRowspan'] = 0;				
-				if ($this->shop->hasMod('wpsg_mod_varianten') && $this->shop->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($ses_product['product_key'])))
-				{
-					
-					$arProductReturn['variantenInfo'] = $this->shop->callMod('wpsg_mod_varianten', 'getVariantenInfoArray', array($ses_product['product_key']));
+				if ($this->shop->hasMod('wpsg_mod_productvariants') && $this->shop->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', array($ses_product['product_key'])))
+				{
+					
+					$arProductReturn['variantenInfo'] = $this->shop->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($ses_product['product_key']));
 					
 					$arProductReturn['addRowspan'] ++;
