Index: /mods/wpsg_mod_abo.class.php
===================================================================
--- /mods/wpsg_mod_abo.class.php	(revision 6331)
+++ /mods/wpsg_mod_abo.class.php	(revision 6332)
@@ -3,14 +3,14 @@
 	/**
 	 * Erlaubt den Verkauf von Abos
-	 * @author Daschmi 
+	 * @author Daschmi
 	 */
 	class wpsg_mod_abo extends wpsg_mod_basic
 	{
-		
+
 		var $lizenz = 1;
 		var $id = 1630;
 		var $hilfeURL = 'http://wpshopgermany.de/?p=3292';
 		var $version = "9.9.9";
-		
+
 		/**
 		 * Costructor
@@ -18,18 +18,18 @@
 		public function __construct()
 		{
-								
+
 			parent::__construct();
-								
+
 			$this->name = __('AboProdukte', 'wpsg');
 			$this->group = __('Produkte', 'wpsg');
 			$this->desc = __('ErmÃ¶glicht den Verkauf von Abo Produkten', 'wpsg');
-		
+
 		} // public function __construct()
-		
+
 		public function install()
 		{
-			
+
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
-			
+
 			/**
 			 * Produkttabelle erweitern
@@ -42,7 +42,7 @@
 				wpsg_mod_abo_url varchar(500) NOT NULL
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-				
+
 			dbDelta($sql);
-			
+
 			/**
 			 * Abo Tabelle anlegen
@@ -51,172 +51,172 @@
 				id mediumint(9) NOT NULL AUTO_INCREMENT,
 	  			cdate datetime NOT NULL,
-				order_id int(11) NOT NULL,				
+				order_id int(11) NOT NULL,
 				product_key varchar(255) NOT NULL,
 				expiration DATETIME NOT NULL,
-				inform_expiration int(1) DEFAULT '0' NOT NULL,	
-				rebuy int(11) DEFAULT '0' NOT NULL,					  
+				inform_expiration int(1) DEFAULT '0' NOT NULL,
+				rebuy int(11) DEFAULT '0' NOT NULL,
 				PRIMARY KEY  (id),
 	  			KEY order_id (order_id),
 				KEY product_key (product_key)
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-			
+
 			dbDelta($sql);
-			
+
 			/**
 			 * Bestelltabelle erweitern um bei Folgebestellungen zu wissen welche die Originalbestellung ist
-			 */			
+			 */
 			$sql = "CREATE TABLE ".WPSG_TBL_ORDER." (
 				wpsg_mod_abo_origin_order int(11) NOT NULL,
 				KEY wpsg_mod_abo_origin_order (wpsg_mod_abo_origin_order)
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-			
+
 			dbDelta($sql);
-			
+
 			$this->shop->checkDefault('wpsg_wpsgmodabofirstbuy_betreff', __('Sie haben erfolgreich ein Abo erworben', 'wpsg'));
 			$this->shop->checkDefault('wpsg_wpsgmodaboexpiration_betreff', __('Ihr Abo ist ausgelaufen', 'wpsg'));
 			$this->shop->checkDefault('wpsg_wpsgmodabrebuy_betreff', __('Ihr Abo ist verlÃ€ngert worden', 'wpsg'));
-			
+
 			$this->shop->checkDefault('wpsg_mod_abo_wpsgmodabofirstbuy', '1');
 			$this->shop->checkDefault('wpsg_mod_abo_wpsgmodaboexpiration', '1');
 			$this->shop->checkDefault('wpsg_mod_abo_wpsgmodabrebuy', '1');
-			
+
 		} // public function install()
-		
-		public function settings_edit() 
-		{
-			
+
+		public function settings_edit()
+		{
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/settings_edit.phtml');
-			
+
 		} // public function settings_edit()
-		
+
 		public function settings_save()
 		{
-						
+
 			$this->shop->update_option('wpsg_mod_abo_url', $_REQUEST['wpsg_mod_abo_url']);
-			
+
 			$this->shop->update_option('wpsg_mod_abo_wpsgmodabofirstbuy', $_REQUEST['wpsg_mod_abo_wpsgmodabofirstbuy']);
 			$this->shop->update_option('wpsg_mod_abo_wpsgmodaboexpiration', $_REQUEST['wpsg_mod_abo_wpsgmodaboexpiration']);
 			$this->shop->update_option('wpsg_mod_abo_wpsgmodabrebuy', $_REQUEST['wpsg_mod_abo_wpsgmodabrebuy']);
-			
+
 		} // public function settings_save()
-		
+
 		public function product_addedit_content(&$product_content, &$product_data)
 		{
-				
+
 			if (isset($_REQUEST['wpsg_lang'])) return false;
-				
+
 			if ($product_data['wpsg_mod_abo_resell'] > 0)
 			{
-			
+
 				$product_data['wpsg_mod_abo_resell_count'] = $product_data['wpsg_mod_abo_resell'];
 				$product_data['wpsg_mod_abo_resell'] = 1;
-			
+
 			}
 			else
 			{
-			
+
 				$product_data['wpsg_mod_abo_resell_count'] = '1';
 				$product_data['wpsg_mod_abo_resell'] = 0;
-			
-			}
-				
+
+			}
+
 			$this->shop->view['product'] = $product_data;
-				
+
 			$product_content['wpsg_mod_abo'] = array(
 					'title' => __('Abo', 'wpsg'),
 					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/produkt_addedit_content.phtml', false)
 			);
-				
+
 		} // public function product_addedit_content(&$product_content, &$produkt_data)
-		
+
 		public function produkt_save_before(&$product_data)
 		{
-			
+
 			if (isset($_REQUEST['wpsg_lang'])) return false;
-			
+
 			if (isset($_REQUEST['wpsg_mod_abo_activ']) && $_REQUEST['wpsg_mod_abo_activ'] == '1')
 			{
-				
+
 				$product_data['wpsg_mod_abo_activ'] = '1';
 				$product_data['wpsg_mod_abo_price'] = wpsg_tf($_REQUEST['wpsg_mod_abo_price']);
 				$product_data['wpsg_mod_abo_durration'] = $_REQUEST['wpsg_mod_abo_durration'];
 				$product_data['wpsg_mod_abo_url'] = $_REQUEST['wpsg_mod_abo_url'];
-				
+
 				if ($_REQUEST['wpsg_mod_abo_resell'] == '1')
 				{
-					
+
 					if ($_REQUEST['wpsg_mod_abo_resell_count'] <= 0)
 					{
-						
+
 						$this->shop->addBackendError(__('UngÃŒltige Anzahl von zulÃ€ssigen AbokÃ€ufen. Wurde auf unendlich gesetzt.', 'wpsg'));
 						$product_data['wpsg_mod_abo_resell'] = '0';
-						
+
 					}
 					else
 					{
-					
+
 						$product_data['wpsg_mod_abo_resell'] = wpsg_q($_REQUEST['wpsg_mod_abo_resell_count']);
-						
+
 					}
-					
+
 				}
 				else
 				{
-					
+
 					$product_data['wpsg_mod_abo_resell'] = '0';
-					
-				}
-				
+
+				}
+
 			}
 			else
 			{
-				
+
 				$product_data['wpsg_mod_abo_activ'] = '0';
-				
-			}
-						
+
+			}
+
 		} // public function produkt_save(&$produkt_id)
-		
+
 		public function setOrderStatus($order_id, $status_id, $inform)
 		{
-			 
+
 			if ($status_id == 100)
 			{
-				
-				// Sind in der Bestellung Abo Produkte?				
+
+				// Sind in der Bestellung Abo Produkte?
 				$arBasket = $this->shop->cache->loadBasketArray($order_id);
-			  
+
 				foreach ($arBasket['produkte'] as $product)
 				{
-										
+
 					$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product['productkey']));
 
 					if (substr($product['productkey'], 0, 3) == 'abo')
 					{
-						
+
 						// BestellID der OriginalBestellung
 						$order_base_id = $this->getOrderIDFromKey($product['productkey']);
-						
+
 						// Eine Abo VerlÃ€ngerung wurde gekauft
 						$abo_entry = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_base_id)."' AND `product_key` = '".wpsg_q($product['productkey'])."'");
- 
-						if ($abo_entry['id'] <= 0) throw new \wpsg\Exception(__('Es wurde eine Bestellung auf Zahlung aktzeptiert gesetzt, die eine Abo VerlÃ€ngerung drin hat zu der kein Eintrag existiert', 'wpsg'));						
-						if ($product_data['wpsg_mod_abo_resell'] != 0 && $abo_entry['rebuy'] + $product['menge'] > $product_data['wpsg_mod_abo_resell']) throw new \wpsg\Exception('Es wurde eine Bestellung auf Zahlung aktzeptiert gesetzt, das Abo konnte aber nicht verlÃ€ngert werden da es die gÃŒltige Anzahl im Produkt ÃŒberschreibt', __('wpsg')); 
+
+						if ($abo_entry['id'] <= 0) throw new \wpsg\Exception(__('Es wurde eine Bestellung auf Zahlung aktzeptiert gesetzt, die eine Abo VerlÃ€ngerung drin hat zu der kein Eintrag existiert', 'wpsg'));
+						if ($product_data['wpsg_mod_abo_resell'] != 0 && $abo_entry['rebuy'] + $product['menge'] > $product_data['wpsg_mod_abo_resell']) throw new \wpsg\Exception('Es wurde eine Bestellung auf Zahlung aktzeptiert gesetzt, das Abo konnte aber nicht verlÃ€ngert werden da es die gÃŒltige Anzahl im Produkt ÃŒberschreibt', __('wpsg'));
 
 						if (strtotime($abo_entry['expiration']) < time())
 						{
-							
+
 							// Das Abo ist ausgelaufen
 							$abo_expiration = $this->getAboExpiration($product_data['id'], $product['menge'], time());
-							
+
 						}
 						else
 						{
-							
+
 							// Abo wurde verlÃ€ngert und der Zeitraum wird an die alte VerlÃ€ngerung angehÃ€ngt
 							$abo_expiration = $this->getAboExpiration($product_data['id'], $product['menge'], strtotime($abo_entry['expiration']));
-							
+
 						}
-						
+
 						$this->db->UpdateQuery(WPSG_TBL_ABO, array(
 							'rebuy' => wpsg_q($abo_entry['rebuy'] + $product['menge']),
@@ -224,8 +224,8 @@
 							'inform_expiration' => '0'
 						), "`id` = '".wpsg_q($abo_entry['id'])."'");
-						
+
 						$this->shop->notifyURL($this->getNotifyURL($product_data['id']), $product['productkey'], 1, $order_id, 3, array(
 							'typ' => 'abo_rebuy',
-							'abo_baseOrderID' => $order_base_id, 
+							'abo_baseOrderID' => $order_base_id,
 							'abo_kaufdatum' => date('Y-m-d H:i:s', time()),
 							'abo_expiration' => $abo_expiration,
@@ -234,24 +234,24 @@
 						if ($inform == true)
 						{
-								
+
 							// Mail bei Erstkauf
 							$this->sendAboRebuyMail($this->getOrderIDFromKey($product['productkey']), $product['productkey']);
-						
+
 						}
-						
+
 					}
 					else
 					{
-					
+
 						if ($product_data['wpsg_mod_abo_activ'] == '1')
 						{
- 						 
+
 							// Existiert ein Eintrag in der Abotabelle schon, so wird dieser gelÃ¶scht
 							$abo_id = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `product_key` = 'abo_".wpsg_q($order_id.'_'.$product['productkey'])."'");
 							if ($abo_id > 0) { $this->db->Query("DELETE FROM `".WPSG_TBL_ABO."` WHERE `id` = '".wpsg_q($abo_id)."'"); }
-							
+
 							// Es ist ein Abo Produkt in der Bestellung
 							$abo_expiration = $this->getAboExpiration($product_data['id'], $product['menge'], time());
-													
+
 							$abo_data_db = array(
 								'cdate' => 'NOW()',
@@ -260,58 +260,58 @@
 								'rebuy' => '0',
 								'expiration' => wpsg_q($abo_expiration),
-								'inform_expiration' => '0'	
+								'inform_expiration' => '0'
 							);
-							
+
 							$this->db->ImportQuery(WPSG_TBL_ABO, $abo_data_db);
-							
+
 							$this->shop->notifyURL($this->getNotifyURL($product_data['id']), $product['productkey'], 1, $order_id, 3, array(
 								'typ' => 'abo_firstbuy',
 								'abo_kaufdatum' => date('Y-m-d H:i:s', time()),
-								'abo_expiration' => $abo_expiration,							
+								'abo_expiration' => $abo_expiration,
 							));
-							
+
 							if ($inform == true)
 							{
-							 
+
 								// Mail bei Erstkauf
 								$this->sendAboFirstBuyMail($order_id, $product['id']);
-								
+
 							}
-							
+
 						}
-						
+
 					}
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 		} // public function setOrderStatus($order_id, $status_id, $inform)
-		
-		public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order) 
-		{ 
-			
+
+		public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order)
+		{
+
 			if ($finish_order !== true) return;
-			
+
 			foreach ($arBasket['produkte'] as $product)
 			{
-				
+
 				if (substr($product['productkey'], 0, 3) == 'abo')
 				{
-					
+
 					// Ein Abo Produkt wurde gekauft
 					$arAbo = explode('_', $product['productkey']);
-					
+
 					$data['wpsg_mod_abo_origin_order'] = wpsg_q($arAbo[1]);
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 		} // public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order)
-		
+
 		public function cron()
 		{
-			
+
 			$arAboExpiration = $this->db->fetchAssoc("
 				SELECT
@@ -319,12 +319,12 @@
 				FROM
 					`".WPSG_TBL_ABO."` AS A
-				WHERE 
+				WHERE
 					A.`expiration` < NOW() AND
-					A.`inform_expiration` != '1'	
+					A.`inform_expiration` != '1'
 			");
-			
+
 			foreach ($arAboExpiration as $a)
 			{
-				
+
 				$product_id = $this->shop->getProduktID($a['product_key']);
 
@@ -335,51 +335,51 @@
 					'abo_expiration' => $a['expiration']
 				));
-				
+
 				// Mail mit Benachrichtigung senden
 				$this->sendAboExpirationMail($a['order_id'], $a['product_key']);
-				
+
 				// Damit der Cron das nicht stÃ€ndig macht
 				$this->db->UpdateQuery(WPSG_TBL_ABO, array(
 					'inform_expiration' => '1'
 				), "`id` = '".wpsg_q($a['id'])."'");
-				
-			}
-			
+
+			}
+
 		} // public function cron()
-		
+
 		public function admin_emailconf_save()
 		{
-				
+
 			wpsg_saveEMailConfig("wpsgmodabofirstbuy");
 			wpsg_saveEMailConfig("wpsgmodaboexpiration");
 			wpsg_saveEMailConfig("wpsgmodabrebuy");
-			
+
 		} // public function admin_emailconf_save()
-		
+
 		public function admin_emailconf()
 		{
-				
+
 			echo wpsg_drawEMailConfig(
 				'wpsgmodabofirstbuy',
 				__('E-Mail bei erstmaligem Abo Kauf', 'wpsg'),
-				__('Diese Mail bekommt der Kunde beim erstmaligen Kauf eines Abos.', 'wpsg')); 
-			
+				__('Diese Mail bekommt der Kunde beim erstmaligen Kauf eines Abos.', 'wpsg'));
+
 			echo wpsg_drawEMailConfig(
 				'wpsgmodaboexpiration',
 				__('E-Mail bei abgelaufenem Abo', 'wpsg'),
 				__('Diese Mail bekommt der Kunde wenn ein Abo auslÃ€uft mit der MÃ¶glichkeit es zu verlÃ€ngern.', 'wpsg'));
-			
+
 			echo wpsg_drawEMailConfig(
 				'wpsgmodabrebuy',
 				__('E-Mail bei verlÃ€ngertem Abo', 'wpsg'),
 				__('Diese Mail bekommt der Kunde wenn er erfolgreich ein Abo verlÃ€ngert hat.', 'wpsg'));
-			 
+
 		} // public function admin_emailconf()
-				
+
 		public function template_redirect()
 		{
-			
+
 			if (!isset($_REQUEST['mod']) || $_REQUEST['mod'] != 'wpsg_mod_abo') return false;
-			
+
 			if (!isset($_REQUEST['product_key']) || !isset($_REQUEST['order_id']))
 			{
@@ -387,107 +387,107 @@
 				throw new \wpsg\Exception(__('Beim VerlÃ€ngerungslink keine BestellID oder ProductKey ÃŒbergeben', 'wpsg'));
 				return false;
-				
-			}
-			
+
+			}
+
 			//$product_key = 'abo_'.$_REQUEST['order_id'].'_'.$_REQUEST['product_key'];
 			$product_key = $_REQUEST['product_key'];
-			
+
 			// Kann das Abo verlÃ€ngert werden?
 			$product_data_db = $this->shop->cache->loadProduct($this->shop->getProduktID($_REQUEST['product_key']));
-			
+
 			// Wie oft wurde das Abo zu dieser Bestellung bereits verlÃ€ngert?
 			$nAboBuyed = $this->db->fetchOne("SELECT `rebuy` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($_REQUEST['order_id'])."' AND `product_key` = '".wpsg_q($_REQUEST['product_key'])."'");
-									
+
 			// Ist so ein Abo Produkt schon im Warenkorb?
 			$nDrin = false;
 			if (wpsg_isSizedArray($_SESSION['wpsg']['basket']))
 			{
-				
+
 				foreach ($_SESSION['wpsg']['basket'] as $p_index => $p)
 				{
-					
+
 					if ($p['id'] == $product_key) $nDrin = $p_index;
-					
-				}
-				
-			}		
-			
+
+				}
+
+			}
+
 			if ($nDrin !== false)
 			{
-				
+
 				if ($product_data_db['wpsg_mod_abo_resell'] != '0' && $nAboBuyed + $_SESSION['wpsg']['basket'][$nDrin]['menge'] + 1 >= $product_data_db['wpsg_mod_abo_resell'])
 				{
 
-					// Abo kann nicht mehr verlÃ€ngert werden
-					$this->shop->addFrontendError(__('Das Abo kann nicht mehr verlÃ€ngert werden. Sie mÃŒssen das Produkt erneut erwerben.', 'wpsg'));					
-					$this->shop->redirect($this->shop->getURL(wpsg_ShopController::URL_BASKET));
-					
-				}
-							
-				$_SESSION['wpsg']['basket'][$nDrin]['menge'] ++;
-				
-			}
-			else
-			{
-				
-				if ($product_data_db['wpsg_mod_abo_resell'] != '0' && $nAboBuyed + 1 > $product_data_db['wpsg_mod_abo_resell'])
-				{
-				
 					// Abo kann nicht mehr verlÃ€ngert werden
 					$this->shop->addFrontendError(__('Das Abo kann nicht mehr verlÃ€ngert werden. Sie mÃŒssen das Produkt erneut erwerben.', 'wpsg'));
 					$this->shop->redirect($this->shop->getURL(wpsg_ShopController::URL_BASKET));
-						
-				}
-				
+
+				}
+
+				$_SESSION['wpsg']['basket'][$nDrin]['menge'] ++;
+
+			}
+			else
+			{
+
+				if ($product_data_db['wpsg_mod_abo_resell'] != '0' && $nAboBuyed + 1 > $product_data_db['wpsg_mod_abo_resell'])
+				{
+
+					// Abo kann nicht mehr verlÃ€ngert werden
+					$this->shop->addFrontendError(__('Das Abo kann nicht mehr verlÃ€ngert werden. Sie mÃŒssen das Produkt erneut erwerben.', 'wpsg'));
+					$this->shop->redirect($this->shop->getURL(wpsg_ShopController::URL_BASKET));
+
+				}
+
 				if (!wpsg_isSizedArray($_SESSION['wpsg'])) $_SESSION['wpsg'] = array();
 				if (!wpsg_isSizedArray($_SESSION['wpsg']['basket'])) $_SESSION['wpsg']['basket'] = array();
-				
+
 				$_SESSION['wpsg']['basket'][] = array(
 					'menge' => '1',
-					'id' => $product_key											
+					'id' => $product_key
 				);
-				
+
 				$product_data = $this->shop->loadProduktArray($this->shop->getProduktID($_REQUEST['product_key']));
-				
+
 				$this->shop->addFrontendMessage(wpsg_translate(__('Abo VerlÃ€ngerung fÃŒr Produkt #1# eingefÃŒgt', 'wpsg'), $product_data['name']));
-				
-			}
-			
+
+			}
+
 			$this->shop->redirect($this->shop->getURL(wpsg_ShopController::URL_BASKET));
-						
+
 		} // public function template_redirect()
-		  
+
 		public function basket_updateProduktFromSession(&$product_index, &$stock)
 		{
-			
+
 			$product_key = $_SESSION['wpsg']['basket'][$product_index]['id'];
-			
+
 			$order_id = $this->getOrderIDFromKey($product_key);
 			$product_id = $this->shop->getProduktID($product_key);
 			$product_data = $this->shop->cache->loadProduct($product_id);
-			
+
 			$nAboBuyed = $this->db->fetchOne("SELECT `rebuy` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `product_key` = '".wpsg_q($produkt_id)."'");
-				
+
 			if ($nAboBuyed + $stock_neu > $product_data['wpsg_mod_abo_resell'] && $product_data['wpsg_mod_abo_resell'] != '0')
 			{
-			
+
 				$this->shop->addFrontendError(__('Abo kann nicht mehr so oft verlÃ€ngert werden!', 'wpsg'));
 				$stock = 0;
-			
-			}
-			
+
+			}
+
 		}
-				
-		public function basket_toArray(&$produkt, $backend = false, $noMwSt = false)  
-		{
-			
+
+		public function basket_toArray(&$produkt, $backend = false, $noMwSt = false)
+		{
+
 			$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($produkt['id']));
-			
+
 			$country = $this->shop->getDefaultCountry();
 			$mwst_value = $country->getTax($product_data['mwst_key']);
-			
+
 			if (substr($produkt['id'], 0, 3) == 'abo')
 			{
-		 
+
 				// Produkt im Warenkorb ist eine VerlÃ€ngerung
 				if ($this->shop->get_option('wpsg_preisangaben') == WPSG_NETTO)
@@ -496,137 +496,121 @@
 					$produkt['preis_netto'] = $product_data['wpsg_mod_abo_price'];
 					$produkt['preis_brutto'] = wpsg_calculatePreis($product_data['wpsg_mod_abo_price'], WPSG_BRUTTO, $mwst_value);
-						
+
 				}
 				else
 				{
-						
+
 					$produkt['preis_netto'] = wpsg_calculatePreis($product_data['wpsg_mod_abo_price'], WPSG_NETTO, $mwst_value);
 					$produkt['preis_brutto'] = $product_data['wpsg_mod_abo_price'];
-						
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 		} // public function basket_toArray(&$produkt, $backend, $noMwSt)
-		
+
 		public function basket_row(&$p, $i)
 		{
-			
+
 			if (substr($p['id'], 0, 3) == 'abo')
 			{
-								
+
 				$this->shop->view['wpsg_mod_abo']['order'] = $this->shop->cache->loadOrder($this->getOrderIDFromKey($p['id']));
 				$this->shop->view['wpsg_mod_abo']['product'] = $this->shop->cache->loadProduct($this->shop->getProduktID($p['id']));
 				$this->shop->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge'] = $p['menge'] * $this->shop->view['wpsg_mod_abo']['product']['wpsg_mod_abo_durration'];
-				
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/basket_row.phtml');
-				
-			}
-			
+
+			}
+
 		} // public function basket_row(&$p, $i)
-		
-		public function overview_row(&$p, $i) 
-		{ 
-			
+
+		public function overview_row(&$p, $i)
+		{
+
 			if (substr($p['id'], 0, 3) == 'abo')
 			{
-			
+
 				$this->shop->view['wpsg_mod_abo']['order'] = $this->shop->cache->loadOrder($this->getOrderIDFromKey($p['id']));
 				$this->shop->view['wpsg_mod_abo']['product'] = $this->shop->cache->loadProduct($this->shop->getProduktID($p['id']));
 				$this->shop->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge'] = $p['menge'] * $this->shop->view['wpsg_mod_abo']['product']['wpsg_mod_abo_durration'];
-			
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/overview_row.phtml');
-			
-			}
-			
+
+			}
+
 		} // public function overview_row(&$p, $i)
-		
-		public function overview_row2(&$p, $i)
-		{
-			
+
+		public function mail_row($index, $produkt)
+		{
+
+			if (substr($produkt['id'], 0, 3) == 'abo')
+			{
+
+				$this->shop->view['wpsg_mod_abo']['order'] = $this->shop->cache->loadOrder($this->getOrderIDFromKey($produkt['id']));
+				$this->shop->view['wpsg_mod_abo']['product'] = $this->shop->cache->loadProduct($this->shop->getProduktID($produkt['id']));
+				$this->shop->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge'] = $p['menge'] * $this->shop->view['wpsg_mod_abo']['product']['wpsg_mod_abo_durration'];
+
+				if ($this->shop->htmlMail === true)
+				{
+
+					return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_row_html.phtml');
+
+				}
+				else
+				{
+
+					return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_row.phtml');
+
+				}
+
+			}
+
+		} // public function mail_row($index, $produkt)
+
+		public function order_view_row(&$p, $i)
+		{
+
 			if (substr($p['id'], 0, 3) == 'abo')
 			{
-				
+
 				$this->shop->view['wpsg_mod_abo']['order'] = $this->shop->cache->loadOrder($this->getOrderIDFromKey($p['id']));
 				$this->shop->view['wpsg_mod_abo']['product'] = $this->shop->cache->loadProduct($this->shop->getProduktID($p['id']));
 				$this->shop->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge'] = $p['menge'] * $this->shop->view['wpsg_mod_abo']['product']['wpsg_mod_abo_durration'];
-				
-				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/overview_row2.phtml');
-				
-			}
-			
-		} // public function overview_row(&$p, $i)
-		
-		public function mail_row($index, $produkt)
-		{
-		
-			if (substr($produkt['id'], 0, 3) == 'abo')
-			{
-		
-				$this->shop->view['wpsg_mod_abo']['order'] = $this->shop->cache->loadOrder($this->getOrderIDFromKey($produkt['id']));
-				$this->shop->view['wpsg_mod_abo']['product'] = $this->shop->cache->loadProduct($this->shop->getProduktID($produkt['id']));
-				$this->shop->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge'] = $p['menge'] * $this->shop->view['wpsg_mod_abo']['product']['wpsg_mod_abo_durration'];
-					
-				if ($this->shop->htmlMail === true)
-				{
-					
-					return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_row_html.phtml');
-					
-				}
-				else
-				{
-				
-					return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_row.phtml');
-					
-				}
-		
-			}
-				
-		} // public function mail_row($index, $produkt)
-		
-		public function order_view_row(&$p, $i)
-		{
-			
-			if (substr($p['id'], 0, 3) == 'abo')
-			{
-				
-				$this->shop->view['wpsg_mod_abo']['order'] = $this->shop->cache->loadOrder($this->getOrderIDFromKey($p['id']));
-				$this->shop->view['wpsg_mod_abo']['product'] = $this->shop->cache->loadProduct($this->shop->getProduktID($p['id']));
-				$this->shop->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge'] = $p['menge'] * $this->shop->view['wpsg_mod_abo']['product']['wpsg_mod_abo_durration'];
-				
+
 				return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/order_view_row.phtml');
-				
+
 			}
 			else
 			{
-				
+
 				$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($p['id']));
-				
+
 				if ($product_data['wpsg_mod_abo_activ'] == '1')
 				{
-					
+
 					$this->shop->view['wpsg_mod_abo']['rebuy'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_ORDERPRODUCT."` WHERE `productkey` LIKE 'abo_".wpsg_q($this->shop->view['data']['id'])."_%'");
 
 					foreach ($this->shop->view['wpsg_mod_abo']['rebuy'] as $k => $v)
 					{
-						
+
 						$product_data = $this->shop->cache->loadProduct($v['p_id']);
-						
+
 						$this->shop->view['wpsg_mod_abo']['rebuy'][$k]['product'] = $product_data;
 						$this->shop->view['wpsg_mod_abo']['rebuy'][$k]['order'] = $this->shop->cache->loadOrder($v['o_id']);
 						$this->shop->view['wpsg_mod_abo']['rebuy'][$k]['tage'] = $v['menge'] * $product_data['wpsg_mod_abo_durration'];
-						
+
 					}
-					
+
 					return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/order_view_base.phtml');
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 		} // public function order_view_row(&$p, $i)
-		
+
 		/** Modulfunktionen */
-		
+
 		/**
 		 * Gibt das Datum im MySQL Format zurÃŒck, wann das Abo ablÃ€uft wenn es heute gekauft wird
@@ -636,11 +620,11 @@
 		public function getAboExpiration($product_id, $menge, $start)
 		{
-			
+
 			$product_data = $this->shop->cache->loadProduct($product_id);
-			
+
 			return wpsg_date('Y-m-d H:i:s', $start + $product_data['wpsg_mod_abo_durration'] * 24 * 60 * 60 * $menge);
-			
+
 		} // public function getAboExpiration($product_id, $menge)
-		
+
 		/**
 		 * Gibt false zurÃŒck wenn die Bestellung keine Abo Bestellung ist
@@ -650,19 +634,19 @@
 		public function isAboOrder($order_id)
 		{
-			
+
 			// Bei Originalbestellungen gibt es einen eintrag in der Tabelle
 			$nAboBestellung = $this->db->fetchOne("SELECT COUNT(*) FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."'");
-			
+
 			if ($nAboBestellung > 0) return 1;
-			
+
 			// Jetzt auf Folgebestellung testen
 			$nFolgeBestellung = $this->db->fetchOne("SELECT COUNT(*) FROM `".WPSG_TBL_ORDERPRODUCT."` WHERE `o_id` = '".wpsg_q($order_id)."' AND `productkey` REGEXP '^abo_[0-9]+_[0-9]+' ");
-			
+
 			if ($nFolgeBestellung > 0) return 2;
-			
+
 			return false;
-			
+
 		} // public function isAboOrder($order_id)
-		
+
 		/**
 		 * Gibt die BestellID der Originalbestellung einer VerlÃ€ngerung zurÃŒck
@@ -670,27 +654,27 @@
 		public function getOriginOrder($order_id)
 		{
-			
+
 			if ($this->isAboOrder($order_id) !== 2) return false;
-			
+
 			$productkeys = $this->db->fetchAssocField("SELECT `productkey` FROM `".WPSG_TBL_ORDERPRODUCT."` WHERE `o_id` = '".wpsg_q($order_id)."' ");
-			
+
 			foreach ($productkeys as $pk)
 			{
-				
+
 				if (preg_match('/^abo_\d+_\d+$/', $pk))
 				{
-					
+
 					$arAbo = explode('_', $pk);
-					
+
 					return $arAbo[1];
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 			return false;
-			
+
 		} // public function getOriginOrder($order_id)
-		
+
 		/**
 		 * Gibt das Auslaufdatum einer Abobestellung zurÃŒck
@@ -699,6 +683,6 @@
 		public function getOrderAboExpiration($order_id)
 		{
-			
-			$data = null;			
+
+			$data = null;
 			$data = wpsg_fromDate($this->db->fetchOne("SELECT `expiration` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."'"), false);
 
@@ -706,5 +690,5 @@
 
 		} // public function getOrderAboExpiration($order_id)
-		
+
 		/**
 		 * Gibt die Benachrichtigungsurl fÃŒr ein Produkt zurÃŒck
@@ -713,12 +697,12 @@
 		public function getNotifyURL($product_id)
 		{
-			 
+
 			$product_data = $this->shop->cache->loadProduct($product_id);
-			
+
 			if (wpsg_isSizedString($product_data['wpsg_mod_abo_url'])) return $product_data['wpsg_mod_abo_url'];
 			else return $this->shop->get_option('wpsg_mod_abo_url');
-			
+
 		} // public function getNotifyURL($product_id)
-		
+
 		/**
 		 * Sendet die Mail beim erstmaligen Kauf eines Abo Produktes
@@ -728,37 +712,37 @@
 		public function sendAboFirstBuyMail($order_id, $product_key)
 		{
-			
+
 			if ($this->shop->get_option('wpsg_mod_abo_wpsgmodabofirstbuy') != '1') return;
-			
+
 			$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product_key));
 			$order_data = $this->shop->cache->loadOrder($order_id);
 			$customer_data = $this->shop->cache->loadKunden($order_data['k_id']);
-			
+
 			$this->shop->view['product'] = $product_data;
 			$this->shop->view['customer'] = $customer_data;
-			$this->shop->view['order'] = $order_data;	 
+			$this->shop->view['order'] = $order_data;
 			$this->shop->view['rebuyLink'] = $this->getRebuyLink($order_id, $product_key);
-			
+
 			if ($this->shop->get_option('wpsg_htmlmail') === '1')
 			{
-				
+
 				$mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_firstbuy_html.phtml', false);
-				
-			}
-			else 
+
+			}
+			else
 			{
 
 				$mail_html = false;
-				
-			}
-			
+
+			}
+
 			$mail_text = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_firstbuy.phtml', false);
-						
+
 			$this->shop->sendMail($mail_text, $customer_data['email'], 'wpsgmodabofirstbuy', array(), $order_id, $customer_data['id'], $mail_html);
-			
+
 			return true;
-			
+
 		} // public function sendAboFirstBuyMail($order_id, $product_id)
-				
+
 		/**
 		 * Sendet die Mail bei ablauf eines Abos
@@ -769,53 +753,11 @@
 		public function sendAboExpirationMail($order_id, $product_key)
 		{
-				
+
 			if ($this->shop->get_option('wpsg_mod_abo_wpsgmodaboexpiration') != '1') return;
-			
+
 			$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product_key));
 			$order_data = $this->shop->cache->loadOrder($order_id);
 			$customer_data = $this->shop->cache->loadKunden($order_data['k_id']);
-			
-			$this->shop->view['product'] = $product_data;
-			$this->shop->view['customer'] = $customer_data;
-			$this->shop->view['order'] = $order_data;				
-			$this->shop->view['rebuyLink'] = $this->getRebuyLink($order_id, $product_key);				
-			$this->shop->view['allowRebuy'] = $this->canReBuyAbo($order_id, $product_key); 
-			
-			if ($this->shop->get_option('wpsg_htmlmail') === '1')
-			{
-			
-				$mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_expiration_html.phtml');
-				
-			}
-			else
-			{
-				
-				$mail_html = false;
-				
-			}
-				
-			$mail_text = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_expiration.phtml', false);
-			 
-			$this->shop->sendMail($mail_text, $customer_data['email'], 'wpsgmodaboexpiration', array(), $order_id, $customer_data['id'], $mail_html);
-				
-			return true;
-				
-		} // public function sendAboExpirationMail($order_id, $product_id)
-		
-		/**
-		 * Sendet die Mail bei verlÃ€ngerung eines Abos
-		 * @param int $order_key BestellID
-		 * @param String $product_id ProduktKey
-		 * @return boolean
-		 */
-		public function sendAboRebuyMail($order_id, $product_key)
-		{
-			
-			if ($this->shop->get_option('wpsg_mod_abo_wpsgmodabrebuy') != '1') return;
-			
-			$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product_key));
-			$order_data = $this->shop->cache->loadOrder($order_id);
-			$customer_data = $this->shop->cache->loadKunden($order_data['k_id']);
-				
+
 			$this->shop->view['product'] = $product_data;
 			$this->shop->view['customer'] = $customer_data;
@@ -823,26 +765,68 @@
 			$this->shop->view['rebuyLink'] = $this->getRebuyLink($order_id, $product_key);
 			$this->shop->view['allowRebuy'] = $this->canReBuyAbo($order_id, $product_key);
-			
+
 			if ($this->shop->get_option('wpsg_htmlmail') === '1')
 			{
 
+				$mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_expiration_html.phtml');
+
+			}
+			else
+			{
+
+				$mail_html = false;
+
+			}
+
+			$mail_text = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_expiration.phtml', false);
+
+			$this->shop->sendMail($mail_text, $customer_data['email'], 'wpsgmodaboexpiration', array(), $order_id, $customer_data['id'], $mail_html);
+
+			return true;
+
+		} // public function sendAboExpirationMail($order_id, $product_id)
+
+		/**
+		 * Sendet die Mail bei verlÃ€ngerung eines Abos
+		 * @param int $order_key BestellID
+		 * @param String $product_id ProduktKey
+		 * @return boolean
+		 */
+		public function sendAboRebuyMail($order_id, $product_key)
+		{
+
+			if ($this->shop->get_option('wpsg_mod_abo_wpsgmodabrebuy') != '1') return;
+
+			$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product_key));
+			$order_data = $this->shop->cache->loadOrder($order_id);
+			$customer_data = $this->shop->cache->loadKunden($order_data['k_id']);
+
+			$this->shop->view['product'] = $product_data;
+			$this->shop->view['customer'] = $customer_data;
+			$this->shop->view['order'] = $order_data;
+			$this->shop->view['rebuyLink'] = $this->getRebuyLink($order_id, $product_key);
+			$this->shop->view['allowRebuy'] = $this->canReBuyAbo($order_id, $product_key);
+
+			if ($this->shop->get_option('wpsg_htmlmail') === '1')
+			{
+
 				$mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_rebuy_html.phtml', false);
-				
+
 			}
 			else
 			{
-				
+
 				$mail_html = false;
-				
-			}
-			
+
+			}
+
 			$mail_text = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_rebuy.phtml', false);
-						
+
 			$this->shop->sendMail($mail_text, $customer_data['email'], 'wpsgmodabrebuy', array(), $order_id, $customer_data['id'], $mail_html);
-			
+
 			return true;
-			
+
 		} // public function sendAboRebuyMail($order_id, $product_key)
-		
+
 		/**
 		 * Gibt false zurÃŒck wenn das Abo nicht mehr verlÃ€ngert werden kann, ansonsten true oder die Anzahl wenn Anzahl beschrÃ€nkt die noch mÃ¶glich ist
@@ -852,31 +836,31 @@
 		public function canReBuyAbo($order_id, $product_key)
 		{
-			
+
 			$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product_key));
-			
+
 			if ($product_data['wpsg_mod_abo_resell'] == '0')
 			{
-			
+
 				return true;
-			
+
 			}
 			else
 			{
-			
+
 				$rebuy = $this->db->fetchOne("SELECT `rebuy` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `product_key` = '".wpsg_q($product_key)."'");
-			
+
 				if ($rebuy < $product_data['wpsg_mod_abo_resell'])
 				{
-						
+
 					return $product_data['wpsg_mod_abo_resell'] - $rebuy;
-						
-				}
-			
-			}
-			
+
+				}
+
+			}
+
 			return false;
-			
+
 		} // public function canReBuyAbo($order_id, $product_key)
-		
+
 		/**
 		 * Gibt aus einem ProduktschlÃŒssel die BestellID zurÃŒck
@@ -885,11 +869,11 @@
 		public function getOrderIDFromKey($product_key)
 		{
-			
+
 			$arData = explode('_', $product_key);
-			
-			return $arData[1];		
-			
+
+			return $arData[1];
+
 		} // public function getOrderIDFromKey($product_key)
-						
+
 		/**
 		 * Gibt den Link zum wiederkauf eines Abos zurÃŒck
@@ -899,15 +883,15 @@
 		public function getRebuyLink($order_id, $product_key)
 		{
-			
+
 			$url = get_permalink($this->shop->get_option('wpsg_page_basket'));
-			
+
 			$url .= ((strpos($url, '?') === false)?'?mod=wpsg_mod_abo':'&mod=wpsg_mod_abo');
 			$url .= ((strpos($url, '?') === false)?'?order_id=':'&order_id=').$order_id;
 			$url .= ((strpos($url, '?') === false)?'?product_key=':'&product_key=').$product_key;
-			
+
 			return $url;
-			
+
 		} // public function getRebuyLink($order_id, $product_key)
-				
+
 	} // class wpsg_mod_abo extends wpsg_mod_basic
 
Index: /mods/wpsg_mod_deliverytime.class.php
===================================================================
--- /mods/wpsg_mod_deliverytime.class.php	(revision 6331)
+++ /mods/wpsg_mod_deliverytime.class.php	(revision 6332)
@@ -2,17 +2,17 @@
 
 	/**
-	 * Erlaubt die Definition und Anzeige von Lieferzeiten 
-	 * @author Daschmi 
+	 * Erlaubt die Definition und Anzeige von Lieferzeiten
+	 * @author Daschmi
 	 */
 	class wpsg_mod_deliverytime extends wpsg_mod_basic
 	{
-		
+
 		var $lizenz = 1;
 		var $id = 1610;
 		var $hilfeURL = 'http://wpshopgermany.de/?p=3968';
-		
+
 		const MODE_DAYS = 1;
 		const MODE_SELECT = 2;
-		
+
 		/**
 		 * Constructor
@@ -20,28 +20,28 @@
 		public function __construct()
 		{
-				
+
 			parent::__construct();
-				
+
 			$this->name = __('Lieferzeit', 'wpsg');
 			$this->group = __('Produkte', 'wpsg');
 			$this->desc = __('Erlaubt die Definition und Anzeige von Lieferzeiten.', 'wpsg');
-		
+
 		} // public function __construct()
-		
+
 		public function install()
 		{
-			
+
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
-			
+
 			/**
 			 * Produkt Tabelle erweitern
-			 */ 
+			 */
 			$sql = "CREATE TABLE ".WPSG_TBL_PRODUCTS." (
-		   		wpsg_mod_deliverytime_deliverytime VARCHAR(255) NOT NULL, 
+		   		wpsg_mod_deliverytime_deliverytime VARCHAR(255) NOT NULL,
 				wpsg_mod_deliverytime_storeproduct VARCHAR (255) NOT NULL
 		   	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-   	   	 
-   			dbDelta($sql); 			
-			
+
+   			dbDelta($sql);
+
 			// Vorgaben
 			$this->shop->checkDefault('wpsg_mod_deliverytime_mode', self::MODE_DAYS);
@@ -53,40 +53,40 @@
 			$this->shop->checkDefault('wpsg_mod_deliverytime_show_overview', '1');
 			$this->shop->checkDefault('wpsg_mod_deliverytime_show_mail', '1');
-			
+
 		} // public function install()
-		
+
 		public function product_addedit_content(&$product_content, &$product_data)
 		{
-		
+
 			if (isset($_REQUEST['wpsg_lang'])) return;
-			
+
 			if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == self::MODE_SELECT)
 			{
-				
+
 				$this->shop->view['wpsg_mod_deliverytime']['arSelection'] = $this->getPossibleSelection();
-				
-			}
-			
+
+			}
+
 			if (isset($this->shop->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime']))
 				$this->shop->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime'] = $product_data['wpsg_mod_deliverytime_deliverytime'];
 			if (isset($this->shop->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct']))
 				$this->shop->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'] = $product_data['wpsg_mod_deliverytime_storeproduct'];
-				
+
 			$product_content['general']['content'] .= $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/produkt_addedit_allgemein.phtml', false);
 		}
-		
-		
+
+
 		public function settings_edit()
 		{
-			
+
 			$this->shop->view['wpsg_mod_deliverytime']['arSelection'] = $this->getPossibleSelection();
-			
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/settings_edit.phtml');
-			
+
 		} // public function settings_edit()
-		
+
 		public function settings_save()
 		{
-			
+
 			$this->shop->update_option('wpsg_mod_deliverytime_mode', $_REQUEST['wpsg_mod_deliverytime_mode']);
 			$this->shop->update_option('wpsg_mod_deliverytime_mode_select_values', $_REQUEST['wpsg_mod_deliverytime_mode_select_values']);
@@ -97,5 +97,5 @@
 			$this->shop->update_option('wpsg_mod_deliverytime_storetext', $_REQUEST['wpsg_mod_deliverytime_storetext']);
 			$this->shop->update_option('wpsg_page_mod_deliverytime_storelink', $_REQUEST['wpsg_page_mod_deliverytime_storelink']);
-			
+
 			$this->shop->update_option('wpsg_mod_deliverytime_show_product', $_REQUEST['wpsg_mod_deliverytime_show_product']);
 			$this->shop->update_option('wpsg_mod_deliverytime_show_basket', $_REQUEST['wpsg_mod_deliverytime_show_basket']);
@@ -105,102 +105,89 @@
 			$this->shop->update_option('wpsg_mod_deliverytime_delayText', $_REQUEST['wpsg_mod_deliverytime_delayText']);
 			$this->shop->update_option('wpsg_mod_deliverytime_delayTime', $_REQUEST['wpsg_mod_deliverytime_delayTime']);
-			
+
 			$this->shop->addTranslationString('wpsg_mod_deliverytime_mode_select_values', $_REQUEST['wpsg_mod_deliverytime_mode_select_values']);
 			$this->shop->addTranslationString('wpsg_mod_deliverytime_mode_select_default', $_REQUEST['wpsg_mod_deliverytime_mode_select_default']);
-			
+
 		} // public function settings_save()
-		 
+
 		public function produkt_save_before(&$produkt_data)
 		{
-				
+
 			$produkt_data['wpsg_mod_deliverytime_deliverytime'] = wpsg_q($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime']);
-			$produkt_data['wpsg_mod_deliverytime_storeproduct'] = wpsg_q(wpsg_getStr($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'])); 
-				
+			$produkt_data['wpsg_mod_deliverytime_storeproduct'] = wpsg_q(wpsg_getStr($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct']));
+
 		} // public function produkt_save_before(&$produkt_data)
-		
-		public function mail_row($index, $produkt) 
-		{ 
-			
+
+		public function mail_row($index, $produkt)
+		{
+
 			if ($this->shop->get_option('wpsg_mod_deliverytime_show_mail') != '1') return;
-			
+
 			$this->shop->view['wpsg_mod_deliverytime']['i'] = $index;
 			$this->shop->view['wpsg_mod_deliverytime']['p'] = $produkt;
 			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = $this->getProductDeliveryTime($this->shop->getProduktID($produkt['id']));
-			
+
 			if ($this->shop->htmlMail === true)
 			{
-					
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/mail_row_html.phtml');
-					
+
 			}
 			else
 			{
-			
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/mail_row.phtml');
-					
-			}
-			
+
+			}
+
 		} // public function mail_row($index, $produkt)
-		
-		public function basket_row(&$p, $i) 
-		{ 
-			
+
+		public function basket_row(&$p, $i)
+		{
+
 			if ($this->shop->get_option('wpsg_mod_deliverytime_show_basket') != '1') return;
-			
+
 			$this->shop->view['wpsg_mod_deliverytime']['i'] = $i;
 			$this->shop->view['wpsg_mod_deliverytime']['p'] = $p;
 			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = $this->getProductDeliveryTime($this->shop->getProduktID($p['id']));
-			
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/basket_row.phtml');
-			
+
 		} // public function basket_row(&$p, $i)
-		
-		public function overview_row(&$p, $i) 
-		{ 
+
+		public function overview_row(&$p, $i)
+		{
 
 			if ($this->shop->get_option('wpsg_mod_deliverytime_show_overview') != '1') return;
-			
+
 			$this->shop->view['wpsg_mod_deliverytime']['i'] = $i;
 			$this->shop->view['wpsg_mod_deliverytime']['p'] = $p;
 			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = $this->getProductDeliveryTime($this->shop->getProduktID($p['id']));
-			
+
 			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/overview_row.phtml');
-			
+
 		} // public function overview_row(&$p, $i)
-		
-		public function overview_row2(&$p, $i)
-		{
-			
-			if ($this->shop->get_option('wpsg_mod_deliverytime_show_overview') != '1') return;
-			
-			$this->shop->view['wpsg_mod_deliverytime']['i'] = $i;
-			$this->shop->view['wpsg_mod_deliverytime']['p'] = $p;
-			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = $this->getProductDeliveryTime($this->shop->getProduktID($p['id']));
-			
-			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/overview_row2.phtml');
-			
-		} // public function overview_row(&$p, $i)
-		
-		public function wpsg_mod_export_loadFields(&$arFields) 
-		{ 
-			
+
+		public function wpsg_mod_export_loadFields(&$arFields)
+		{
+
 			$arFields[20]['fields']['product_deliverytime'] = __('Lieferzeit', 'wpsg');
-			
+
 		} // public function wpsg_mod_export_loadFields(&$arFields)
-		
-		public function wpsg_mod_export_getValue(&$return, $field_value, $o_id, $p_id, $productkey, $product_index, $profil_separator) 
-		{ 
-			
+
+		public function wpsg_mod_export_getValue(&$return, $field_value, $o_id, $p_id, $productkey, $product_index, $profil_separator)
+		{
+
 			if ($field_value == 'product_deliverytime')
 			{
-				
+
 				$return = $this->getProductDeliveryTime($p_id);
-				
-			}
-			
+
+			}
+
 		} // public function wpsg_mod_export_getValue(&$return, $field_value, $o_id, $p_id, $productkey, $product_index, $profil_separator)
-		
+
 		/* Modul Functions */
-		
+
 		/**
 		 * Zeigt einen Text an, der bei LieferverzÃ¶gerungen angezeigt wird
@@ -209,92 +196,92 @@
 		public function displayDelayTime($product_key)
 		{
-			
+
 			if ($this->shop->get_option('wpsg_mod_deliverytime_delay') != '1') return false;
-			
+
 			return wpsg_translate(__('Aufgrund von #1# kann es zu VerzÃ¶gerungen von #2# Tage(n) in der Zustellung kommen.', 'wpsg'), $this->shop->get_option('wpsg_mod_deliverytime_delayText'), $this->shop->get_option('wpsg_mod_deliverytime_delayTime'));
-			
+
 		} // public function displayDelayTime($product_key)
-		
+
 		public function canOrder($product_key)
 		{
-			
+
 			if ($this->isStoreProduct($product_key)) return -2;
-			
+
 		}
-		
+
 		/**
 		 * Zeigt die Lieferzeit formatiert an.
 		 * Bsp: Lieferzeit: 4 Tag(e)
 		 */
-		public function displayDeliveryTime($product_key, $valueOnly = false) 
-		{
-			
+		public function displayDeliveryTime($product_key, $valueOnly = false)
+		{
+
 			$oProduct = wpsg_product::getInstance($this->shop->getProduktID($product_key));
-			
+
 			$strValue = "";
-			
-			if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS) 
-			{
-				
+
+			if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS)
+			{
+
 				$temp = $oProduct->wpsg_mod_deliverytime_deliverytime;
-				if (wpsg_isSizedInt($temp)) 
-				{ 
-					
+				if (wpsg_isSizedInt($temp))
+				{
+
 					/* Lieferzeit > 0 im Produkte */
 					$strValue = wpsg_translate(__('#1# Tag(e)', 'wpsg'), $oProduct->wpsg_mod_deliverytime_deliverytime);
-					
-				}
-				else if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_deliverytime_mode_days_default')) && $oProduct->wpsg_mod_deliverytime_deliverytime != '0') 
-				{
-					
+
+				}
+				else if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_deliverytime_mode_days_default')) && $oProduct->wpsg_mod_deliverytime_deliverytime != '0')
+				{
+
 					/* Lieferzeit > 0 Global */
 					$strValue = wpsg_translate(__('#1# Tag(e)', 'wpsg'), $this->shop->get_option('wpsg_mod_deliverytime_mode_days_default'));
-					
+
 				}
 				else
 				{
-				
+
 					$strValue = __('Das Produkt ist sofort lieferbar (Lieferzeit: 0 Tage)', 'wpsg');
-				
-				}
-				
-			}
-			else 
-			{
-				
+
+				}
+
+			}
+			else
+			{
+
 				$arPossibleDelivery = wpsg_trim(explode(',', $this->shop->get_option('wpsg_mod_deliverytime_mode_select_values')));
 				$strDeliveryTime = @$oProduct->wpsg_mod_deliverytime_deliverytime;
-				
-				if (wpsg_isSizedString($strDeliveryTime) && in_array($strDeliveryTime, $arPossibleDelivery)) 
-				{
-										
+
+				if (wpsg_isSizedString($strDeliveryTime) && in_array($strDeliveryTime, $arPossibleDelivery))
+				{
+
 					$strValue = __($strDeliveryTime, 'wpsg');
-					
+
 				}
 				else
 				{
-					
+
 					if (array_key_exists($this->shop->get_option('wpsg_mod_deliverytime_mode_select_default'), $arPossibleDelivery))
 					{
-					
+
 						$strValue = __(@$arPossibleDelivery[$this->shop->get_option('wpsg_mod_deliverytime_mode_select_default')], 'wpsg');
-						
+
 					}
 					else
 					{
-						
+
 						$strValue = __('UngÃŒltige Lieferzeitkonfiguration', 'wpsg');
-						
+
 					}
-					 
-				}
-							
-			}
-			
+
+				}
+
+			}
+
 			if ($valueOnly === true) return $strValue;
 			else return wpsg_translate(__('#1#', 'wpsg'), $strValue);
-					
+
 		} // public function displayDeliveryTime($product_key)
- 		
+
 		/**
 		 * Gibt true zurÃŒck, wenn das Produkt ein Offline Produkt ist, und die Option "Offline Produkte verwenden" aktiviert ist
@@ -303,15 +290,15 @@
 		public function isStoreProduct($product_key)
 		{
-			
+
 			// Wenn die Option fÃŒr "Offline Produkte" nicht aktiviert ist, so kann es auch kein Offline Produkt sein
 			if ($this->shop->get_option('wpsg_mod_deliverytime_store') != '1') return false;
-			
+
 			$oProduct = wpsg_product::getInstance($this->shop->getProduktID($product_key));
-						
+
 			if ($oProduct->wpsg_mod_deliverytime_storeproduct > 0) return true;
 			else return false;
-			
+
 		} // public function isStoreProduct($product_key)
-		
+
 		/**
 		 * Gibt die Lieferzeit eines Produktes anhand seiner ID zurÃŒck
@@ -320,57 +307,57 @@
 		public function getProductDeliveryTime($product_id)
 		{
-			
+
 			$product_data = $this->shop->cache->loadProduct($product_id);
-			
+
 			if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == self::MODE_DAYS)
 			{
-			
+
 				if (!wpsg_isSizedString($product_data['wpsg_mod_deliverytime_deliverytime']))
 				{
-				
-					return $this->shop->get_option('wpsg_mod_deliverytime_mode_days_default').__(' Tag(e)', 'wpsg');	
-				
+
+					return $this->shop->get_option('wpsg_mod_deliverytime_mode_days_default').__(' Tag(e)', 'wpsg');
+
 				}
 				else
 				{
-					
+
 					return $product_data['wpsg_mod_deliverytime_deliverytime'].__(' Tag(e)', 'wpsg');
-					
-				}
-				
+
+				}
+
 			}
 			else if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == self::MODE_SELECT)
 			{
-			
+
 				$arPossibleDeliveryTimes = $this->getPossibleSelection();
-				
+
 				if (!in_array($product_data['wpsg_mod_deliverytime_deliverytime'], $arPossibleDeliveryTimes))
 				{
-					
+
 					return __($this->shop->get_option('wpsg_mod_deliverytime_mode_select_default'), 'wpsg');
-										
+
 				}
 				else
 				{
-					
+
 					return __($product_data['wpsg_mod_deliverytime_deliverytime'], 'wpsg');
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 		} // public function getProductDeliveryTime($product_id)
-		
-		/**
-		 * Gibt die mÃ¶glichen Lieferzeiten als Array zurÃŒck, ist nur Sinnvoll wenn 
+
+		/**
+		 * Gibt die mÃ¶glichen Lieferzeiten als Array zurÃŒck, ist nur Sinnvoll wenn
 		 * MODE_SELECT aktiv ist.
 		 */
 		public function getPossibleSelection()
 		{
-			
+
 			return wpsg_trim(explode(',', $this->shop->get_option('wpsg_mod_deliverytime_mode_select_values')));
-			
+
 		} // public function getPossibleSelection()
-						
+
 	} // class wpsg_mod_deliverytime extends wpsg_mod_basic
 
Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 6331)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 6332)
@@ -7,14 +7,14 @@
 	class wpsg_mod_productvariants extends wpsg_mod_basic
 	{
-		
+
 		var $lizenz = 1;
 		var $id = 99;
-		
+
 		const TYPE_SELECT = 0;
 		const TYPE_RADIO = 1;
 		const TYPE_IMAGE = 2;
-		 		
+
 		static $arTypeLabel;
-		
+
 		/**
 		 * Constructor
@@ -22,7 +22,7 @@
 		public function __construct()
 		{
-				
+
 			parent::__construct();
-				
+
 			self::$arTypeLabel = array(
 				self::TYPE_SELECT => __('Select Box', 'wpsg'),
@@ -30,24 +30,24 @@
 				self::TYPE_IMAGE => __('Bilderauswahl', 'wpsg')
 			);
-			
+
 			$this->name = __('Produktvarianten', 'wpsg');
 			$this->group = __('Produkte', 'wpsg');
 			$this->desc = __('ErmÃ¶glicht es zentral Varianten anzulegen und diese im Produkt zu aktivieren.', 'wpsg');
-						
+
 			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()
-				
+
 		public function install()
 		{
-				
+
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
-		 
+
 			$sql = "CREATE TABLE ".WPSG_TBL_VARIANTS." (
 				id int(11) NOT NULL AUTO_INCREMENT,
-				name varchar(255) NOT NULL,					
+				name varchar(255) NOT NULL,
 				product_id int(11) NOT NULL,
 				deleted int(1) NOT NULL,
@@ -57,7 +57,7 @@
 				KEY product_id (product_id)
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-				
+
 			dbDelta($sql);
-			
+
 			$sql = "CREATE TABLE ".WPSG_TBL_VARIANTS_VARI." (
 				id int(11) NOT NULL AUTO_INCREMENT,
@@ -73,7 +73,7 @@
 				PRIMARY KEY  (id)
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-			
+
 			dbDelta($sql);
-			
+
 			$sql = "CREATE TABLE ".WPSG_TBL_PRODUCTS_VARIANT." (
 				id int(11) NOT NULL AUTO_INCREMENT,
@@ -85,7 +85,7 @@
 				KEY variant_id (variant_id)
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-				
+
 			dbDelta($sql);
-			
+
 			$sql = "CREATE TABLE ".WPSG_TBL_PRODUCTS_VARIATION." (
 				id int(11) NOT NULL AUTO_INCREMENT,
@@ -96,5 +96,5 @@
 				price double(10,2) NOT NULL,
 				stock int(11) NOT NULL,
-				images text NOT NULL, 
+				images text NOT NULL,
 				weight double(10,2) NOT NULL,
 				fmenge double(10,2) NOT NULL,
@@ -103,33 +103,33 @@
 				KEY variation_id (variation_id)
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-			
+
 			dbDelta($sql);
-			
+
 		} // public function install()
-		
-		public function settings_edit() 
-		{
-			
+
+		public function settings_edit()
+		{
+
 			$this->shop->view['wpsg_mod_productvariants']['html'] = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/admin_html.phtml', false);
-			
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/settings_edit.phtml');
-			
+
 		} // 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() 
-		{ 
-			
+
+		public function be_ajax()
+		{
+
 			$action = $_REQUEST['subaction'].'Action';
-			
+
 			$this->$action();
-			
+
 		} // public function be_ajax()
 
@@ -149,76 +149,76 @@
 		public function product_addedit_content(&$product_content, &$product_data)
 		{
-			
+
 			// Wenn eine Ãbersetzung bearbeitet wird, dann nichts machen
 			if (isset($_REQUEST['wpsg_lang'])) return;
-		
+
 			if (wpsg_isSizedInt($product_data['id']))
 			{
-					
+
 				$this->shop->view['wpsg_mod_productvariants']['html'] = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/admin_html.phtml', false);
-					
-			}
-			
+
+			}
+
 			$product_content['wpsg_mod_productvariants'] = array(
 				'title' => __('Produktvarianten', 'wpsg'),
 				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/produkt_addedit_content.phtml', false)
 			);
-				
+
 		} // public function product_addedit_content(&$product_content, &$produkt_data)
 
 		public function template_redirect()
 		{
-			
+
 			if (wpsg_isSizedString($_REQUEST['action'], 'wpsg_productvariants_switch'))
 			{
-				
+
 				if (wpsg_isSizedInt($_REQUEST['wpsg_post_id']))
 				{
-					
+
 					global $post;
 					$post = get_post($_REQUEST['wpsg_post_id']);
-										
-				}
-				
+
+				}
+
 				// Produkt Key nach der Auswahl bilden
 				parse_str($_REQUEST['form_data'], $form_data);
-			 
-				$product_id = $this->shop->getProduktId($form_data['wpsg']['produkt_id']);				                
+
+				$product_id = $this->shop->getProduktId($form_data['wpsg']['produkt_id']);
                 $product_key = '';
-                
+
                 $this->getProductKeyFromRequest($product_key, $product_id, $form_data);
                 //$product_key = $_REQUEST['product_key'];
-                
+
 				$product_data = $this->shop->loadProduktArray($product_id, array(
-					'id' => $product_key, 
-					'product_key' => $product_key, 
+					'id' => $product_key,
+					'product_key' => $product_key,
 					'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;
-				
+
 				$this->shop->noReleatedProducts = true;
-								
+
 				if (wpsg_isSizedString($form_data['wpsg']['template'])) $template = $form_data['wpsg']['template'];
 				else $template = false;
-				
+
 				if (wpsg_isSizedInt($form_data['titleDisplayed'])) $this->shop->titleDisplayed = 1;
-				 
+
 				die($this->shop->renderProdukt($product_data, $template));
-				
-			}
-			
+
+			}
+
 		} // public function template_redirect()
-				
+
 		public function loadProduktArray(&$product_data)
 		{
 
 			//if ($GLOBALS['step'] > 4) return;
-			
+
 			$product_data['arVariant'] = $this->getVariants($product_data['product_id'], true, true, true);
 			$this->unserializeVariant($product_data['arVariant']);
-			
+
 			if (wpsg_isSizedArray($product_data['arVariant']))
 			{
@@ -227,7 +227,7 @@
                 if (preg_match('/^pv_/', $product_data['id']))
                 {
-                    
+
                     $product_data['product_key'] = $product_data['id'];
-                    
+
                 }
 				else if (!isset($product_data['product_key']) || is_numeric($product_data['product_key']))
@@ -248,18 +248,18 @@
 					$product_data['product_key'] = $strDefaultKey;
 					$product_data['id'] = $strDefaultKey;
-										
-				}
-				
+
+				}
+
 				$arProductKey = $this->explodeProductKey($product_data['product_key']);
-								
+
 				$arProductImagesPossible = array();
-				
+
 				// Gesetzte Variante wÃ€hlen und aufwerten
 				foreach ($product_data['arVariant'] as $var_id => $var_data)
 				{
-				
+
 					foreach ($var_data['arVariation'] as $vari_id => $vari_data)
 					{
-						
+
 						if ($arProductKey['arVari'][$var_id] == $vari_id)
 						{
@@ -279,47 +279,47 @@
 								//$test = array_intersect($test, $vari_data['images']['pic']);
 							}
-							
+
 							if (isset($vari_data['pics'])) {
 								if (wpsg_isSizedArray($arProductImagesPossible)) $arProductImagesPossible = array_intersect($arProductImagesPossible, $vari_data['pics']);
 								else if (wpsg_isSizedArray($vari_data['pics'])) $arProductImagesPossible = $vari_data['pics'];
-			
+
 							}
 							$product_data['arVariant'][$var_id]['arVariation'][$vari_id]['set'] = true;
-							
+
 						}
 						else $product_data['arVariant'][$var_id]['arVariation'][$vari_id]['set'] = false;
-						
+
 					}
-					
-				} 
-				
+
+				}
+
 				if (wpsg_isSizedArray($arProductImagesPossible)) $product_data['image_show'] = array_shift($arProductImagesPossible);
-				
-				// Preise fÃŒr die Varianten berechnen 
+
+				// Preise fÃŒr die Varianten berechnen
 				if (!(isset($product_data['varPriceAdded']) && ($product_data['varPriceAdded'] = 1)))
 				{
-				
+
 					$product_data['preis_netto_preVariants'] = $product_data['preis_netto'];
 					$product_data['preis_brutto_preVariants'] = $product_data['preis_brutto'];
-								
+
 					if ($this->shop->getBackendTaxView() === WPSG_BRUTTO)
 					{
-					
+
 						$product_data['preis_brutto'] = $this->calculateVariantsPrice($product_data['preis_brutto'], $product_data['arVariant'], $product_data['product_key']);
 						$product_data['preis_netto'] = wpsg_calculatePreis($product_data['preis_brutto'], WPSG_NETTO, $product_data['mwst_value']);
-						
+
 					}
 					else
 					{
-						
+
 						$product_data['preis_netto'] = $this->calculateVariantsPrice($product_data['preis_netto'], $product_data['arVariant'], $product_data['product_key']);
 						$product_data['preis_brutto'] = wpsg_calculatePreis($product_data['preis_netto'], WPSG_BRUTTO, $product_data['mwst_value']);
-						
+
 					}
-				 
+
 					$product_data['preis_preVariants'] = $product_data['preis'];
-					
-				}
-				
+
+				}
+
 				// Preise fÃŒr das Frontend ermitteln
 				if ($this->shop->getFrontendTaxView() === WPSG_BRUTTO)
@@ -335,38 +335,38 @@
 
 				}
-				 
+
 			}
 			if ($product_data['preis_brutto'] == 161.00) {
-				
+
 				$product_data['preis'] = $product_data['preis_brutto'];
 			}
-			
+
 		} // public function loadProduktArray(&$produkt_data)
- 
-        public function getProductKeyFromRequest(&$product_key, $product_id, $form_data) 
+
+        public function getProductKeyFromRequest(&$product_key, $product_id, $form_data)
         {
-        	
+
             //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']);            
+            //$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_vp'][$var_id] = $var_id.':'.$vari_id;
         	$product_key = 'pv_'.$product_id.'|'.implode('|', $form_data['wpsg_vp']);
-         	     
+
         } // public function getProductKeyFromRequest($product_id, $form_data)
-        
+
         public function produkt_ajax()
         {
-        		
+
         	//error_reporting(E_ALL);
-        		
+
         	if (isset($_REQUEST['cmd']) && $_REQUEST['cmd'] == 'wpsg_vp_add')
         	{
         		die('wpsg_vp_add');
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
-        
+
         		$data = array(
         				"name" => $_REQUEST['name'],
@@ -374,5 +374,5 @@
         				"aktiv" => "1"
         		);
-        
+
         		if ($_REQUEST['typ'] == "checkbox")
         		{
@@ -383,13 +383,13 @@
         			$data['vari'] = array();
         		}
-        
+
         		$vp_data[] = $data;
-        
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
-        
+
         		$this->shop->view['message'] = array(0, __("Variante erfolgreich angelegt.", "wpsg"));
-        
+
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == 'wpsg_var_reorder')
@@ -397,27 +397,27 @@
         		die('wpsg_var_reorder');
         		parse_str($_REQUEST['wpsg_reorder'], $wpsg_reorder);
-        
+
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
         		$vp_data_neu = array();
-        		 
+
         		foreach ($wpsg_reorder['variante'] as $order)
         		{
-        				
+
         			if (array_key_exists($order, $vp_data))
         			{
-        
+
         				$vp_data_neu[] = $vp_data[$order];
         				unset($vp_data[$order]);
-        
-        			} 
-        				
-        		}
-                 
+
+        			}
+
+        		}
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data_neu);
-        
+
         		$this->shop->view['message'] = array(0, __('Variantenreihenfolge gespeichert.', 'wpsg'));
-        
+
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == 'wpsg_vari_reorder')
@@ -425,34 +425,34 @@
         		die('wpsg_vari_reorder');
         		parse_str($_REQUEST['wpsg_reorder'], $wpsg_reorder);
-        
+
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
-        			
+
         		foreach ($wpsg_reorder as $var_key => $order)
         		{
-        				
+
         			$var_id = preg_replace('/^variorder\_/', '', $var_key);
-        
+
         			wpsg_array_reorder($vp_data[$var_id]['vari'], $order);
-        				
+
         			if (wpsg_isSizedArray($vp_data[$var_id]['lang']))
         			{
-        
+
         				foreach ($vp_data[$var_id]['lang'] as $lang_key => $lang_vari)
         				{
-        						
+
         					wpsg_array_reorder($vp_data[$var_id]['lang'][$lang_key]['vari'], $order);
-        						
+
         				}
-        
+
         			}
-        				
-        		}
-        
+
+        		}
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
-        
+
         		$this->shop->view['message'] = array(0, __("Variationenreihenfolge gespeichert.", "wpsg"));
-        
+
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == 'wpsg_vp_refreh')
@@ -460,5 +460,5 @@
         		die('wpsg_vp_refreh');
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == "wpsg_vp_del")
@@ -466,12 +466,12 @@
         		die('wpsg_vp_del');
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
-        
+
         		unset($vp_data[$_REQUEST['var_id']]);
-        
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
-        
+
         		$this->shop->view['message'] = array(0, __("Variante wurde erfolgreich gelÃ¶scht.", "wpsg"));
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == "wpsg_vp_deaktiv")
@@ -479,23 +479,23 @@
         		die('wpsg_vp_deaktiv');
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
-        
+
         		if ($_REQUEST['status'] == "1")
         		{
-        				
+
         			$vp_data[$_REQUEST['var_id']]['aktiv'] = 1;
         			$this->shop->view['message'] = array(0, __("Variante wurde erfolgreich aktiviert.", "wpsg"));
-        
+
         		}
         		else
         		{
-        				
+
         			$vp_data[$_REQUEST['var_id']]['aktiv'] = 0;
         			$this->shop->view['message'] = array(0, __("Variante wurde erfolgreich deaktiviert.", "wpsg"));
-        				
-        		}
-        
+
+        		}
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == "wpsg_vp_addVariation")
@@ -503,5 +503,5 @@
         		die('wpsg_vp_addVariation');
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
-        
+
         		$vp_data[$_REQUEST['var_id']]['vari'][] = array(
         				"name" => $_REQUEST['vari_name'],
@@ -509,10 +509,10 @@
         				"aktiv" => "1"
         		);
-        
+
         		$this->shop->view['message'] = array(0, __("Variation wurde erfolgreich angelegt.", "wpsg"));
-        
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == "wpsg_vp_vari_del")
@@ -520,24 +520,24 @@
         		die('wpsg_vp_vari_del');
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
-        
+
         		unset($vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]);
-        
+
         		if (wpsg_isSizedArray($vp_data[$_REQUEST['var_id']]['lang']))
         		{
-        
+
         			foreach ($vp_data[$_REQUEST['var_id']]['lang'] as $lang_key => $lang_vari)
         			{
-        
+
         				unset($vp_data[$_REQUEST['var_id']]['lang'][$lang_key]['vari'][$_REQUEST['vari_id']]);
-        
+
         			}
-        				
-        		}
-        
+
+        		}
+
         		$this->shop->view['message'] = array(0, __("Variation wurde erfolgreich gelÃ¶scht.", "wpsg"));
-        
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == "wpsg_vp_vari_deaktiv")
@@ -545,48 +545,48 @@
         		die('wpsg_vp_vari_deaktiv');
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
-        
+
         		if ($_REQUEST['status'] == "1")
         		{
-        				
+
         			$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['aktiv'] = 1;
         			$this->shop->view['message'] = array(0, __("Variation wurde erfolgreich aktiviert.", "wpsg"));
-        
+
         		}
         		else
         		{
-        				
+
         			$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['aktiv'] = 0;
         			$this->shop->view['message'] = array(0, __("Variation wurde erfolgreich deaktiviert.", "wpsg"));
-        				
-        		}
-        
+
+        		}
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
         		die($this->drawVarianten($_REQUEST['edit_id']));
-        
+
         	}
         	else if ($_REQUEST['cmd'] == 'wpsg_var_setImageOrder')
         	{
-        
+
         		//$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
         		$vp_data = $this->getVariants($_REQUEST['edit_id'], true, true, true);
         		$this->unserializeVariant($vp_data);
-        		
+
         		if ($_REQUEST['vari_id'] == -1)
         		{
-        				
+
         			$vp_data[$_REQUEST['var_id']]['picOrder'] = $_REQUEST['wpsg_reorder'];
-        				
+
         		}
         		else
         		{
-        
+
         			$vp_data[$_REQUEST['var_id']]['arVariation'][$_REQUEST['iid']]['picOrder'] = $_REQUEST['wpsg_reorder'];
-        				
-        		}
-        			
+
+        		}
+
         		$this->saveVariation($_REQUEST['edit_id'], $vp_data);
-        
+
         		die("1");
-        
+
         	}
         	else if ($_REQUEST['cmd'] == 'wpsg_vp_vari_setPic')
@@ -596,16 +596,16 @@
         		$vp_data = $this->getVariants($_REQUEST['edit_id'], true, true, true);
         		$this->unserializeVariant($vp_data);
-        		
+
         		if ($_REQUEST['vari_id'] >= 0)
         		{
-        				
+
         			$arPic = explode(",", $vp_data[$_REQUEST['var_id']]['arVariation'][$_REQUEST['iid']]['pic']);
         			$arPostid = explode(",", $vp_data[$_REQUEST['var_id']]['arVariation'][$_REQUEST['iid']]['postid']);
-        			
+
         			$pic = $_REQUEST['pic'];
         			$postid = $_REQUEST['post_id'];
-        			
+
         			$pic = preg_replace('/\-(\d+)x(\d+)\./', '.', $pic);
-        			
+
         			if (in_array($pic, $arPic))
         			{
@@ -618,14 +618,14 @@
         				$arPostid[] = $postid;
         			}
-        				
+
         			$vp_data[$_REQUEST['var_id']]['arVariation'][$_REQUEST['iid']]['pic'] = implode(",", $arPic);
         			$vp_data[$_REQUEST['var_id']]['arVariation'][$_REQUEST['iid']]['postid'] = implode(",", $arPostid);
-        			
+
         		}
         		else
         		{
-        				
+
         			$arPic = explode(",", $vp_data[$_REQUEST['var_id']]['pic']);
-        				
+
         			if (in_array($_REQUEST['pic'], $arPic))
         			{
@@ -636,24 +636,24 @@
         				$arPic[] = $_REQUEST['pic'];
         			}
-        				
+
         			$vp_data[$_REQUEST['var_id']]['pic'] = implode(",", $arPic);
-        
-        		}
-        
+
+        		}
+
         		$this->saveVariation($_REQUEST['edit_id'], $vp_data);
-        
+
         		die("1");
-        
+
         	}
         	else if ($_REQUEST['cmd'] == 'wpsg_vp_vari_inlineEdit')
         	{
         		die('wpsg_vp_vari_inlineEdit');
-        
+
         		$vp_data = $this->loadVarianten($_REQUEST['edit_id']);
         		$product_data = $this->shop->cache->loadProduct($_REQUEST['edit_id']);
-        			
+
         		if ($_REQUEST['typ'] == "vari_name")
         		{
-        				
+
         			if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
         			{
@@ -664,9 +664,9 @@
         				$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['name'] = wpsg_q($_REQUEST['value']);
         			}
-        				
+
         		}
         		else if ($_REQUEST['typ'] == "vari_artnr")
         		{
-        				
+
         			if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
         			{
@@ -677,40 +677,40 @@
         				$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['artnr'] = wpsg_q($_REQUEST['value']);
         			}
-        				
+
         		}
         		else if ($_REQUEST['typ'] == "vari_preis")
         		{
-        				
+
         			$_REQUEST['value'] = wpsg_tf($_REQUEST['value']);
         			$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['preis'] = $_REQUEST['value'];
         			$_REQUEST['value'] = wpsg_ff($_REQUEST['value'], $this->shop->get_option('wpsg_currency'));
-        				
+
         		}
         		else if ($_REQUEST['typ'] == "vari_fmenge")
         		{
-        
+
         			$arFeinheiten = explode(',', $this->shop->get_option('wpsg_mod_fuellmenge_einheit'));
-        				
+
         			$_REQUEST['value'] = wpsg_ff(wpsg_tf($_REQUEST['value']), $arFeinheiten[$product_data['feinheit']]);
         			$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['fmenge'] = wpsg_tf($_REQUEST['value']);
-        
+
         		}
         		else if ($_REQUEST['typ'] == "vari_weight")
         		{
-        				
+
         			$_REQUEST['value'] = wpsg_tf($_REQUEST['value']);
         			$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['weight'] = $_REQUEST['value'];
-        
+
         		}
         		else if ($_REQUEST['typ'] == "vari_stock")
         		{
-        				
+
         			$_REQUEST['value'] = intval($_REQUEST['value']);
         			$vp_data[$_REQUEST['var_id']]['vari'][$_REQUEST['vari_id']]['stock'] = $_REQUEST['value'];
-        
+
         		}
         		else if ($_REQUEST['typ'] == "var_name")
         		{
-        				
+
         			if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
         			{
@@ -721,33 +721,33 @@
         				$vp_data[$_REQUEST['var_id']]['name'] = $_REQUEST['value'];
         			}
-        
+
         		}
         		else if ($_REQUEST['typ'] == "var_preis")
         		{
-        				
+
         			$_REQUEST['value'] = wpsg_tf($_REQUEST['value']);
         			$vp_data[$_REQUEST['var_id']]['preis'] = $_REQUEST['value'];
         			$_REQUEST['value'] = wpsg_ff($_REQUEST['value'], $this->shop->get_option('wpsg_currency'));
-        				
+
         		}
         		else if ($_REQUEST['typ'] == "var_weight")
         		{
-        
+
         			$_REQUEST['value'] = wpsg_tf($_REQUEST['value']);
         			$vp_data[$_REQUEST['var_id']]['weight'] = $_REQUEST['value'];
-        				
+
         		}
         		else if ($_REQUEST['typ'] == "var_fmenge")
         		{
-        				
+
         			$arFeinheiten = explode(',', $this->shop->get_option('wpsg_mod_fuellmenge_einheit'));
-        
+
         			$_REQUEST['value'] = wpsg_ff(wpsg_tf($_REQUEST['value']), $arFeinheiten[$product_data['feinheit']]);
         			$vp_data[$_REQUEST['var_id']]['fmenge'] = wpsg_tf($_REQUEST['value']);
-        				
+
         		}
         		else if ($_REQUEST['typ'] == "var_artnr")
         		{
-        				
+
         			if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
         			{
@@ -758,20 +758,20 @@
         				$vp_data[$_REQUEST['var_id']]['artnr'] = wpsg_q($_REQUEST['value']);
         			}
-        				
+
         		}
         		else if ($_REQUEST['typ'] == "var_stock")
         		{
-        
+
         			$_REQUEST['value'] = intval($_REQUEST['value']);
         			$vp_data[$_REQUEST['var_id']]['stock'] = $_REQUEST['value'];
-        				
-        		}
-        
+
+        		}
+
         		$this->saveVarianten($_REQUEST['edit_id'], $vp_data);
-        
+
         		die(strval($_REQUEST['value']));
-        
+
         	}
-        		
+
         } // public function produkt_ajax()
 
@@ -781,63 +781,63 @@
 		public function canOrder($product_key)
 		{
-			
+
 			$product_id = $this->shop->getProduktID($product_key);
-			
+
 			if ($this->isVariantsProduct($product_id))
 			{
-				
+
 				$nActive = 0;
-				
+
 				$variants = $this->getVariants($product_id);
-				
+
 				foreach ($variants as $var_id => $var_info)
 				{
-					
+
 					$nActive += $var_info['count_active'];
-					
-				}
-				
+
+				}
+
 				if ($nActive <= 0) return -2;
-				
-			}
-						 
+
+			}
+
 		}
-		
+
 		/* Modulfunktionen */
-		
-		/** 
-		 * Gibt den Bestand fÃŒr eine Variation zurÃŒck 
-		 * @var $product_key String 
+
+		/**
+		 * Gibt den Bestand fÃŒr eine Variation zurÃŒck
+		 * @var $product_key String
 		 * Beispiel: pv_1|1:1
-		 * 
+		 *
 		 * Wird vom Lagerbestandsmodul aufgerufen, sollte NUR mit einem VariantenschlÃŒssel aufgerufen werden
 		 */
 		public function getStockForVariation($product_key)
 		{
-			
+
 			$arVariInfo = $this->explodeProductKey($product_key);
 			$oProduct = wpsg_product::getInstance($arVariInfo['product_id']);
-			
+
 			if (!wpsg_isSizedArray($arVariInfo['arVari'])) return $oProduct->stock;
 			else
 			{
-				
+
 				$nStock = 0;
 				$variConf = $this->getVariants($arVariInfo['product_id'], true, true, true);
-				
+
 				foreach ($arVariInfo['arVari'] as $var_id => $vari_id)
 				{
-					
+
 					$nStock += $variConf[$var_id]['arVariation'][$vari_id]['stock'];
-					
-				}
-				
+
+				}
+
 				return $nStock;
-				
-			}
-			
-			
+
+			}
+
+
 		} // public function getStockForVariation($product_key)
-		 
+
         /**
          * Speichert die Varianten
@@ -845,12 +845,12 @@
         public function saveVarianten($produkt_id, $vp_data)
         {
-        
+
         	$vp_data = $this->clearArrayForSerialization($vp_data);
-        		
+
         	$temp = wpsg_q(serialize($vp_data));
         	$this->db->UpdateQuery(WPSG_TBL_PRODUCTS_VARIATION, array(
         		"images" => wpsg_q(serialize($vp_data))
         	), "`id` = '".wpsg_q($_REQUEST['vari_id'])."'");
-			
+
         } // public function saveVarianten($produkt_id, $vp_data)
 
@@ -860,7 +860,7 @@
         public function saveVariation($produkt_id, $vp_data)
         {
-        
+
         	$vp_data = $this->clearArrayForSerialization($vp_data);
-        
+
         	$temp = wpsg_q(serialize($vp_data));
         	$vdata['pic'] = '';
@@ -869,11 +869,11 @@
         	$vdata['picOrder'] = $vp_data[wpsg_q($_REQUEST['var_id'])]['arVariation'][wpsg_q($_REQUEST['iid'])]['picOrder'];
         	$vdata['postid'] = $vp_data[wpsg_q($_REQUEST['var_id'])]['arVariation'][wpsg_q($_REQUEST['iid'])]['postid'];
-        	
+
         	$this->db->UpdateQuery(WPSG_TBL_PRODUCTS_VARIATION, array(
         			"images" => wpsg_q(serialize($vdata))
         	), "`variation_id` = '".wpsg_q($_REQUEST['vari_id'])."'");
-        		
+
         } // public function saveVariation($produkt_id, $vp_data)
-        
+
         /**
          * LÃ€dt die Varianteninformationen aus dem serialisierten Array
@@ -882,67 +882,67 @@
         public function loadVarianten($produkt_id, $noTrans = false, $noCache = false)
         {
-        
+
         	if (is_admin()) $noCache = true;
-        		
+
         	if (!$noCache && array_key_exists($produkt_id.$noTrans, wpsg_getArray($this->cache_variData))) return $this->cache_variData[$produkt_id.$noTrans];
-        		
+
         	// Ãbersetzung verarbeiten
         	if (is_admin() || $noTrans === true)
         	{
-        
+
         		//$vp_data = @unserialize($this->db->fetchOne("SELECT `images` FROM `".WPSG_TBL_PRODUCTS_VARIATION."` WHERE `id` = '".wpsg_q($produkt_id)."'"));
         		$vp_data = @unserialize($this->db->fetchOne("SELECT `images` FROM `".WPSG_TBL_PRODUCTS_VARIATION."` WHERE `id` = '".wpsg_q($_REQUEST['vari_id'])."'"));
         		if (!is_array($vp_data)) $vp_data = array();
-			         
+
         	}
         	else
         	{
-        			
+
         		// Im Frontend geht es nach der Sprache auf der der Shop aktuell lÃ€uft
         		if ($this->shop->isOtherLang())
         		{
-        
+
         			$parent_lang_id = $this->db->fetchOne("SELECT `lang_parent` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_id)."'");
         			if (!wpsg_isSizedInt($parent_lang_id)) $parent_lang_id = $produkt_id;
-        				
+
         			$vp_data = @unserialize($this->db->fetchOne("SELECT `images` FROM `".WPSG_TBL_PRODUCTS_VARIATION."` WHERE `id` = '".wpsg_q($parent_lang_id)."'"));
         			if (!is_array($vp_data)) $vp_data = array();
-        				
+
         			foreach ($vp_data as $k => $v)
         			{
-        
+
         				// Den Namen der Variante auf die aktuelle Sprache stellen
         				if (wpsg_isSizedString($vp_data[$k]['lang'][$this->shop->getCurrentLanguageCode()]['name'])) $vp_data[$k]['name'] = $vp_data[$k]['lang'][$this->shop->getCurrentLanguageCode()]['name'];
-        
+
         				if (wpsg_isSizedArray($vp_data[$k]['vari']))
         				{
-        						
+
         					foreach ($vp_data[$k]['vari'] as $k2 => $vari)
         					{
-        
+
         						// Den Namen der Variation auf die aktuelle Sprache korrigieren
         						if (wpsg_isSizedString($vp_data[$k]['lang'][$this->shop->getCurrentLanguageCode()]['vari'][$k2]['name'])) $vp_data[$k]['vari'][$k2]['name'] = $vp_data[$k]['lang'][$this->shop->getCurrentLanguageCode()]['vari'][$k2]['name'];
-        
+
         					}
-        						
+
         				}
-        
+
         			}
-        				
+
         		}
         		else
         		{
 
-        			if (isset($_REQUEST['vari_id'])) 
+        			if (isset($_REQUEST['vari_id']))
 					{
-						
+
         				$vp_data = @unserialize($this->db->fetchOne("SELECT `images` FROM `".WPSG_TBL_PRODUCTS_VARIATION."` WHERE `id` = '".wpsg_q($_REQUEST['vari_id'])."'"));
         				if (!is_array($vp_data)) $vp_data = array();
-        				
+
         			}
         			else
         			{
-        				
-        				$strQuery = 
+
+        				$strQuery =
         				"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,
@@ -950,50 +950,50 @@
         				 FROM ".WPSG_TBL_VARIANTS." AS V, ".WPSG_TBL_VARIANTS_VARI." AS VV,
         				 ".WPSG_TBL_PRODUCTS_VARIATION." AS PVV, ".WPSG_TBL_PRODUCTS_VARIANT." AS PV
-        				 WHERE V.`id` = VV.`variant_id` AND VV.`id` = PVV.`variation_id` AND PV.`variant_id` = VV.`variant_id` AND 
-        				 PVV.`product_id` = '".wpsg_q($produkt_id)."' AND VV.`deleted` != 1 AND V.`deleted` != 1 
+        				 WHERE V.`id` = VV.`variant_id` AND VV.`id` = PVV.`variation_id` AND PV.`variant_id` = VV.`variant_id` AND
+        				 PVV.`product_id` = '".wpsg_q($produkt_id)."' AND VV.`deleted` != 1 AND V.`deleted` != 1
         				 ORDER BY PV.`pos`, VV.`pos`";
-        				
+
         				//$vp_data = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARIATION."` WHERE `product_id` = '".wpsg_q($produkt_id)."'");
         				$vp_data = $this->db->fetchAssoc($strQuery);
         				if (!is_array($vp_data)) $vp_data = array();
         				$this->unserializeVariation($vp_data);
-        				
+
         			}
-        			
-        		}
-        
+
+        		}
+
         	}
-        
+
         	$this->cache_variData[$produkt_id.$noTrans] = $vp_data;
-        		
+
         	return $vp_data;
-        		
+
         } // public function loadVarianten($produkt_id)
-                
+
         private function clearArrayForSerialization($ar)
         {
-        		
+
         	foreach ((array)$ar as $k => $v)
         	{
-        
+
         		if (wpsg_isSizedArray($v))
         		{
-        				
+
         			$ar[$k] = $this->clearArrayForSerialization($v);
-        				
+
         		}
         		else
         		{
-        				
+
         			$ar[$k] = preg_replace('/\'|\`|\ÂŽ|\"/', '', $v);
-        				
-        		}
-        
+
+        		}
+
         	}
-        		
+
         	return $ar;
-        		
+
         } // private function clearArrayForSerialization($ar)
-        
+
         /**
          * Gibt die Bilder als Array fÃŒr die Variation zurÃŒck
@@ -1004,36 +1004,36 @@
         public function getVariImages($product_id, $var_id, $vari_id)
         {
-        	
+
         	$_REQUEST['var_id'] = $var_id;
         	$_REQUEST['vari_id'] = $vari_id;
-        	
+
         	//$vp_data = $this->loadVarianten($product_id);
         	$vp_data = $this->getVariants($product_id, true, true, true);
-        	$this->unserializeVariant($vp_data); 
-        	
+        	$this->unserializeVariant($vp_data);
+
         	$arProductBilder = $this->shop->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($product_id));
-        
+
         	$arReturn = array();
-        
+
         	if (!isset($vp_data[$var_id])) return $arProductBilder;
         	//if (!wpsg_isSizedArray($vp_data[$var_id]['vari'][$vari_id]['picOrder']) && !wpsg_isSizedArray($vp_data[$var_id]['picOrder'])) return $arProductBilder;
         	if (!wpsg_isSizedArray($vp_data[$var_id]['arVariation'][$vari_id]['picOrder'])) return $arProductBilder;
-        	
+
         	// Sortierung
         	// Bilder in Reihenfolge von picOrder
         	if (isset($vp_data[$var_id]['typ']) && ($vp_data[$var_id]['typ'] == 'checkbox') && wpsg_isSizedArray($vp_data[$var_id]['picOrder'])) $arReturn = $vp_data[$var_id]['picOrder'];
         	else if (wpsg_isSizedArray($vp_data[$var_id]['arVariation'][$vari_id]['picOrder'])) $arReturn = $vp_data[$var_id]['arVariation'][$vari_id]['picOrder'];
-        	
+
         	/*
         	// PrÃŒfen ob die Bilder noch in Produktbilder Array drin sind
         	foreach ($arReturn as $k => $v)
         	{
-        
+
         		if (!in_array($v, $arProductBilder)) unset($arReturn[$k]);
         		else unset($arProductBilder[array_search($v, $arProductBilder)]);
-        
+
         	}
         	*/
-        	
+
         	$arProductBilderSort = Array();
         	foreach ($arProductBilder as $v) {
@@ -1041,44 +1041,44 @@
         		if ($k !== false)
         			$arProductBilderSort[$k] = $v;
-        		
+
         	}
         	ksort($arProductBilderSort);
-        	
+
         	// Bilder aus dem ProduktArray noch hinzufÃŒgen, die eventuell nicht im sortierten Array enthalten sind
         	foreach ($arProductBilder as $k => $v)
         	{
-        
+
         		//$arReturn[] = $v['basenameori'];
         		$k = array_search($v['basenameori'], $arReturn);
         		if ($k === false)
         			$arProductBilderSort[] = $v;
-        			
+
         	}
         	//$arReturn = array_unique($arReturn);
-        	
+
         	$arImageSelect = array();
-        	
+
         	// Sind die Bilder in der Variante ausgewÃ€hlt?
         	if (!is_admin())
         	{
-        	
+
         		//if ($vp_data[$var_id]['typ'] == 'checkbox' && wpsg_isSizedString($vp_data[$var_id]['pic'])) $arImageSelect = explode(',', $vp_data[$var_id]['pic']);
         		if ($vp_data[$var_id]['type'] == '3' && wpsg_isSizedString($vp_data[$var_id]['pic'])) $arImageSelect = explode(',', $vp_data[$var_id]['pic']);
         		else if (wpsg_isSizedString($vp_data[$var_id]['arVariation'][$vari_id]['pic'])) $arImageSelect = explode(',', $vp_data[$var_id]['arVariation'][$vari_id]['pic']);
-        	
+
         		foreach ($arReturn as $k => $v)
         		{
-        
+
         			if (!in_array($v, $arImageSelect)) unset($arReturn[$k]);
-        
-        		}
-        
+
+        		}
+
         	}
-        
+
         	//return $arReturn;
         	return $arProductBilderSort;
-        	
+
         } // public function getVariImages($product_id, $var_id, $vari_id)
-   
+
         /**
          * Gibt den Namen der Variante zurÃŒck
@@ -1086,7 +1086,7 @@
         public function getVariantenName($vp_data, $var_id)
         {
-        		
+
         	$name = $vp_data[$var_id]['name'];
-        
+
         	if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
         	{
@@ -1096,9 +1096,9 @@
         		}
         	}
-        		
+
         	return ((trim($name) == "")?"----":$name);
-        		
+
         } // public function getVariantenName($vp_data, $v_id)
-        
+
         /**
          * Gibt den Namen der Variation zurÃŒck
@@ -1106,7 +1106,7 @@
         public function getVariName($vp_data, $var_id, $vari_id)
         {
-        		
+
         	$name = $vp_data[$var_id]['arVariation'][$vari_id]['name'];
-        
+
         	if (wpsg_isSizedString($_REQUEST['wpsg_lang']))
         	{
@@ -1116,9 +1116,9 @@
         		}
         	}
-        
+
         	return ((trim($name) == "")?"----":$name);
-        		
+
         } // public function getVariName($vp_data, $var_id, $vari_id)
-        
+
 		/**
 		 * PrÃŒft ob das Produkt ein Variantenprodukt ist oder nicht
@@ -1126,23 +1126,23 @@
 		public function isVariantsProduct($product_id)
 		{
-			 			
+
 			$strQuery = "
-					SELECT 
-						COUNT(*) 
-					FROM 
-						`".WPSG_TBL_VARIANTS_VARI."` AS VI 
+					SELECT
+						COUNT(*)
+					FROM
+						`".WPSG_TBL_VARIANTS_VARI."` AS VI
 							LEFT JOIN `".WPSG_TBL_PRODUCTS_VARIATION."` AS PVI ON (PVI.`variation_id` = VI.`id`)
-					WHERE 
+					WHERE
 						PVI.`product_id` = '".wpsg_q($product_id)."' AND
-						PVI.`active` = '1' AND						 
+						PVI.`active` = '1' AND
 						VI.`deleted` != '1'
 			";
-			
+
 			$nActiveVariants = $this->db->fetchOne($strQuery);
-			
+
 			if ($nActiveVariants > 0) return true; else return false;
-			
+
 		} // public function isVariantsProduct($product_id)
-		
+
 		/**
 		 * Integration in das Produkttemplate
@@ -1150,17 +1150,17 @@
 		public function productTemplate($product_data)
 		{
-			
+
 			die("Veraltet");
-			
+
 			if (!wpsg_isSizedArray($product_data['arVariant'])) return;
-			
+
 			$this->shop->view['wpsg_mod_productvariants']['product_id'] = $product_data['product_id'];
 			$this->shop->view['wpsg_mod_productvariants']['arVariants'] = $product_data['arVariant'];
 			$this->shop->view['wpsg_mod_productvariants']['product_variants'] = $this->explodeProductKey($product_data['product_key'])['arVari'];
-						
+
 			$this->shop->render(WPSG_PATH_VIEW.'mods/mod_productvariants/productTemplate.phtml');
 
 		} // public function productTemplate($product_key)
-		
+
 		/**
 		 * Ãbernimmt die Auswahl der Variante im Produkttemplate
@@ -1168,44 +1168,44 @@
 		public function renderTemplate($product_key)
 		{
-			
+
 			$produkt_id = $this->shop->getProduktId($product_key);
 			$produkt_data = $this->shop->cache->loadProduct($produkt_id);
 			$tax_value = $this->shop->getCalcTaxValue($produkt_data['mwst_key']);
-		
+
 			if ($this->shop->isOtherLang())
 			{
-			
+
 				$produkt_trans_id = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($produkt_id)."' AND `lang_locale` = '".wpsg_q($this->shop->getCurrentLanguageCode())."'");
-			
+
 				if (wpsg_isSizedInt($produkt_trans_id)) $produkt_id = $produkt_trans_id;
-		
-			}
-		
+
+			}
+
 			//public function getVariants($product_id = false, $global = true, $onlyActive = false, $loadVariationen = false)
 			$vp_data = $this->getVariants($produkt_id, true, true, true);
 			$this->unserializeVariant($vp_data);
-			
+
 			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)
 			{
-		
+
 				$arpb = $this->shop->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array(&$produkt_id));
-				
+
 				//$this->shop->view['data']['vp_data'] = $vp_data;
 				$this->shop->view['wpsg_mod_productvariants']['set'] = $this->getSetVariArray($product_key);
-		
+
 				// Rabattpreise vorkalkulieren
 				//$this->shop->callMod('wpsg_mod_discount', 'addDiscountToVari', array(&$produkt_id, &$this->shop->view['data']['vp_data']));
-				
+
 				$arPossibleImages = array();
-				
+
 				// Bilddaten ergÃ€nzen
 				foreach ($vp_data as $k1 => &$v1) {
@@ -1219,6 +1219,6 @@
 								foreach ($v2['picOrder'] as $kp => $vp) {
 									if ($ap == $vp)
-										if ($kp < $k) $k = $kp; 
-									
+										if ($kp < $k) $k = $kp;
+
 								}
 							$v2['showpic'] = $v2['picOrder'][$k];
@@ -1240,67 +1240,67 @@
 							$v2['post_id'] = $arpb[$found]['post_id'];
 						}
-												
+
 					}
 				}
-								
+
 				unset($v1);
 				unset($v2);
 
 				$this->shop->view['data']['vp_data'] = $vp_data;
-				
+
 				foreach ($this->shop->view['data']['vp_data'] as $k => $v)
 				{
-						
+
 					if ($v['typ'] == "checkbox")	// 0 = checkbox
 					{
-		
+
 						if (get_option("wpsg_vp_showpic") == "1" && wpsg_isSizedString($v['pic']))
 						{
-								
+
 							//$this->shop->view['data']['vp_data'][$k]['showpic'] = $this->getImageSelectImage($produkt_id, $k, $k2, $product_key);
-		
+
 						}
-		
+
 						// Preis an Ausgabe im Frontend anpassen
 						//if ($this->shop->getFrontendTaxview() == WPSG_NETTO && $this->shop->getBackendTaxview() == WPSG_BRUTTO) $this->shop->view['data']['vp_data'][$k]['preis'] = wpsg_calculatePreis($v['preis'], WPSG_NETTO, $tax_value);
 						//else if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO && $this->shop->getBackendTaxview() == WPSG_NETTO) $this->shop->view['data']['vp_data'][$k]['preis'] = wpsg_calculatePreis($v['preis'], WPSG_BRUTTO, $tax_value);
-						
+
 					}
 					else
 					{
-		
+
 						foreach ($v['arVariation'] as $k2 => $v2)
 						{
-		
+
 							if (get_option("wpsg_vp_showpic") == "1" && wpsg_isSizedString($v2['pic']))
 							{
-		
+
 								//$this->shop->view['data']['vp_data'][$k]['vari'][$k2]['showpic'] = $this->getImageSelectImage($produkt_id, $k, $k2, $product_key);
-		
+
 							}
-								
+
 							// Preis an Ausgabe im Frontend anpassen
 							if ($this->shop->getFrontendTaxview() == WPSG_NETTO && $this->shop->getBackendTaxview() == WPSG_BRUTTO) $this->shop->view['data']['vp_data'][$k]['arVariation'][$k2]['price'] = wpsg_calculatePreis($v2['price'], WPSG_NETTO, $tax_value);
 							else if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO && $this->shop->getBackendTaxview() == WPSG_NETTO) $this->shop->view['data']['vp_data'][$k]['arVariation'][$k2]['price'] = wpsg_calculatePreis($v2['price'], WPSG_BRUTTO, $tax_value);
-								
+
 						}
-		
+
 					}
-						
-				}
-				 				
+
+				}
+
 				return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/produkt.phtml', false);
-				
-			}
-				
+
+			}
+
 		} // public function renderTemplate($produkt_id)
-		
+
 		/**
 		 * Gibt ein Array mit Informationen aus dem VariantenschlÃŒssel zurÃŒck
-		 * Besp: pv_1|1:1 
+		 * Besp: pv_1|1:1
 		 * Array
 			(
     			[product_id] => 1
-    			[arVari] => Array 
+    			[arVari] => Array
 		 		(
             		[1] => 1
@@ -1312,26 +1312,26 @@
 		public function explodeProductKey($product_key)
 		{
-		
+
 			if (is_numeric($product_key)) return array(
 				'product_id' => $product_key,
 				'arVari' => array()
 			);
-			
+
 			$arKey = explode('|', $product_key);
 			$arReturn = array();
-			
+
 			for ($i = 1; $i < sizeof($arKey); $i ++)
 			{
-				
+
 				$arKeyValue = explode(':', $arKey[$i]);
 				$arReturn[$arKeyValue[0]] = $arKeyValue[1];
-				
-			}
-			
+
+			}
+
 			return array(
 				'product_id' => substr($arKey[0], 3),
 				'arVari' => $arReturn
 			);
-			
+
 		} // public function explodeProductKey($product_key)
 
@@ -1342,36 +1342,36 @@
 		public function showVariPrice($vari_price)
 		{
-				
+
 			switch ($this->shop->get_option('wpsg_mod_varianten_showvariprice'))
 			{
-		
+
 				case '1': // nur wenn grÃ¶Ãer 0
-						
+
 					if ($vari_price <= 0) return false;
-						
+
 					break;
-						
+
 				case '2': // nie anzeigen
-						
+
 					return false;
-						
+
 					break;
-		
-			}
-				
+
+			}
+
 			return true;
-				
+
 		} // public function showVariPrice($vari_price)
-		
+
 		private function calculateVariantsPrice($price, $arVariant, $product_key)
 		{
-			
+
 			$arProductVariant = $this->explodeProductKey($product_key)['arVari'];
 
 			foreach ($arProductVariant as $variant_id => $variation_id)
 			{
-				
+
 				$price += $arVariant[$variant_id]['arVariation'][$variation_id]['price'];
-				
+
 			}
 
@@ -1381,15 +1381,15 @@
 		private function admin_showAction()
 		{
-			 
+
 			$this->shop->view['product_id'] = $_REQUEST['product_id'];
 			$this->shop->view['arVariants'] = $this->getVariants($_REQUEST['product_id'], true);
-			
+
 			die($this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/admin_show.phtml'));
-			
+
 		} // private function showAction()
-		
+
 		private function admin_addAction()
 		{
-									
+
 			$this->db->ImportQuery(WPSG_TBL_VARIANTS, array(
 				'name' => wpsg_q(__('Unbenannt', 'wpsg')),
@@ -1398,23 +1398,23 @@
 				'pos' => '5000'
 			));
-			
+
 			$this->admin_showAction();
-			
+
 		} // private function admin_addAction()
-		
+
 		private function admin_editAction()
 		{
-			
+
 			$this->shop->view['product_id'] = wpsg_getStr($_REQUEST['product_id'], '0');
 			$this->shop->view['variant'] = $this->getVariant($_REQUEST['variant_id']);
 			$this->shop->view['arVariation'] = $this->getVariationOfVariant($_REQUEST['variant_id'], $_REQUEST['product_id']);
-			
+
 			die($this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvariants/admin_edit.phtml'));
-			
+
 		} // private function admin_editAction()
-		
+
 		private function admin_variation_addAction()
 		{
-			
+
 			$variation_id = $this->db->ImportQuery(WPSG_TBL_VARIANTS_VARI, array(
 				'variant_id' => wpsg_q($_REQUEST['variant_id']),
@@ -1422,46 +1422,46 @@
 				'deleted' => '0'
 			));
-			
+
 			if (wpsg_isSizedInt($_REQUEST['product_id']))
 			{
-				
+
 				$this->db->ImportQuery(WPSG_TBL_PRODUCTS_VARIATION, array(
 					'variation_id' => wpsg_q($variation_id),
 					'product_id' => wpsg_q($_REQUEST['product_id'])
 				));
-				
-			}
-			
+
+			}
+
 			$this->admin_editAction();
-			
+
 		} // private function admin_variation_addAction()
-		
+
 		private function admin_delAction()
 		{
-			
+
 			$this->db->UpdateQuery(WPSG_TBL_VARIANTS, array(
 				'deleted' => '1'
 			), " `id` = '".wpsg_q($_REQUEST['variant_id'])."' ");
-			
+
 			$this->admin_showAction();
-			
+
 		} // private function admin_delAction()
-		
+
 		private function admin_variation_delAction()
 		{
-			
+
 			$this->db->UpdateQuery(WPSG_TBL_VARIANTS_VARI, array(
 				'deleted' => '1'
 			), " `id` = '".wpsg_q($_REQUEST['variation_id'])."' ");
-				
+
 			$this->admin_editAction();
-			
+
 		} // private function admin_variation_delAction()
-		
+
 		private function setProductVariant($product_id, $variant_id, $field, $value)
 		{
-			
+
 			if (!wpsg_isSizedInt($product_id) || !wpsg_isSizedInt($variant_id)) die("Systemfehler");
-				
+
 			$id_exist = $this->db->fetchOne("
 				SELECT
@@ -1473,5 +1473,5 @@
 					`product_id` = '".wpsg_q($product_id)."'
 			");
-				
+
 			$data = array(
 				$field => wpsg_q($value),
@@ -1479,25 +1479,25 @@
 				'variant_id' => wpsg_q($variant_id)
 			);
-				
+
 			if (wpsg_isSizedInt($id_exist)) $this->db->UpdateQuery(WPSG_TBL_PRODUCTS_VARIANT, $data, " `id` = '".wpsg_q($id_exist)."' ");
 			else $this->db->ImportQuery(WPSG_TBL_PRODUCTS_VARIANT, $data);
-			
+
 		} // private function setProductVariant($product_id, $variant_id, $field, $value)
-		
+
 		private function setProductVariation($product_id, $variation_id, $field, $value)
 		{
-			
+
 			if (!wpsg_isSizedInt($product_id) || !wpsg_isSizedInt($variation_id)) die("Systemfehler");
-			
+
 			$id_exist = $this->db->fetchOne("
-				SELECT 
-					`id` 
-				FROM 
-					`".WPSG_TBL_PRODUCTS_VARIATION."` 
-				WHERE 
+				SELECT
+					`id`
+				FROM
+					`".WPSG_TBL_PRODUCTS_VARIATION."`
+				WHERE
 					`variation_id` = '".wpsg_q($variation_id)."' AND
-					`product_id` = '".wpsg_q($product_id)."' 
+					`product_id` = '".wpsg_q($product_id)."'
 			");
-			
+
 			$data = array(
 				$field => wpsg_q($value),
@@ -1505,72 +1505,72 @@
 				'variation_id' => wpsg_q($variation_id)
 			);
-			
+
 			if (wpsg_isSizedInt($id_exist)) $this->db->UpdateQuery(WPSG_TBL_PRODUCTS_VARIATION, $data, " `id` = '".wpsg_q($id_exist)."' ");
 			else $this->db->ImportQuery(WPSG_TBL_PRODUCTS_VARIATION, $data);
-			
+
 		} // private function setProductVariation($product_id, $field, $value)
-		
+
 		private function admin_inlineEditAction()
 		{
-			
+
 			if (wpsg_isSizedString($_REQUEST['field'], 'name'))
 			{
-				
+
 				$this->db->UpdateQuery(WPSG_TBL_VARIANTS, array('name' => wpsg_q($_REQUEST['value'])), " `id` = '".wpsg_q($_REQUEST['field_id'])."' ");
-				
+
 			}
 			else if (wpsg_isSizedString($_REQUEST['field'], 'type'))
 			{
-			
+
 				$this->db->UpdateQuery(WPSG_TBL_VARIANTS, array('type' => wpsg_q($_REQUEST['value'])), " `id` = '".wpsg_q($_REQUEST['field_id'])."' ");
 				die(self::$arTypeLabel[$_REQUEST['value']]);
-			
+
 			}
 			else if (wpsg_isSizedString($_REQUEST['field'], 'pos'))
 			{
-							
+
 				$i = 0; foreach ($_REQUEST['value'] as $var)
 				{
-						
+
 					$var_id = substr($var, 4);
-						
+
 					if (wpsg_isSizedInt($_REQUEST['product_id'])) $this->setProductVariant($_REQUEST['product_id'], $var_id, 'pos', $i);
 					else $this->db->UpdateQuery(WPSG_TBL_VARIANTS, array('pos' => wpsg_q($i)), " `id` = '".wpsg_q($var_id)."' ");
-						
+
 					$i ++;
-					
-				}
-			 
+
+				}
+
 				die('1');
-				
-			}			
+
+			}
 			else if (wpsg_isSizedString($_REQUEST['field'], 'vari_name'))
 			{
-				
+
 				$this->db->UpdateQuery(WPSG_TBL_VARIANTS_VARI, array('name' => wpsg_q($_REQUEST['value'])), " `id` = '".wpsg_q($_REQUEST['field_id'])."' ");
-				
-			}			
+
+			}
 			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'))
 			{
-					
+
 				$i = 0; foreach ($_REQUEST['value'] as $vari)
 				{
-			
+
 					$vari_id = substr($vari, 5);
-			
+
 					$this->db->UpdateQuery(WPSG_TBL_VARIANTS_VARI, array('pos' => wpsg_q($i)), " `id` = '".wpsg_q($vari_id)."' ");
-			
+
 					$i ++;
-						
-				}
-			
+
+				}
+
 				die('1');
-			
+
 			}
 			else if (preg_match('/vari_(.*)/', $_REQUEST['field']))
@@ -1582,13 +1582,13 @@
 				}
 				$this->setProductVariation($_REQUEST['product_id'], $_REQUEST['field_id'], substr($_REQUEST['field'], 5), $value);
-			
-			}
-						
-			// TODO: Ãbersetzung	
-			
+
+			}
+
+			// TODO: Ãbersetzung
+
 			die($_REQUEST['value']);
-			
+
 		} // private function admin_inlineEditAction()
-		
+
 		/**
 		 * Gibt die MÃ¶glichken Bilder einer Variantenkombination zurÃŒck
@@ -1596,7 +1596,7 @@
 		public function getKombiVariImages($var_key, $var_id = false)
 		{
-			
+
 			if (!$this->shop->hasMod('wpsg_mod_produktbilder')) return false;
-			
+
 			$arVarSelected = $this->getSetVariArray($var_key);
 			$product_id = $this->shop->getProduktID($var_key);
@@ -1604,12 +1604,12 @@
 			$arVari = $this->getVariants($product_id, true, true, true);
 			$this->unserializeVariant($arVari);
-			
+
 			$arTemp = $this->shop->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($product_id));
-			
+
 			if (!$this->isVariantsProductKey($var_key)) return $arTemp;
-			
+
 			$arBilder = array();
 			foreach ($arTemp as $bild) {
-				$arBilder[] = $bild['basenameori'];	
+				$arBilder[] = $bild['basenameori'];
 			}
 
@@ -1621,5 +1621,5 @@
 				$filename = preg_replace("/\.([^\.]*)/", "", $bild);
 				if ($filename == "vp_".str_replace(":", "-", $var_key)) $image = $bild;
-				
+
 				if ($image !== false) return array($image);
 			}
@@ -1649,5 +1649,5 @@
 			}
 			//$arBilder = $this->checkPics($arBilder, $product_id);
-			
+
 			if (wpsg_isSizedArray($arBilder))
 			{
@@ -1665,5 +1665,5 @@
 			}
 		}
-		
+
 		/**
 		 * Gibt einen Array zurÃŒck, bei denen die SchlÃŒssel die Varianten sind und die Werte die gewÃ€hlten Variationen
@@ -1671,26 +1671,26 @@
 		private function getSetVariArray($product_key)
 		{
-		
+
 			if (!$this->isVariantsProductKey($product_key)) return array();
-				
+
 			$arVariSet = explode('|', preg_replace('/^pv_\d*\//', '', $product_key));
 			$arReturn = array();
 			unset($arVariSet[0]);
-				
+
 			foreach ($arVariSet as $var_combi)
 			{
-		
+
 				$var_combi = explode(':', $var_combi);
 				$var = $var_combi[0];
 				$vari = $var_combi[1];
-		
+
 				$arReturn[$var] = $vari;
-		
-			}
-				
+
+			}
+
 			return $arReturn;
-				
+
 		}	// private function getSetVariArray($product_key)
-		
+
 		/**
 		 * Gibt die Variationen einer Variante zurÃŒck
@@ -1699,35 +1699,35 @@
 		public function getVariationOfVariant($variant_id, $product_id = false, $arProductFilter = array())
 		{
-					
+
 			$strQuerySELECT = "";
 			$strQueryJOIN = "";
 			$strQueryWHERE = "";
 			$strQueryHAVING = "";
-						
+
 			if (wpsg_isSizedArray($arProductFilter))
 			{
-				
+
 				//return array($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER);
 				//list($strQueryP_WHERE, $strQueryP_JOIN, $strQueryP_HAVING, $strQueryP_ORDER) = wpsg_product::getQueryParts($arProductFilter);
-				
+
 				list($strQueryP_SELECT, $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`) ";
-			
+
 				$strQuerySELECT .= $strQueryP_SELECT;
 				$strQueryJOIN .= $strQueryP_JOIN;
 				$strQueryWHERE .= $strQueryP_WHERE;
 				$strQueryHAVING .= $strQueryP_HAVING;
-						
+
 			}
 			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.`id` AS iid, PV.`variation_id`, PV.`active`, PV.`anr`, PV.`price`, PV.`stock`, PV.`images`, PV.`weight`, PV.`fmenge` ";
-							
-			}
-			
+
+			}
+
 			$strQuery = "
 				SELECT
@@ -1743,5 +1743,5 @@
 				GROUP BY
 					VI.`id`
-				HAVING 
+				HAVING
 					1
 					".$strQueryHAVING."
@@ -1749,14 +1749,14 @@
 					VI.`pos`
 			";
-			 
+
 			$arVari = $this->db->fetchAssoc($strQuery);
 			$this->unserializeVariation($arVari);
-			
+
 			// TODO: Ãbersetzung
-			
+
 			return $arVari;
-			
+
 		} // public function getVariationOfVariant($variant_id)
-			
+
 		private function unserializeVariation(&$arVari) {
 			foreach ($arVari as &$vi) {
@@ -1771,5 +1771,5 @@
 					}
 				}
-			}					
+			}
 		}	// private function unserializeVariation(&$arVari)
 
@@ -1779,5 +1779,5 @@
 				if ($va['type'] == 1) $va['typ'] = 'radio';
 				if ($va['type'] == 2) $va['typ'] = 'image';
-				
+
 				foreach ($va['arVariation'] as &$vi) {
 					$ar = @unserialize($vi['images']);
@@ -1794,8 +1794,8 @@
 			}
 		}	// private function unserializeVariant(&$arVar)
-		
+
 		public function stockVarianten($product_id)
 		{
-				
+
 			$this->shop->view['product_id'] = wpsg_getStr($product_id, '0');
 			//$this->shop->view['variant'] = $this->getVariant($_REQUEST['variant_id']);
@@ -1804,12 +1804,12 @@
 			$vp_data = $this->getVariants($product_id, true, true, true);
 			$this->unserializeVariant($vp_data);
-				
+
 			$html = '<table>';
 			foreach ($vp_data as $var) {
-				$html .= '<tr>';   		
+				$html .= '<tr>';
 				$html .= '<td class="col_shortname" colspan="3">'.wpsg_hspc($var['name']).'</td>';
 				$html .= '</tr>';
 			    foreach ($var['arVariation'] as $vari) {
-			    	$html .= '<tr>';    		
+			    	$html .= '<tr>';
 			    	$html .= '<td class="col_active">&nbsp;';
 			    	$html .= '</td>';
@@ -1822,8 +1822,8 @@
 			}
 			$html .= '</table>';
-			die($html);		
-			
+			die($html);
+
 		} // private function stockVarianten($product_id)
-		
+
 		/**
 		 * Reduziert den Bestand der Variationen in dem Array
@@ -1831,16 +1831,16 @@
 		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);
-		
+
 			// Tabellen sperren
 			if ($this->shop->get_option('wpsg_lockOrderTables') != '1')
 			{
-				
+
 				$arLockTables[WPSG_TBL_PRODUCTS_VARIATION] = "WRITE";
 				$strQuery = "LOCK TABLES ";
@@ -1848,36 +1848,36 @@
 				$this->db->Query(substr($strQuery, 0, -1));
 			}
-			
+
 			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($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($menge)." WHERE `id` = '".wpsg_q($vv)."'
 						");
-						
-				}
-		
-			}
-				
+
+				}
+
+			}
+
 			$this->db->unlockTables();
-			
+
 			// Array zurÃŒckspeichern
 			//$this->saveVarianten($produkt_id, $vari_data);
-		
+
 		} // public function reduceStock($produkt_id, $menge)
-		
+
 		/**
 		 * Gibt true zurÃŒck, wenn der ÃŒbergebene Produktkey ein Varianten Produktkey ist. Sonst false.
@@ -1886,20 +1886,20 @@
 		public function isVariantsProductKey($productkey)
 		{
-				
+
 			if (preg_match('/^pv_\d+/', $productkey))
 			{
-		
+
 				return true;
-		
+
 			}
 			else
 			{
-		
+
 				return false;
-		
-			}
-				
+
+			}
+
 		} // public function isVariantsProductKey($productkey)
-		
+
 		/**
 		 * Gibt eine einzelne Variante zurÃŒck
@@ -1908,9 +1908,9 @@
 		public function getVariant($variant_id, $bHideDeleted = true)
 		{
-			
+
 			$strQueryWHERE = "";
-			
+
 			if ($bHideDeleted === true) $strQueryWHERE .= " AND V.`deleted` != '1' ";
-			
+
 			$strQuery = "
 				SELECT
@@ -1919,21 +1919,21 @@
 					`".WPSG_TBL_VARIANTS."` AS V
 				WHERE
-					V.`id` = '".wpsg_q($variant_id)."' 
+					V.`id` = '".wpsg_q($variant_id)."'
 					".$strQueryWHERE."
 			";
-						
+
 			$arVariant = $this->db->fetchRow($strQuery);
-			
+
 			if (!wpsg_isSizedInt($arVariant['id'])) return false;
-			
+
 			// TODO: Ãbersetzung
-			
+
 			return $arVariant;
-			
+
 		} // public function getVariant($variant_id)
-		
+
 		public function getVariation($variation_id)
 		{
-			
+
 			$arVariation = $this->db->fetchRow("
 				SELECT
@@ -1942,87 +1942,87 @@
 					`".WPSG_TBL_VARIANTS_VARI."` AS VI
 				WHERE
-					VI.`id` = '".wpsg_q($variant_id)."'					
+					VI.`id` = '".wpsg_q($variant_id)."'
 			");
-			
+
 			$arVariation['images'] = wpsg_trim(explode(',', $arVariation['images']));
-			
+
 			// TODO: Ãbersetzung
-			
+
 			return $arVariation;
-			
+
 		} // public function getVariation($variation_id)
-		
+
 		/**
 		 * Gibt einen Array der Produktvarianten zurÃŒck
 		 * @param Integer|Boolean $product_id Produkt ID
-		 * @param Boolean $global Globale Varianten? 
+		 * @param Boolean $global Globale Varianten?
 		 */
 		public function getVariants($product_id = false, $global = true, $onlyActive = false, $loadVariationen = false, $serVariationen = false)
 		{
-			
+
 			$strQuerySELECT = "";
 			$strQueryORDER = "";
 			$strQueryJOIN = "";
 			$strProductQuery = " AND ( 0 ";
-			
-			if (wpsg_isSizedInt($product_id)) 
-			{
-				
+
+			if (wpsg_isSizedInt($product_id))
+			{
+
 				$strProductQuery .= " OR V.`product_id` = '".wpsg_q($product_id)."' ";
-				
+
 				$strQueryWHERE = "";
-				
+
 				// Wenn Lagerbestand aktiv, dann nur Veriationen mit Lagerbestand zÃ€hlen
 				// Im Backend zÃ€hle ich auch ausverkaufte Variationen mit, sonst steht in der Ãbersicht 0/2 auch wenn bei einem der Haken gesetzt ist
 				if ($this->shop->hasMod('wpsg_mod_stock') && !is_admin()) $strQueryWHERE .= " AND PVI.`stock` > 0 ";
-				
+
 				$strQuerySELECT .= ", (
-					SELECT 
-						COUNT(*) 
-					FROM 
-						`".WPSG_TBL_VARIANTS_VARI."` AS VI 
+					SELECT
+						COUNT(*)
+					FROM
+						`".WPSG_TBL_VARIANTS_VARI."` AS VI
 							LEFT JOIN `".WPSG_TBL_PRODUCTS_VARIATION."` AS PVI ON (PVI.`variation_id` = VI.`id`)
-					WHERE 
+					WHERE
 						PVI.`product_id` = '".wpsg_q($product_id)."' AND
 						PVI.`active` = '1' AND
-						VI.`variant_id` = V.`id` AND 
+						VI.`variant_id` = V.`id` AND
 						VI.`deleted` != '1'
 						".$strQueryWHERE."
 				) AS `count_active` ";
-				
+
 				$strQueryJOIN = " LEFT JOIN `".WPSG_TBL_PRODUCTS_VARIANT."` AS PV ON (PV.`variant_id` = V.`id` AND PV.`product_id` = '".wpsg_q($product_id)."') ";
-				
+
 				$strQueryORDER .= " PV.`pos` ASC, ";
-				
+
 			}
 			else
 			{
-				
+
 				$strQuerySELECT .= ", '0' AS `count_active` ";
-				
-			}
-			
-			if ($global === true) 
-			{
-				
+
+			}
+
+			if ($global === true)
+			{
+
 				$strProductQuery .= " OR V.`product_id` = '0' ";
-				
-			}
-			
-			$strProductQuery .= " ) ";			
-					
+
+			}
+
+			$strProductQuery .= " ) ";
+
 			$arData = $this->db->fetchAssoc("
-				SELECT 
+				SELECT
 					V.*,
 					(SELECT COUNT(*) FROM `".WPSG_TBL_VARIANTS_VARI."` AS VI WHERE VI.`variant_id` = V.`id` AND VI.`deleted` != '1') AS `count_variation`,
 					(
-						SELECT 
+						SELECT
 							COUNT(DISTINCT `product_id`)
-						FROM						 
+						FROM
 							`".WPSG_TBL_VARIANTS_VARI."` AS VI
-								LEFT JOIN `".WPSG_TBL_PRODUCTS_VARIATION."` AS PVI ON (PVI.`variation_id` = VI.`id`)		
+								LEFT JOIN `".WPSG_TBL_PRODUCTS_VARIATION."` AS PVI ON (PVI.`variation_id` = VI.`id`)
 								LEFT JOIN `".WPSG_TBL_PRODUCTS."` AS P ON (PVI.`product_id` = P.`id`)
 						WHERE
-							VI.`variant_id` = V.`id` AND							
+							VI.`variant_id` = V.`id` AND
 							PVI.`active` = '1' AND
 							P.`id` > 0 AND
@@ -2034,5 +2034,5 @@
 						".$strQueryJOIN."
 				WHERE
-					V.`deleted` != '1' 
+					V.`deleted` != '1'
 					".$strProductQuery."
 				GROUP BY
@@ -2042,5 +2042,5 @@
 					V.`product_id` ASC, V.`pos`
 			", "id");
-			
+
 			foreach ($arData as $k => $v)
 			{
@@ -2065,21 +2065,21 @@
 								VI.`deleted` != '1' AND
 								VI.`variant_id` = '".wpsg_q($v['id'])."' AND
-								PVI.`product_id` = '".wpsg_q($product_id)."' AND 
-								PVI.`active` = '1' 							
+								PVI.`product_id` = '".wpsg_q($product_id)."' AND
+								PVI.`active` = '1'
 							ORDER BY
-								VI.`pos` ASC 
+								VI.`pos` ASC
 						", "variation_id");
-						
+
 						// Bilder deserialisieren
 						foreach ($arData[$k]['arVariation'] as $vari_id => $vari_data)
 						{
-							
+
 							if ($serVariationen == true) {
 								$arData[$k]['arVariation'][$vari_id]['images'] = @unserialize($vari_data['images']);
 								if (wpsg_isSizedString($arData[$k]['arVariation'][$vari_id]['images'])) $arData[$k]['arVariation'][$vari_id]['images'] = wpsg_trim(explode(',', $arData[$k]['arVariation'][$vari_id]['images']));
 								else $arData[$k]['arVariation'][$vari_id]['images'] = array();
-								
+
 							}
-							
+
 						}
 
@@ -2088,60 +2088,60 @@
 
 			}
-			
+
 			// TODO: Ãbersetzung
-			
+
 			return $arData;
-			
+
 		}
-	
+
 		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)
 		{
-				
+
 			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)
 
-		public function overview_row2(&$p, $i)
-		{
-			
+		public function overview_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/overview_row.phtml');
-			
+
 		} // public function basket_row(&$p)
-		
+
 		/**
 		 * Liest die Informationen anhand eines VariantenschlÃŒssels aus
@@ -2149,20 +2149,20 @@
 		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();
-				
+
 			// kein Produkt-Key dann keine Weiterarbeit nÃ¶tig
 			if (is_numeric($vari_key)) {
@@ -2171,31 +2171,31 @@
 				$arReturn['pics'] = array();
 				return $arReturn;
-				
+
 			}
 
 			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'],
@@ -2204,50 +2204,50 @@
 								'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'],
@@ -2257,39 +2257,39 @@
 							'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_productvars.class.php
===================================================================
--- /mods/wpsg_mod_productvars.class.php	(revision 6331)
+++ /mods/wpsg_mod_productvars.class.php	(revision 6332)
@@ -6,12 +6,12 @@
 	 *
 	 */
-	class wpsg_mod_productvars extends wpsg_mod_basic 
+	class wpsg_mod_productvars extends wpsg_mod_basic
 	{
-		
+
 		var $lizenz = 1;
 		var $id = 950;
 		var $hilfeURL = 'http://wpshopgermany.de/?p=815';
 		var $inline = false;
-		
+
 		/**
 		 * Costructor
@@ -19,27 +19,27 @@
 		public function __construct()
 		{
-			
+
 			parent::__construct();
-			
+
 			$this->name = __('Produktvariablen', 'wpsg');
 			$this->group = __('Produkte', 'wpsg');
 			$this->desc = __('ErmÃ¶glicht das Erfassen von Kundeneingaben zu bestellten Produkten.', 'wpsg');
-			
+
 			$this->arTypen = array(
 				1 => __('Auswahl', 'wpsg'),
 				2 => __('Texteingabe', 'wpsg'),
-				3 => __('Checkbox', 'wpsg') 
+				3 => __('Checkbox', 'wpsg')
 			);
-									
+
 		} // public function __construct()
-		 
-		public function install() 
-		{ 
-			
+
+		public function install()
+		{
+
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
-			
+
 			/*
 			 * Posts Tabelle erweitern
-			 */ 
+			 */
 			$sql = "CREATE TABLE ".WPSG_TBL_PRODUCTS_VARS." (
 		   		id mediumint(9) NOT NULL AUTO_INCREMENT,
@@ -48,38 +48,38 @@
 		   		auswahl VARCHAR(5000) NOT NULL,
 				pos int(11) NOT NULL,
-		   		pflicht INT(1) NOT NULL, 
+		   		pflicht INT(1) NOT NULL,
 		   		PRIMARY KEY  (id)
 		   	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-   	   	 
+
    			dbDelta($sql);
-			
-		} // public function install() 
-		
-		public function settings_edit() 
-		{
-			
+
+		} // public function install()
+
+		public function settings_edit()
+		{
+
 			$this->shop->mod = $this;
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/settings_edit.phtml');
-			
+
 		} // public function settings_edit()
-		
-		public function settings_save() 
+
+		public function settings_save()
 		{
 
 			$this->shop->update_option('wpsg_mod_productvars_showProduct', $_REQUEST['wpsg_mod_productvars_showProduct']);
-			
+
 		}
-		
+
 		public function be_ajax()
 		{
-			
+
 			$this->shop->mod = $this;
-			
+
 			if ($_REQUEST['do'] == 'add')
 			{
-				
+
 				$new_name = __('Anklicken um den Namen der Produktvariable zu Ã€ndern ...', 'wpsg');
 				$new_auswahl = __('Bitte zum Bearbeiten anklicken.', 'wpsg');
-				
+
 				// Versandzone in Datenbank eintragen
 				$pv_id = $this->db->ImportQuery(WPSG_TBL_PRODUCTS_VARS, array(
@@ -87,249 +87,249 @@
 					'typ' => '2',
 					'auswahl' => $new_auswahl,
-					'pflicht' => ''					
+					'pflicht' => ''
 				));
-				
+
 				$this->shop->addTranslationString('wpsg_mod_productvars_'.$pv_id, $new_name);
 				$this->shop->addTranslationString('wpsg_mod_productvars_auswahl_'.$pv_id, $new_auswahl);
-				
+
 				die($this->pv_list());
-				
+
 			}
 			else if ($_REQUEST['do'] == 'reorder')
 			{
-				
+
 				parse_str($_REQUEST['wpsg_reorder'], $wpsg_reorder);
-				
+
 				foreach ($wpsg_reorder['pv'] as $pos => $pv_id)
 				{
-					
+
 					$this->db->UpdateQuery(WPSG_TBL_PRODUCTS_VARS, array(
 						'pos' => wpsg_q($pos)
 					), " `id` = '".wpsg_q($pv_id)."' ");
-					
-				}
-				
+
+				}
+
 				die("1");
-				
+
 			}
 			else if ($_REQUEST['do'] == 'del')
 			{
-				
+
 				$this->db->Query("DELETE FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` = '".wpsg_q($_REQUEST['pv_id'])."'");
-				
+
 				die($this->pv_list());
-				
+
 			}
 			else if ($_REQUEST['do'] == 'inlinedit')
 			{
-				
+
 				$data = array();
-				if ($_REQUEST['field'] == 'name') { 
+				if ($_REQUEST['field'] == 'name') {
 
 					$data['name'] = wpsg_q($_REQUEST['value']);
-					$this->shop->addTranslationString('wpsg_mod_productvars_'.$_REQUEST['pv_id'], $_REQUEST['value']);				
+					$this->shop->addTranslationString('wpsg_mod_productvars_'.$_REQUEST['pv_id'], $_REQUEST['value']);
 					$value = __($_REQUEST['value'], 'wpsg');
-					
+
 				}
 				else if ($_REQUEST['field'] == 'pflicht') { $data['pflicht'] = wpsg_q($_REQUEST['value']); $value = $_REQUEST['value']; }
 				else if ($_REQUEST['field'] == 'typ') { $data['typ'] = wpsg_q($_REQUEST['value']); $value = $this->arTypen[$_REQUEST['value']]; }
-				else if ($_REQUEST['field'] == 'auswahl') { 
-					
+				else if ($_REQUEST['field'] == 'auswahl') {
+
 					$data['auswahl'] = wpsg_q($_REQUEST['value']);
-					$this->shop->addTranslationString('wpsg_mod_productvars_auswahl'.$_REQUEST['pv_id'], $_REQUEST['value']); 
-					$value = $_REQUEST['value']; 
-				
-				}
-				
+					$this->shop->addTranslationString('wpsg_mod_productvars_auswahl'.$_REQUEST['pv_id'], $_REQUEST['value']);
+					$value = $_REQUEST['value'];
+
+				}
+
 				$this->db->UpdateQuery(WPSG_TBL_PRODUCTS_VARS, $data, "`id` = '".wpsg_q($_REQUEST['pv_id'])."'");
-				
+
 				die($value);
-				
-			}
-			
+
+			}
+
 		} // public function be_ajax()
-		
+
 		public function product_addedit_content(&$product_content, &$product_data)
 		{
-		
+
 			if (isset($_REQUEST['wpsg_lang']) || !wpsg_isSizedInt($_REQUEST['edit_id'])) return;
-					
-			$this->shop->view['wpsg_mod_productvars']['productvars_set'] = explode(",", $product_data['produktvars']);						
+
+			$this->shop->view['wpsg_mod_productvars']['productvars_set'] = explode(",", $product_data['produktvars']);
 			$this->shop->view['wpsg_mod_productvars']['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` ORDER BY `pos` ASC, `id` ASC");
-						
+
 			//$this->shop->view['wpsg_mod_productvars']['data'] = $product_data;
-		
+
 			$product_content['wpsg_mod_productvars'] = array(
 					'title' => __('Produktvariable', 'wpsg'),
 					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/produkt_addedit_sidebar.phtml', false)
 			);
-		
+
 		} //public function product_addedit_content(&$product_content, &$product_data)
-		
-		public function produkt_save(&$produkt_id) { 
-			
+
+		public function produkt_save(&$produkt_id) {
+
 			if (isset($_REQUEST['wpsg_pv']))
 			{
 				foreach ((array)$_REQUEST['wpsg_pv'] as $k => $v) { if ($v != '1') unset($_REQUEST['wpsg_pv'][$k]); }
-			
+
 				$this->db->UpdateQuery(WPSG_TBL_PRODUCTS, array('produktvars' => implode(",", array_keys((array)$_REQUEST['wpsg_pv']))), "`id` = '".wpsg_q($produkt_id)."'");
 			}
-			
-		} // public function produkt_save(&$produkt_id) 
-		
-		public function basket_check() 
-		{ 
-			
+
+		} // public function produkt_save(&$produkt_id)
+
+		public function basket_check()
+		{
+
 			$bError = false;
-			
+
 			foreach ($_SESSION['wpsg']['basket'] as $product_index => $p)
 			{
-				
+
 				$arPV = $this->getAllProductVars($this->shop->getProduktID($p['id']));
-				
+
 				foreach ((array)$arPV as $k => $pv_db)
 				{
-					
+
 					$pv_id = $pv_db['id'];
-					$value = $this->getProductVarValueSession($product_index, $pv_id); 
-					
+					$value = $this->getProductVarValueSession($product_index, $pv_id);
+
 					if ($pv_db['typ'] == '1' && $pv_db['pflicht'] == '1' && ($value == 'not_set' || $value === false)) // Auswahlfeld
 					{
-						
+
 						$this->shop->addFrontendError(wpsg_translate(__('Bitte im Feld "#1#" eine Auswahl treffen!', 'wpsg'), __($pv_db['name'], 'wpsg')));
 						$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);
 						$bError = true;
-						
+
 					}
 					else if ($pv_db['typ'] == '2' && $pv_db['pflicht'] == '1' && (trim($value) == '' || $value === false)) // Textfield
 					{
-							
+
 						$this->shop->addFrontendError(wpsg_translate(__('Bitte im Feld "#1#" eine Angabe machen!', 'wpsg'), __($pv_db['name'], 'wpsg')));
-						$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);									
+						$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);
 						$bError = true;
-						
-					}								
+
+					}
 					else if ($pv_db['typ'] == '3' && $pv_db['pflicht'] == '1' && ($value != '1' || $value === false)) // Checkbox
 					{
-						
+
 						$this->shop->addFrontendError(wpsg_translate(__('Bitte das Feld "#1#" aktivieren!', 'wpsg'), __($pv_db['name'], 'wpsg')));
 						$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);
 						$bError = true;
-						
-					}
-					
-				} 
-				
-			}
-			
+
+					}
+
+				}
+
+			}
+
 			if ($bError === true)
 			{
-				
+
 				return -2;
-				
-			} 
-			
+
+			}
+
 		} // public function basket_check()
-		
-		public function basket_checkoutAction(&$basketController) 
-		{ 
-			
+
+		public function basket_checkoutAction(&$basketController)
+		{
+
 			$bError = false;
-			
+
 			if (wpsg_isSizedArray($_REQUEST['wpsg_mod_productvars']))
 			{
-			
+
 				foreach ($_REQUEST['wpsg_mod_productvars'] as $pv_id => $pv_values)
 				{
-					
+
 					$pv_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` = '".wpsg_q($pv_id)."' ORDER BY `pos` ASC, `id` ASC");
-					
+
 					// Wert speichern
 					foreach ($pv_values as $pv_product_index => $value)
 					{
-												
+
 						foreach ($_SESSION['wpsg']['basket'] as $product_index => $ses_data)
 						{
-							
+
 							if ($product_index == $pv_product_index)
 							{
-								
+
 								$_SESSION['wpsg']['basket'][$pv_product_index]['wpsg_mod_productvars'][$pv_id] = wpsg_xss($value);
-																
+
 								if ($pv_db['typ'] == '1' && $pv_db['pflicht'] == '1' && $value == 'not_set') // Auswahlfeld
 								{
-									
+
 									$this->shop->addFrontendError(wpsg_translate(__('Bitte im Feld "#1#" eine Auswahl treffen!', 'wpsg'), __($pv_db['name'], 'wpsg')));
 									$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);
 									$bError = true;
-									
+
 								}
 								else if ($pv_db['typ'] == '2' && $pv_db['pflicht'] == '1' && trim($value) == '') // Textfield
 								{
-										
+
 									$this->shop->addFrontendError(wpsg_translate(__('Bitte im Feld "#1#" eine Angabe machen!', 'wpsg'), __($pv_db['name'], 'wpsg')));
-									$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);									
+									$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);
 									$bError = true;
-									
-								}								
+
+								}
 								else if ($pv_db['typ'] == '3' && $pv_db['pflicht'] == '1' && $value != '1') // Checkbox
 								{
-									
+
 									$this->shop->addFrontendError(wpsg_translate(__('Bitte das Feld "#1#" aktivieren!', 'wpsg'), __($pv_db['name'], 'wpsg')));
 									$_SESSION['wpsg']['errorFields'][] = wpsg_xss('wpsg_mod_productvars_'.$pv_id.'_'.$product_index);
 									$bError = true;
-									
+
 								}
-								
+
 							}
-							
+
 						}
-						
-					}
-					
-				}
-				
-			}
-			
+
+					}
+
+				}
+
+			}
+
 			if ($bError) return -2;
-			
+
 		} // public function basket_checkoutAction(&$basketController)
-		
+
 		public function basket_preUpdate()
 		{
- 
+
 			if (isset($_REQUEST['wpsg_mod_productvars']) && isset($_SESSION['wpsg']['basket']))
 			{
-				
+
 				foreach ((array)$_REQUEST['wpsg_mod_productvars'] as $pv_id => $pv_values)
 				{
-					
+
 					foreach ((array)$pv_values as $product_index => $value)
 					{
-					
+
 						foreach ((array)$_SESSION['wpsg']['basket'] as $product_index_session => $ses_data)
 						{
-							
+
 							if ($product_index_session == $product_index)
 							{
-							
+
 								$_SESSION['wpsg']['basket'][$product_index]['wpsg_mod_productvars'][$pv_id] = wpsg_xss($value);
-								
+
 							}
-								
+
 						}
-						
-					}
-					
-				} 
-				
-			}  
-			
+
+					}
+
+				}
+
+			}
+
 		} // public function basket_preUpdate()
-		
-		public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order) { 
-				
+
+		public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order) {
+
 			$pv_store = array();
-			
+
 			foreach ($arBasket['produkte'] as $product_index => $p)
 			{
@@ -337,53 +337,53 @@
 				if (isset($p['wpsg_mod_productvars']) && is_array($p['wpsg_mod_productvars']) && sizeof($p['wpsg_mod_productvars']) > 0)
 				{
-					
+
 					$pv_store[$product_index] = $p['wpsg_mod_productvars'];
-					
-				}
-				
+
+				}
+
 			}
 
 			if (is_array($pv_store) && sizeof($pv_store) > 0)
 			{
-				
+
 				$data['pvars'] = wpsg_q(serialize($pv_store));
-				
-			}
-			
+
+			}
+
 		}
-		
+
 		public function order_view_row(&$p, $i)
 		{
-			
+
 			$this->shop->view['wpsg_mod_productvars']['data'] = $this->getAllProductVarValues($this->shop->view['data']['id'], $p['product_index']);
-			
+
 			if (wpsg_isSizedArray($this->shop->view['wpsg_mod_productvars']['data']))
 			{
-			
+
 				$this->shop->view['wpsg_mod_productvars']['p'] = $p;
 				$this->shop->view['wpsg_mod_productvars']['i'] = $i;
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/order_view_row.phtml');
-				
-			} 
-			 			
+
+			}
+
 		} // public function order_view_row(&$p, &$i)
-		
+
 		public function admin_presentation()
 		{
-				
+
 			echo wpsg_drawForm_Checkbox('wpsg_mod_productvars_showvariprice', __('"Leere" Produktvariablen anzeigen', 'wpsg'), $this->shop->get_option('wpsg_mod_productvars_showvariprice'));
-				
+
 		} // public function admin_presentation()
-		
+
 		public function admin_presentation_submit()
 		{
-				
+
 			$this->shop->update_option('wpsg_mod_productvars_showvariprice', $_REQUEST['wpsg_mod_productvars_showvariprice']);
-				
+
 		} // public function admin_presentation_submit()
-		
+
 		public function user_order_view_row(&$p, $oid)
 		{
-			
+
 			$strCustomData = $this->db->fetchOne("
 						SELECT
@@ -394,134 +394,134 @@
 							`id` = '".wpsg_q($oid)."'
 					");
-			
+
 			$strUnserializeData = unserialize($strCustomData);
-			
+
 			$this->shop->view['UnserializeProductData'] = $strUnserializeData['basket']['produkte'];
 		}
-		
-		public function basket_row(&$p, $i) 
-		{ 
-			
+
+		public function basket_row(&$p, $i)
+		{
+
 			$produkt_id = $this->shop->basket->getProduktDBID($p['id']);
-			
+
 			if ($produkt_id > 0)
 			{
-			
+
 				$pVarsSet = explode(",", $this->db->fetchOne("SELECT `produktvars` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_id)."'"));
 				foreach ($pVarsSet as $k => $v) { if (trim($v) == '') { unset($pVarsSet[$k]); } }
-					
+
 				if (is_array($pVarsSet) && sizeof($pVarsSet) > 0)
 				{
 
 					$this->shop->view['wpsg_mod_productvars']['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` IN (".wpsg_q(implode(',', $pVarsSet)).") ORDER BY `pos` ASC, `id` ASC", "id");
-					
+
 					foreach ($this->shop->view['wpsg_mod_productvars']['data'] as $k => $v)
 					{
 						$this->shop->view['wpsg_mod_productvars']['data'][$k]['auswahl'] = explode("|", $v['auswahl']);
 					}
-					
+
 					$this->shop->view['wpsg_mod_productvars']['i'] = $i;
 					$this->shop->view['wpsg_mod_productvars']['p'] = $p;
-					
+
 					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/basket_row.phtml');
-					
-				}
-				
-			}
-						
+
+				}
+
+			}
+
 		} // public function basket_row(&$p, $i)
-		
-		public function basket_preMultiple($product_index) 
-		{ 
-			
+
+		public function basket_preMultiple($product_index)
+		{
+
 			if (wpsg_isSizedArray($_REQUEST['wpsg_mod_productvars']))
 			{
-				
+
 				foreach ($_REQUEST['wpsg_mod_productvars'] as $pv_id => $value)
 				{
-					
+
 					foreach ($value as $pv_product_index => $pv_value)
 					{
-						
+
 						if ($pv_product_index == $product_index)
 						{
-							
+
 							$_REQUEST['wpsg_mod_productvars'][$pv_id] = $pv_value;
-							
+
 						}
-						
-					}
-					
-				}
-				
-			}
-			
+
+					}
+
+				}
+
+			}
+
 		}
-		
-		public function basket_produkttosession($produkt_key, &$menge, &$ses_data) 
-		{
-			
+
+		public function basket_produkttosession($produkt_key, &$menge, &$ses_data)
+		{
+
 			$bError = false;
-			
+
 			if (isset($_REQUEST['wpsg_mod_productvars']) && is_array($_REQUEST['wpsg_mod_productvars']))
 			{
-				
+
 				foreach ($_REQUEST['wpsg_mod_productvars'] as $pv_id => $value)
 				{
-					 
+
 					$pv_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` = '".wpsg_q($pv_id)."' ");
-					
+
 					$ses_data['wpsg_mod_productvars'][$pv_id] = $value;
-								
+
 					if ($pv_db['typ'] == '1' && $pv_db['pflicht'] == '1' && $value == 'not_set') // Auswahlfeld
 					{
-						
+
 						$this->shop->addFrontendError(wpsg_translate(__('Bitte im Feld "#1#" eine Auswahl treffen!', 'wpsg'), __($pv_db['name'], 'wpsg')));
 						$_SESSION['wpsg']['errorFields'][] = 'wpsg_mod_productvars_'.$pv_id.'_'.$ses_data['id'];
 						$bError = true;
-						
+
 					}
 					else if ($pv_db['typ'] == '2' && $pv_db['pflicht'] == '1' && trim($value) == '') // Textfield
 					{
-							
+
 						$this->shop->addFrontendError(wpsg_translate(__('Bitte im Feld "#1#" eine Angabe machen!', 'wpsg'), __($pv_db['name'], 'wpsg')));
 						$_SESSION['wpsg']['errorFields'][] = 'wpsg_mod_productvars_'.$pv_id.'_'.$ses_data['id'];
 						$bError = true;
-						
-					}								
+
+					}
 					else if ($pv_db['typ'] == '3' && $pv_db['pflicht'] == '1' && $value != '1') // Checkbox
 					{
-						
+
 						$this->shop->addFrontendError(wpsg_translate(__('Bitte das Feld "#1#" aktivieren!', 'wpsg'), __($pv_db['name'], 'wpsg')));
 						$_SESSION['wpsg']['errorFields'][] = 'wpsg_mod_productvars_'.$pv_id.'_'.$ses_data['id'];
 						$bError = true;
-						
-					}
-					
-				}
-				
-			}
-			
+
+					}
+
+				}
+
+			}
+
 			// Nix machen bei Warenkorbaktualisierung
 			if (isset($_REQUEST['wpsg_basket_refresh'])) return;
-					 		
+
 			if ($bError === true) return -2; else return true;
-			
+
 		} // public function basket_produkttosession($produkt_key, $menge, &$ses_data)
-		 		
+
 		public function product_bottom(&$produkt_id, $template_index)
 		{
 
 			if ($this->shop->get_option('wpsg_mod_productvars_showProduct') != '1') return false;
-			
+
 			$pVarsSet = explode(",", $this->db->fetchOne("SELECT `produktvars` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_id)."'"));
 
 			foreach ($pVarsSet as $k => $v) { if (trim($v) == '') { unset($pVarsSet[$k]); } }
-			
+
 			if (is_array($pVarsSet) && sizeof($pVarsSet) > 0)
 			{
 
 				$this->shop->view['wpsg_mod_productvars']['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` IN (".wpsg_q(implode(',', $pVarsSet)).") ORDER BY `pos` ASC, `id` ASC");
-				
+
 				foreach ($this->shop->view['wpsg_mod_productvars']['data'] as $k => $v)
 				{
@@ -531,69 +531,69 @@
 				if (isset($_REQUEST['form_data']))
 				{
-					
+
 					$this->shop->checkEscape();
-					
+
 					$form_data = array();
 					parse_str($_REQUEST['form_data'], $form_data);
-				
+
 					foreach ($form_data['wpsg_mod_productvars'] as $pv_id => $pv_value)
 					{
-						
+
 						foreach ($this->shop->view['wpsg_mod_productvars']['data'] as $pv_index => $pv)
 						{
-							
+
 							if ($pv['id'] == $pv_id)
 							{
-								
+
 								$this->shop->view['wpsg_mod_productvars']['data'][$pv_index]['value'] = $pv_value;
-								
+
 							}
-							
+
 						}
-						
-					}
-					 
+
+					}
+
 				}
 
 				echo $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/renderTemplate.phtml', false);
-				
-			}
-			
+
+			}
+
 		} // public function product_bottom(&$produkt_id, $template_index)
-		
-		public function mail_row($index, $produkt) 
-		{
-			
+
+		public function mail_row($index, $produkt)
+		{
+
 			$order_id = $this->shop->view['o_id'];
-		 
+
 			$arPVars = $this->getAllProductVarValues($order_id, $produkt['product_index']);
-			  
+
 			if (wpsg_isSizedArray($arPVars))
 			{
-				
+
 				$this->shop->view['wpsg_mod_productvars']['data'] = $arPVars;
 				$this->shop->view['wpsg_mod_productvars']['i'] = $index;
 				$this->shop->view['wpsg_mod_productvars']['p'] = $produkt;
-				
+
 				if ($this->shop->htmlMail === true)
 				{
-					
+
 					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/mail_row_html.phtml');
-					
+
 				}
 				else
 				{
-					
+
 					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/mail_row.phtml');
-					
-				}
-				
-			} 
-			
+
+				}
+
+			}
+
 		}
-				
-		public function order_ajax() 
-		{ 
- 
+
+		public function order_ajax()
+		{
+
 			if (wpsg_isSizedString($_REQUEST['do'], 'inlinedit'))
 			{
@@ -601,137 +601,97 @@
 				$db_pvar = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` = '".wpsg_q($_REQUEST['pv_id'])."'");
 				$arAuswahl = explode('|', $db_pvar['auswahl']);
-				
-				if ($db_pvar['typ'] == 1 && is_numeric($_REQUEST['value']))				
-				{
-										
+
+				if ($db_pvar['typ'] == 1 && is_numeric($_REQUEST['value']))
+				{
+
 					$_REQUEST['value'] = $arAuswahl[$_REQUEST['value']];
-					
-				} 
-				
+
+				}
+
 				$db_order = $this->shop->cache->loadOrder($_REQUEST['order_id']);
 				$pvars = @unserialize($db_order['pvars']);
 				$pvars[$_REQUEST['p_id']][$_REQUEST['pv_id']] = $_REQUEST['value'];
-				
+
 				$this->db->UpdateQuery(WPSG_TBL_ORDER, array(
 					'pvars' => wpsg_q(@serialize($pvars))
-				), " `id` = '".wpsg_q($_REQUEST['order_id'])."' ");						
-				
+				), " `id` = '".wpsg_q($_REQUEST['order_id'])."' ");
+
 				if ($db_pvar['typ'] == 1 && $_REQUEST['value'] == 'not_set') $_REQUEST['value'] = __('Keine Angabe', 'wpsg');
 				else if ($db_pvar['typ'] == 3)
 				{
-				
+
 					if ($_REQUEST['value'] == '1') $_REQUEST['value'] = __('Ja', 'wpsg');
 					else $_REQUEST['value'] = __('Nein', 'wpsg');
-							
-				}
-				
+
+				}
+
 				die($_REQUEST['value']);
-				
-			}
-			
+
+			}
+
 		}
-		
-		public function overview_row(&$p, $i) 
-		{
-			
+
+		public function overview_row(&$p, $i)
+		{
+
 			$produkt_id = $this->shop->basket->getProduktDBID($p['id']);
-			
+
 			if ($produkt_id > 0)
 			{
-							
-				$pVarsSet = explode(",", $this->db->fetchOne("SELECT `produktvars` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_id)."'"));				
+
+				$pVarsSet = explode(",", $this->db->fetchOne("SELECT `produktvars` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_id)."'"));
 				foreach ($pVarsSet as $k => $v) { if (trim($v) == '') { unset($pVarsSet[$k]); } }
 
 				if (is_array($pVarsSet) && sizeof($pVarsSet) > 0)
 				{
-					
+
 					$this->shop->view['wpsg_mod_productvars']['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` IN (".wpsg_q(implode(',', $pVarsSet)).") ORDER BY `pos` ASC, `id` ASC");
-					
+
 					if ($this->shop->get_option('wpsg_mod_productvars_showvariprice') !== '1' && wpsg_isSizedArray($this->shop->view['wpsg_mod_productvars']['data']))
 					{
-						
+
 						// Es sollen nicht alle angezeigt werden
 						foreach ($this->shop->view['wpsg_mod_productvars']['data'] as $k => $v)
 						{
-						 
+
 							if ($v['typ'] === '1' && $p['wpsg_mod_productvars'][$v['id']] === 'not_set') { unset($this->shop->view['wpsg_mod_productvars']['data'][$k]); }
 							else if ($v['typ'] === '2' && !wpsg_isSizedString($p['wpsg_mod_productvars'][$v['id']])) { unset($this->shop->view['wpsg_mod_productvars']['data'][$k]); }
-							
+
 						}
-						
-					}
-					
+
+					}
+
 					$this->shop->view['wpsg_mod_productvars']['i'] = $i;
 					$this->shop->view['wpsg_mod_productvars']['p'] = $p;
-					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/overview_row.phtml');	
-					
-				}
-				
-			}
-			
+					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/overview_row.phtml');
+
+				}
+
+			}
+
 		} // public function overview_row(&$p, $i)
-		
-		public function overview_row2(&$p, $i)
-		{
-			
-			$produkt_id = $this->shop->basket->getProduktDBID($p['id']);
-			
-			if ($produkt_id > 0)
-			{
-				
-				$pVarsSet = explode(",", $this->db->fetchOne("SELECT `produktvars` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($produkt_id)."'"));
-				foreach ($pVarsSet as $k => $v) { if (trim($v) == '') { unset($pVarsSet[$k]); } }
-				
-				if (is_array($pVarsSet) && sizeof($pVarsSet) > 0)
-				{
-					
-					$this->shop->view['wpsg_mod_productvars']['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` IN (".wpsg_q(implode(',', $pVarsSet)).") ORDER BY `pos` ASC, `id` ASC");
-					
-					if ($this->shop->get_option('wpsg_mod_productvars_showvariprice') !== '1' && wpsg_isSizedArray($this->shop->view['wpsg_mod_productvars']['data']))
-					{
-						
-						// Es sollen nicht alle angezeigt werden
-						foreach ($this->shop->view['wpsg_mod_productvars']['data'] as $k => $v)
-						{
-							
-							if ($v['typ'] === '1' && $p['wpsg_mod_productvars'][$v['id']] === 'not_set') { unset($this->shop->view['wpsg_mod_productvars']['data'][$k]); }
-							else if ($v['typ'] === '2' && !wpsg_isSizedString($p['wpsg_mod_productvars'][$v['id']])) { unset($this->shop->view['wpsg_mod_productvars']['data'][$k]); }
-							
-						}
-						
-					}
-					
-					$this->shop->view['wpsg_mod_productvars']['i'] = $i;
-					$this->shop->view['wpsg_mod_productvars']['p'] = $p;
-					$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/overview_row2.phtml');
-					
-				}
-				
-			}
-			
-		} // public function overview_row(&$p, $i)
-		
-		public function replaceUniversalPlatzhalter(&$arReplace, $order_id = false, $kunden_id = false, $rechnung_id = false, $product_id = false, $product_index = false) 
-		{ 
-		
+
+		public function replaceUniversalPlatzhalter(&$arReplace, $order_id = false, $kunden_id = false, $rechnung_id = false, $product_id = false, $product_index = false)
+		{
+
 			if ($product_id !== false && $product_id > 0 && $order_id !== false && $order_id > 0)
 			{
 
 				 $arPVData = $this->getAllProductVarValues($order_id, $product_index);
-				 
+
 				 foreach ((array)$arPVData as $k => $v)
 				 {
-				 	
+
 				 	$arReplace['/%pv_'.$k.'%/'] = $v['value'];
-				 	
+
 				 }
-				
-			}
-			
+
+			}
+
 		} // public function replaceUniversalPlatzhalter(&$arReplace, $order_id = false, $kunden_id = false, $rechnung_id = false, $product_id = false, $product_index = false)
-				
-		public function notifyURL(&$url, &$produkt_key, &$menge, &$order_id, &$typ, &$arSend) 
-		{ 
-			
+
+		public function notifyURL(&$url, &$produkt_key, &$menge, &$order_id, &$typ, &$arSend)
+		{
+
 			if ($produkt_key == false) return false;
 			$product_id = $this->shop->getProduktID($produkt_key);
@@ -739,18 +699,18 @@
 			if ($product_id !== false && $product_id > 0 && $order_id !== false && $order_id > 0)
 			{
-				
+
 				$arPVData = $this->getAllProductVarValues($order_id, $product_id);
-				 
+
 				foreach ((array)$arPVData as $k => $v)
 				{
-				 	
+
 					$arSend['pv_'.$k] = $v['value'];
-				 	
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 		} // public function notifyURL(&$url, &$produkt_key, &$menge, &$order_id, &$typ, &$arSend)
-		
+
 		/* Modulfunktionen */
 
@@ -762,5 +722,5 @@
 		public function hasProductProductVarActive($product_id, $pvar_id)
 		{
-			 
+
 			$pVarsSet = explode(",", $this->db->fetchOne("SELECT `produktvars` FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($product_id)."'"));
 			$pVarsSet = wpsg_trim($pVarsSet);
@@ -768,7 +728,7 @@
 			if (in_array($pvar_id, $pVarsSet)) return true;
 			else return false;
-			
+
 		} // public function hasProductProductVarActive($product_id, $pvar_id)
-		
+
 		/**
 		 * Gibt die Werte aller Produktvariablen einer Bestellung und Produkt zurÃŒck
@@ -777,50 +737,50 @@
 		public function getAllProductVarValues($order_id, $product_index, $bAll = false)
 		{
-			
-			$order_data = $this->shop->cache->loadOrder($order_id);			
+
+			$order_data = $this->shop->cache->loadOrder($order_id);
 			$arPVars = @unserialize($order_data['pvars']);
 			$arPVars = $arPVars[$product_index];
-									 
+
 			$arReturn = array();
-			
+
 			$arPVarsDB = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."`");
-			
+
 			foreach ($arPVarsDB as $k => $pv_db)
 			{
-				
+
 				if ($bAll || array_key_exists($pv_db['id'], (array)$arPVars))
 				{
-					
+
 					$value = "";
-					
+
 					if (array_key_exists($pv_db['id'], $arPVars))
 					{
-						
+
 						switch ($pv_db['typ'])
 						{
 							case 3: // Checkbox
-								
+
 								if ($arPVars[$pv_db['id']] == '1') $value = __('Ja', 'wpsg');
 								else $value = __('Nein', 'wpsg');
-								
+
 								break;
-								
+
 							case 2: // Text
-								
+
 								$value = $arPVars[$pv_db['id']];
-																
+
 								break;
-								
+
 							case 1: // Auswahl
-								
+
 								$value = $arPVars[$pv_db['id']];
 								if ($value == "not_set") $value = __('Keine Angabe', 'wpsg');
-								
+
 								break;
-							
+
 						}
-						
-					}
-					
+
+					}
+
 					$arReturn[$pv_db['id']] = array(
 						'id' => $pv_db['id'],
@@ -828,89 +788,89 @@
 						'auswahl' => explode('|', $pv_db['auswahl']),
 						'name' => __($pv_db['name'], 'wpsg'),
-						'value' => $value							
+						'value' => $value
 					);
-					
-				}
-				
-			}
-		 
+
+				}
+
+			}
+
 			/*
-			if (is_array($arPVars)) 
-			{
-			 
-				foreach ($arPVars as $k => $v) 
-				{ 
-					 
-					if ($k == $product_index) 
-					{ 
-						
+			if (is_array($arPVars))
+			{
+
+				foreach ($arPVars as $k => $v)
+				{
+
+					if ($k == $product_index)
+					{
+
 						foreach ($arPVars[$k] as $k2 => $v2)
 						{
-						
+
 							$pvar_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` = '".wpsg_q($k2)."'");
-							
-							if ($pvar_db['typ'] == 3) // Checkbox 
+
+							if ($pvar_db['typ'] == 3) // Checkbox
 							{
-								
+
 								$arReturn[$k2] = array('typ' => '3', 'id' => $k2, 'name' => __($pvar_db['name'], 'wpsg'), 'value' => (($v2 === '1')?__('Ja', 'wpsg'):__('Nein', 'wpsg')));
 								$arIDSet[] = $k2;
-								
+
 							}
 							else if ($pvar_db['typ'] == 1) // Auswahl
 							{
-								
+
 								if ($v2 != 'not_set' || $this->shop->get_option('wpsg_mod_productvars_showvariprice') === '1')
 								{
-									
+
 									if ($v2 == 'not_set') $v2 = __('Nicht angegeben', 'wpsg');
-									
+
 									$arReturn[$k2] = array('typ' => '1', 'id' => $k2, 'name' => __($pvar_db['name'], 'wpsg'), 'value' => $v2);
 									$arIDSet[] = $k2;
-									
+
 								}
-															
+
 							}
 							else if ($pvar_db['typ'] == 2) // Text
 							{
-								
-								if (wpsg_isSizedString($v2) || $this->shop->get_option('wpsg_mod_productvars_showvariprice') === '1') 
+
+								if (wpsg_isSizedString($v2) || $this->shop->get_option('wpsg_mod_productvars_showvariprice') === '1')
 								{
-									
+
 									if (!wpsg_isSizedString($v2)) $v2 = __('Keine Angaben', 'wpsg');
-									
+
 									$arReturn[$k2] = array('typ' => '2', 'id' => $k2, 'name' => __($pvar_db['name'], 'wpsg'), 'value' => $v2);
 									$arIDSet[] = $k2;
-									
+
 								}
-								
+
 							}
-							
+
 						}
-						 
-					} 
-				
-				}
-				
+
+					}
+
+				}
+
 			} */
-						
+
 			return $arReturn;
-						
-		} // public function getAllProductVarValues($order_id, $product_id) 
-		
+
+		} // public function getAllProductVarValues($order_id, $product_id)
+
 		public function getProductVarValueSession($product_index, $pv_id)
 		{
-			
+
 			if (isset($_SESSION['wpsg']['basket'][$product_index]['wpsg_mod_productvars'][$pv_id])) return $_SESSION['wpsg']['basket'][$product_index]['wpsg_mod_productvars'][$pv_id];
 			else return false;
-			
+
 		}
-		
+
 		public function getAllProductVars($product_id)
 		{
-			
+
 			$product_data = $this->shop->cache->loadProduct($product_id);
-			
+
 			if (!wpsg_isSizedString($product_data['produktvars'])) return array();
-			
+
 			$arProductVars_active = $this->db->fetchAssoc("
 				SELECT
@@ -919,20 +879,20 @@
 					`".WPSG_TBL_PRODUCTS_VARS."` AS PV
 				WHERE
-					FIND_IN_SET(PV.`id`, '".wpsg_q($product_data['produktvars'])."')		
+					FIND_IN_SET(PV.`id`, '".wpsg_q($product_data['produktvars'])."')
 				ORDER BY
 					PV.`pos` ASC, PV.`id` ASC
 			");
-			
+
 			foreach ($arProductVars_active as $k => $pv)
 			{
-				
+
 				$arProductVars_active[$k]['name'] = __($pv['name'], 'wpsg');
-				
-			}
-			 
+
+			}
+
 			return $arProductVars_active;
-			
+
 		} // public function getAllProductVars($product_id)
-		
+
 		/**
 		 * Gibt die Liste der Produktvariablen fÃŒr das Backend zurÃŒck
@@ -940,10 +900,10 @@
 		public function pv_list()
 		{
-			
-			$this->shop->view['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` ORDER BY `pos` ASC, `id` ASC");			
+
+			$this->shop->view['data'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` ORDER BY `pos` ASC, `id` ASC");
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_productvars/pv_list.phtml');
-			
+
 		} // private function pv_list()
-		
+
 		/**
 		 * Gibt den Namen der Produktvariable zurÃŒck
@@ -951,11 +911,11 @@
 		public function getNameFromID($pVarsID)
 		{
-			
+
 			$db_pvars = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` WHERE `id` = '".wpsg_q($pVarsID)."' ");
-			
+
 			return __($db_pvars['name'], 'wpsg');
-			
+
 		} // public function getNameFromID($pVarsID)
-		 
+
 	} // class wpsg_mod_productvars extends wpsg_mod_basic
 
Index: /mods/wpsg_mod_produktattribute.class.php
===================================================================
--- /mods/wpsg_mod_produktattribute.class.php	(revision 6331)
+++ /mods/wpsg_mod_produktattribute.class.php	(revision 6332)
@@ -7,10 +7,10 @@
 	class wpsg_mod_produktattribute extends wpsg_mod_basic
 	{
-	
+
 		var $id = 85;
 		var $lizenz = 1;
 		var $inline = true;
 		var $hilfeURL = 'http://wpshopgermany.de/?p=335';
-	
+
 		/**
 		 * Costructor
@@ -18,7 +18,7 @@
 		public function __construct()
 		{
-				
+
 			parent::__construct();
-				
+
 			$this->name = __('Produktattribute', 'wpsg');
 			$this->group = __('Produkte', 'wpsg');
@@ -26,17 +26,17 @@
 
 			$this->arTypen = array(
-					'0' => __('Textfeld', 'wpsg'), 
-					'1' => __('Textfeld (RTE)', 'wpsg'), 
-					'2' => __('Auswahlfeld', 'wpsg'), 
+					'0' => __('Textfeld', 'wpsg'),
+					'1' => __('Textfeld (RTE)', 'wpsg'),
+					'2' => __('Auswahlfeld', 'wpsg'),
 					'3' => __('Checkbox', 'wpsg')
 			);
-				
+
 		} // public function __construct()
-	 
+
 		public function install()
 		{
-	
+
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
-	
+
 			/**
 			 * Tabelle fÃŒr die Produktattribute
@@ -45,13 +45,13 @@
 			   		id mediumint(9) NOT NULL AUTO_INCREMENT,
 			   		name varchar(100) NOT NULL,
-			   		typ varchar(100) NOT NULL, 
-			   		auswahl varchar(1000) NOT NULL,  	
-			   		autoshow int(1) NOT NULL,	
+			   		typ varchar(100) NOT NULL,
+			   		auswahl varchar(1000) NOT NULL,
+			   		autoshow int(1) NOT NULL,
 					pos int(11) NOT NULL,
 			   		PRIMARY KEY  (id)
 			   	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-			 
+
 			dbDelta($sql);
- 
+
 			/**
 			 * Tabelle fÃŒr die Werte der Produktattribute
@@ -64,134 +64,134 @@
 			   		KEY a_id (a_id)
 				) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
-	
+
 			dbDelta($sql);
-				
+
 		} // public function install()
-	
+
 		public function be_ajax()
 		{
-				
+
 			$this->shop->mod = $this;
-				
+
 			if ($_REQUEST['do'] == 'add')
 			{
-	
+
 				$new_name = __('Anklicken um Bezeichnung zu Ã€ndern ...', 'wpsg');
-	
+
 				$at_id = $this->db->ImportQuery(WPSG_TBL_AT, array(
 					'name' => wpsg_q($new_name),
 					'typ' => 0
 				));
-	
+
 				$this->shop->addTranslationString('wpsg_mod_produktattribute_'.$at_id, $new_name);
-	
+
 				$this->pa_listAction(); die();
-	
+
 			}
 			else if ($_REQUEST['do'] == 'reorder')
 			{
-			
+
 				parse_str($_REQUEST['wpsg_reorder'], $wpsg_reorder);
-			
+
 				foreach ((array)$wpsg_reorder['pab'] as $pos => $pa_id)
 				{
-						
+
 					$this->db->UpdateQuery(WPSG_TBL_AT, array(
 						'pos' => wpsg_q($pos)
 					), " `id` = '".wpsg_q($pa_id)."' ");
-						
-				}
-			
+
+				}
+
 				die("1");
-			
+
 			}
 			else if ($_REQUEST['do'] == 'genPACode')
 			{
-	
+
 				$this->shop->view['id'] = $_REQUEST['pa_id'];
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/genPACode.phtml');
 				die();
-	
+
 			}
 			else if ($_REQUEST['do'] == 'inlinedit')
 			{
-	
+
 				if ($_REQUEST['field'] == 'name')
 				{
-	
+
 					$this->db->UpdateQuery(WPSG_TBL_AT, array(
 						'name' => wpsg_q($_REQUEST['value'])
 					), "`id` = '".wpsg_q($_REQUEST['pa_id'])."'");
-						
+
 					$this->shop->addTranslationString('wpsg_mod_produktattribute_'.$_REQUEST['pa_id'], $_REQUEST['value']);
-						
+
 					die(stripslashes($_REQUEST['value']));
-						
+
 				}
 				else if ($_REQUEST['field'] == 'show')
 				{
-					
+
 					$this->db->UpdateQuery(WPSG_TBL_AT, array(
 						'autoshow' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['pa_id'])."'");					
-					
+					), "`id` = '".wpsg_q($_REQUEST['pa_id'])."'");
+
 					die("1");
-					
+
 				}
 				else if ($_REQUEST['field'] == 'typ')
 				{
-					
+
 					$this->db->UpdateQuery(WPSG_TBL_AT, array(
 						'typ' => wpsg_q($_REQUEST['value'])
 					), "`id` = '".wpsg_q($_REQUEST['pa_id'])."'");
-					
+
 					//die("1");
 					$value = $this->arTypen[$_REQUEST['value']];
 					die($value);
-					
+
 				}
 				else if ($_REQUEST['field'] == 'delete')
 				{
-					
+
 					$this->db->Query("DELETE FROM `".WPSG_TBL_AT."` WHERE `id` = '".wpsg_q($_REQUEST['pa_id'])."'");
-					
+
 					die($this->pa_listAction());
-					
+
 				}
 				else if ($_REQUEST['field'] == 'auswahl')
 				{
-						
+
 					$this->db->UpdateQuery(WPSG_TBL_AT, array(
 						'auswahl' => wpsg_q($_REQUEST['value'])
 					), "`id` = '".wpsg_q($_REQUEST['pa_id'])."'");
-						
+
 					$this->shop->addTranslationString('wpsg_mod_produktattribute_'.$_REQUEST['pa_id'], $_REQUEST['value']);
-						
+
 					die(stripslashes($_REQUEST['value']));
-						
-				}
-	
-			}
-	
+
+				}
+
+			}
+
 		} // public function be_ajax()
-	
+
 		public function settings_edit()
 		{
-				
+
 			//$this->shop->mod = &$this;
 			$this->shop->mod = $this;
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/settings_edit.phtml');
-				
+
 		} // public function settings_edit()
-	
+
 		public function settings_save()
 		{
-				 
-				
+
+
 		} // public function settings_save()
-	 
+
 		public function produkt_save(&$produkt_id)
 		{
-			 
+
 			foreach ((array)$_REQUEST as $pa_id => $pa_value)
 			{
@@ -200,26 +200,26 @@
 				if (preg_match('/^pa_/', $pa_id))
 				{
-					
+
 					$pa_id = substr($pa_id, 3);
-										
+
 					$nExists = $this->db->fetchOne("
-						SELECT COUNT(*) FROM `".WPSG_TBL_PRODUCTS_AT."` WHERE `a_id` = '".wpsg_q($pa_id)."' AND `p_id` = '".wpsg_q($produkt_id)."' 
+						SELECT COUNT(*) FROM `".WPSG_TBL_PRODUCTS_AT."` WHERE `a_id` = '".wpsg_q($pa_id)."' AND `p_id` = '".wpsg_q($produkt_id)."'
 					");
-		
+
 					$pa = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_AT."` WHERE `id` = '".wpsg_q($pa_id)."' ORDER BY `pos` ASC, `id` ASC ");
-					
+
 					if ($pa['typ'] == 1 && $this->shop->get_option('wpsg_options_nl2br') == '1') $pa_value = nl2br($pa_value);
-					
+
 					if ($nExists > 0)
 					{
-							
+
 						$this->db->UpdateQuery(WPSG_TBL_PRODUCTS_AT, array(
 							'value' => wpsg_q($pa_value)
 						), "`a_id` = '".wpsg_q($pa_id)."' AND `p_id` = '".wpsg_q($produkt_id)."' ");
-							
+
 					}
 					else
 					{
-							
+
 						$this->db->ImportQuery(WPSG_TBL_PRODUCTS_AT, array(
 							'value' => wpsg_q($pa_value),
@@ -227,73 +227,73 @@
 							'p_id' => wpsg_q($produkt_id)
 						));
-							
+
 					}
-	
-				}
-					
-			}
-	
+
+				}
+
+			}
+
 		} // public function produkt_save(&$produkt_id)
-	
+
 		public function produkt_save_translation(&$produkt_id, &$trans_id)
 		{
-			
+
 			$this->produkt_save($trans_id);
-			
+
 		} // public function produkt_save_translation(&$produkt_id, &$trans_id)
-		
+
 		public function produkt_createTranslation(&$produkt_id, &$trans_id)
 		{
-			
+
 			$arAttributeValues = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_AT."` WHERE `p_id` = '".wpsg_q($produkt_id)."'");
-			
+
 			foreach ($arAttributeValues as $a)
 			{
-				
+
 				$a['p_id'] = $trans_id;
-				
+
 				$this->db->ImportQuery(WPSG_TBL_PRODUCTS_AT, $a);
-				
-			}
-			
+
+			}
+
 		} // public function produkt_createTranslation(&$produkt_id, &$trans_id)
-		
-		public function produkt_copy(&$produkt_id, &$copy_id) { 
-			
+
+		public function produkt_copy(&$produkt_id, &$copy_id) {
+
 			// Wie bei der erstellung einer neuen Ãbersetzung ...
 			$this->produkt_createTranslation($produkt_id, $copy_id);
-			
+
 		} // public function produkt_copy(&$produkt_id, &$copy_id)
-				
+
 		public function product_addedit_content(&$product_content, &$product_data)
 		{
-		
+
 			// 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'),
 				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/produkt_addedit_content.phtml', false)
 			);
-		
+
 		} //public function product_addedit_content(&$product_content, &$product_data)
-		
-		public function product_bottom(&$produkt_id, $template_index) 
-		{ 
-			
+
+		public function product_bottom(&$produkt_id, $template_index)
+		{
+
 			$p_id = $produkt_id;
-			
+
 			if ($this->shop->isOtherLang())
 			{
-					
+
 				$produkt_trans_id = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($p_id)."' AND `lang_code` = '".wpsg_q($this->shop->getCurrentLanguageCode())."'");
-					
+
 				if (wpsg_isSizedInt($produkt_trans_id)) $p_id = $produkt_trans_id;
- 			
+
 			}
 
@@ -305,45 +305,24 @@
 					AT.`name`
 				FROM
-					`".WPSG_TBL_PRODUCTS_AT."` AS PAT 
+					`".WPSG_TBL_PRODUCTS_AT."` AS PAT
 						LEFT JOIN  `".WPSG_TBL_AT."` AS AT ON (PAT.`a_id` = AT.`id`)
-				WHERE 
+				WHERE
 					PAT.`p_id` = '".wpsg_q($p_id)."'
 				ORDER BY
 					AT.`pos` ASC, AT.`id` ASC
 			");
-			 
+
 			if (wpsg_isSizedArray($this->shop->view['wpsg_mod_produktattribute']['data']))
 			{
-			
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/produkt_bottom.phtml');
-				
-			}
-			
+
+			}
+
 		} // public function product_bottom(&$produkt_id, $template_index)
-				
+
 		public function basket_row(&$p, $i)
 		{
-			
-			$this->shop->view['wpsg_mod_produktattribute']['data'] = $this->db->fetchAssocField("
-				SELECT	
-					AT.`id` 
-				FROM 
-					`".WPSG_TBL_AT."` AS AT 
-				WHERE
-					AT.`autoshow` = '1'
-				ORDER BY
-					AT.`pos` ASC, AT.`id` ASC
-			");
-			
-			$this->shop->view['wpsg_mod_produktattribute']['id'] = $this->shop->getProduktID($p['id']);			
-			$this->shop->view['i'] = $i;
-			
-			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/basket_row.phtml');
-			
-		} // public function basket_row(&$p, $i)
-		
-		public function overview_row(&$p, $i)
-		{
-				
+
 			$this->shop->view['wpsg_mod_produktattribute']['data'] = $this->db->fetchAssocField("
 				SELECT
@@ -356,15 +335,15 @@
 					AT.`pos` ASC, AT.`id` ASC
 			");
-				
-			$this->shop->view['wpsg_mod_produktattribute']['id'] = $this->shop->getProduktID($p['id']);				
+
+			$this->shop->view['wpsg_mod_produktattribute']['id'] = $this->shop->getProduktID($p['id']);
 			$this->shop->view['i'] = $i;
-				
-			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/overview_row.phtml');
-				
-		} // public function overview_row(&$p, $i)
-		
-		public function overview_row2(&$p, $i)
-		{
-			
+
+			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/basket_row.phtml');
+
+		} // public function basket_row(&$p, $i)
+
+		public function overview_row(&$p, $i)
+		{
+
 			$this->shop->view['wpsg_mod_produktattribute']['data'] = $this->db->fetchAssocField("
 				SELECT
@@ -377,15 +356,15 @@
 					AT.`pos` ASC, AT.`id` ASC
 			");
-			
+
 			$this->shop->view['wpsg_mod_produktattribute']['id'] = $this->shop->getProduktID($p['id']);
 			$this->shop->view['i'] = $i;
-			
-			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/overview_row2.phtml');
-			
+
+			return $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/overview_row.phtml');
+
 		} // public function overview_row(&$p, $i)
-		
+
 		public function mail_row($i, $p)
 		{
-		
+
 			$this->shop->view['wpsg_mod_produktattribute']['data'] = $this->db->fetchAssocField("
 				SELECT
@@ -398,66 +377,66 @@
 					`pos` ASC, `id` ASC
 			");
-		
-			$this->shop->view['wpsg_mod_produktattribute']['id'] = $this->shop->getProduktID($p['id']);		
+
+			$this->shop->view['wpsg_mod_produktattribute']['id'] = $this->shop->getProduktID($p['id']);
 			$this->shop->view['i'] = $i;
-		
+
 			if ($this->shop->htmlMail === true)
 			{
-					
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/mail_row_html.phtml');
-					
+
 			}
 			else
 			{
-					
+
 				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/mail_row.phtml');
-					
-			} 
-		
+
+			}
+
 		} // public function mail_row($i, $p)
-		
-		public function replaceUniversalPlatzhalter(&$arReplace, $order_id = false, $kunden_id = false, $rechnung_id = false, $product_id = false, $product_index = false) 
-		{ 
-		
+
+		public function replaceUniversalPlatzhalter(&$arReplace, $order_id = false, $kunden_id = false, $rechnung_id = false, $product_id = false, $product_index = false)
+		{
+
 			if ($product_id !== false && $product_id > 0)
 			{
-			
+
 				$arAttribute = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_AT."` ORDER BY `pos` ASC, `id` ASC ");
-			
+
 				foreach ((array)$arAttribute as $pa_id)
 				{
-					
+
 					$arReplace['/%at_'.$pa_id.'%/'] = $this->getAttributeValue($product_id, $pa_id);
-					
-				}
-				
-			}
-						
+
+				}
+
+			}
+
 		} // public function replaceUniversalPlatzhalter(&$arReplace, $order_id = false, $kunden_id = false, $rechnung_id = false, $product_id = false, $product_index = false)
-				
-		public function notifyURL(&$url, &$produkt_key, &$menge, &$order_id, &$typ, &$arSend) 
-		{
-			
+
+		public function notifyURL(&$url, &$produkt_key, &$menge, &$order_id, &$typ, &$arSend)
+		{
+
 			if ($produkt_key == false) return false;
 			$product_id = $this->shop->getProduktID($produkt_key);
-			
+
 			if ($product_id !== false && $product_id > 0)
 			{
-				
+
 				$arAttribute = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_AT."` ORDER BY `pos` ASC, `id` ASC ");
-			
+
 				foreach ((array)$arAttribute as $pa_id)
 				{
-					
+
 					$arSend['at_'.$pa_id] = $this->getAttributeValue($product_id, $pa_id);
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 		} // public function notifyURL(&$url, &$produkt_key, &$menge, &$order_id, &$typ, &$arSend)
-		
+
 		/* Modulfunktionen */
-		
+
 		/**
 		 * Gibt alle MÃ¶glichen Werte fÃŒr ein Attribut zurÃŒck
@@ -465,15 +444,15 @@
 		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_SELECT, $strQueryP_WHERE, $strQueryP_JOIN, $strQueryP_HAVING, $strQueryP_ORDER) = wpsg_product::getQueryParts($arProductFilter);
-					
+
 			$strQueryJOIN .= $strQueryP_JOIN;
 			$strQueryWHERE .= $strQueryP_WHERE;
 			$strQueryHAVING .= $strQueryP_HAVING;
-			
+
 			$strQuery = "
 				SELECT
@@ -489,9 +468,9 @@
 					".$strQueryHAVING."
 			";
-			
+
 			return $this->db->fetchAssocField($strQuery);
-			
+
 		} // public function getAttributValues($attribute_id, $arProductFilter = array())
-		
+
 		/**
 		 * Gibt alle Produktattribute zurÃŒck
@@ -499,5 +478,5 @@
 		public function getProductattributs()
 		{
-			
+
 			$arReturn = $this->db->fetchAssoc("
 				SELECT
@@ -508,21 +487,21 @@
 					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)
 		{
-			
+
 			return $this->db->fetchAssoc("
 				SELECT
@@ -533,8 +512,8 @@
 				ORDER BY
 					A.`pos` ASC, A.`id` ASC
-			"); 
-			
+			");
+
 		} // public function getProductAttributeByProductId($product_id)
-		
+
 		/**
 		 * Gibt den Namen eines Attributs zurÃŒck
@@ -542,11 +521,11 @@
 		public function getAttributeLabel($pa_id)
 		{
-	 
+
 			$name = $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_AT."` WHERE `id` = '".wpsg_q($pa_id)."'");
-				
+
 			return __($name, 'wpsg');
-				
+
 		} // public function getAttributeLabel($pa_id)
-	
+
 		/**
 		 * Gibt den Wert fÃŒr ein Attribut zurÃŒck
@@ -554,32 +533,32 @@
 		public function getAttributeValue($p_id, $pa_id)
 		{
- 		
+
 			$p_id = $this->shop->getProduktId($p_id);
-			
+
 			if ($this->shop->isOtherLang())
 			{
-			
+
 				$produkt_trans_id = $this->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($p_id)."' AND `lang_code` = '".wpsg_q($this->shop->getCurrentLanguageCode())."'");
-					
+
 				if (wpsg_isSizedInt($produkt_trans_id)) $p_id = $produkt_trans_id;
-				
-			}
- 
+
+			}
+
 			$pa = $this->db->fetchRow("
-				SELECT 
+				SELECT
 					PA.`value`, A.`typ`, A.`auswahl`
-				FROM 
-					`".WPSG_TBL_PRODUCTS_AT."` AS PA 
+				FROM
+					`".WPSG_TBL_PRODUCTS_AT."` AS PA
 						LEFT JOIN `".WPSG_TBL_AT."` AS A ON (A.`id` = PA.`a_id`)
-				WHERE 
-					PA.`a_id` = '".wpsg_q($pa_id)."' AND 
+				WHERE
+					PA.`a_id` = '".wpsg_q($pa_id)."' AND
 					PA.`p_id` = '".wpsg_q($p_id)."'
 				ORDER BY
 					A.`pos` ASC, A.`id` ASC
 			");
-			 
+
 			if ($pa['typ'] == '1') /* RTE Feld */
 			{
-	
+
 				// Filter auf Feld anwenden (RTE)
 				// Den wpsgContentFilter deaktivieren um Rekursion zu vermeiden
@@ -587,13 +566,13 @@
 				$value = apply_filters('the_content', $pa['value']);
 				add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
-	
+
 			}
 			else if ($pa['typ'] == '3')
 			{
-	
+
 				// Checkbox
 				if ($pa['value'] == '1') $value = __('Ja', 'wpsg');
 				else $value = __('Nein', 'wpsg');
-	
+
 			}
 			else if ($pa['typ'] == '2')
@@ -605,13 +584,13 @@
 			else
 			{
-	
+
 				// Normales Textfeld
 				$value = $pa['value'];
 			}
-				
+
 			return $value;
-				
+
 		} // public function getAttributeValue($p_id, $pa_id)
-	
+
 		/**
 		 * Zeichnet die Liste der Produktattribute fÃŒr das Backend
@@ -619,13 +598,13 @@
 		public function pa_listAction()
 		{
-	
+
 			$this->shop->view['data'] = $this->db->fetchAssoc("
 				SELECT * FROM `".WPSG_TBL_AT."` ORDER BY `pos` ASC, `id` ASC
 			");
-				
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_produktattribute/list.phtml');
-				
+
 		} // private function pa_listAction()
-	
+
 	} // class wpsg_mod_produktattribute extends wpsg_mod_basic
 
Index: /mods/wpsg_mod_weight.class.php
===================================================================
--- /mods/wpsg_mod_weight.class.php	(revision 6331)
+++ /mods/wpsg_mod_weight.class.php	(revision 6332)
@@ -7,5 +7,5 @@
 	class wpsg_mod_weight extends wpsg_mod_basic
 	{
-		
+
 		var $lizenz = 2;
 		var $id = 95;
@@ -16,27 +16,27 @@
 		public function __construct()
 		{
-			
+
 			parent::__construct();
-			
+
 			$this->name 	= __('Produktgewicht', 'wpsg');
 			$this->group 	= __('Produkte', 'wpsg');
 			$this->desc 	= __('Erlaubt die Verwaltung von Gewichten pro Produkt.', 'wpsg');
-						
+
 		} // public function __construct()
-		
-		public function install() 
-		{ 
-			
+
+		public function install()
+		{
+
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
-			
+
 			/**
 			 * Posts Tabelle erweitern
-			 */ 
+			 */
 			$sql = "CREATE TABLE ".WPSG_TBL_PRODUCTS." (
 		   		weight DOUBLE(10,2) NOT NULL
 		   	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-   	   	 
-   			dbDelta($sql); 
-   			   			
+
+   			dbDelta($sql);
+
    			/**
    			 * Tabelle fÃŒr die bestellten Produkte
@@ -46,7 +46,7 @@
    				weight DOUBLE(10,2) NOT NULL
    			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-   			
+
    			dbDelta($sql);
-   			
+
    			/**
    			 * Tabelle fÃŒr die Bestellung erweitern, hier wird das Gesamtgewicht der Bestellung abgespeichert
@@ -55,7 +55,7 @@
    				weight DOUBLE(10,2) NOT NULL
    			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-   			
+
    			dbDelta($sql);
-   			
+
    			$this->shop->checkDefault('wpsg_mod_weight_unit', 'g');
    			$this->shop->checkDefault('wpsg_mod_weight_showProduct', '1');
@@ -64,19 +64,19 @@
    			$this->shop->checkDefault('wpsg_mod_weight_showOverview', '1');
    			$this->shop->checkDefault('wpsg_mod_weight_showOverviewProduct', '1');
-   			
-		} // public function install() 
-		
+
+		} // public function install()
+
 		public function settings_edit()
 		{
-			
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/settings_edit.phtml');
-			
+
 		} // public function settings_edit()
-		
+
 		public function settings_save()
 		{
-			
+
 			$this->shop->update_option('wpsg_mod_weight_unit', $_REQUEST['wpsg_mod_weight_unit']);
-			$this->shop->update_option('wpsg_mod_weight_showProduct', $_REQUEST['wpsg_mod_weight_showProduct']);			
+			$this->shop->update_option('wpsg_mod_weight_showProduct', $_REQUEST['wpsg_mod_weight_showProduct']);
 			$this->shop->update_option('wpsg_mod_weight_showBasket', $_REQUEST['wpsg_mod_weight_showBasket']);
 			$this->shop->update_option('wpsg_mod_weight_showAjaxDialog', $_REQUEST['wpsg_mod_weight_showAjaxDialog']);
@@ -84,195 +84,174 @@
 			$this->shop->update_option('wpsg_mod_weight_showOverview', $_REQUEST['wpsg_mod_weight_showOverview']);
 			$this->shop->update_option('wpsg_mod_weight_showOverviewProduct', $_REQUEST['wpsg_mod_weight_showOverviewProduct']);
-			
+
 			if ($this->shop->hasMod('wpsg_mod_request'))
 			{
-				
+
 				$this->shop->update_option('wpsg_mod_weight_showRequestPage', $_REQUEST['wpsg_mod_weight_showRequestPage']);
 				$this->shop->update_option('wpsg_mod_weight_showRequestPageProduct', $_REQUEST['wpsg_mod_weight_showRequestPageProduct']);
-				
-			}
-			
+
+			}
+
 			if ($this->shop->hasMod('wpsg_mod_productindex'))
 			{
 				$this->shop->update_option('wpsg_mod_weight_showProductindex', $_REQUEST['wpsg_mod_weight_showProductindex']);
 			}
-			
+
 		} // public function settings_save()
-		
-		public function basket_row(&$p, $i) 
-		{ 
+
+		public function basket_row(&$p, $i)
+		{
 
 			if ($this->shop->get_option('wpsg_mod_weight_showBasketProduct') != '1') return;
-			
+
 			$this->shop->view['weight'] = $p['weight'];
 
-			$this->shop->view['i'] = $i;			
-			
+			$this->shop->view['i'] = $i;
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/basket_row.phtml');
-			
+
 		} // public function basket_row(&$p, $i)
 
-		public function basket_row_end(&$basket_view) 
-		{ 
-			
+		public function basket_row_end(&$basket_view)
+		{
+
 			if ($this->shop->get_option('wpsg_mod_weight_showBasket') != '1') return;
 
 			$this->shop->view['wpsg_mod_weight']['weight'] = $basket_view['basket']['sum']['weight'];
-			
+
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/basket_row_end.phtml');
-			
+
 		} // public function basket_row_end(&$basket)
-		
-		public function overview_row(&$p, $i) 
-		{ 
-			
+
+		public function overview_row(&$p, $i)
+		{
+
 			if ($this->shop->get_option('wpsg_mod_weight_showOverviewProduct') != '1') return;
-			
-			$this->shop->view['i'] = $i;			
-			$this->shop->view['weight'] = $p['weight'];
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/overview_row.phtml');
-			
-		} // public function overview_row(&$p, $i) 
-
-		public function overview_row2(&$p, $i)
-		{
-			
-			if ($this->shop->get_option('wpsg_mod_weight_showOverviewProduct') != '1') return;
-			
+
 			$this->shop->view['i'] = $i;
 			$this->shop->view['weight'] = $p['weight'];
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/overview_row2.phtml');
-			
+
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/overview_row.phtml');
+
 		} // public function overview_row(&$p, $i)
-		
-		public function overview_row_end(&$overview_view) { 
-			
+
+		public function overview_row_end(&$overview_view) {
+
 			if ($this->shop->get_option('wpsg_mod_weight_showOverview') != '1') return;
-			
+
 			$this->shop->view['wpsg_mod_weight']['weight'] = $overview_view['basket']['sum']['weight'];
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/overview_row_end.phtml');			
-			
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/overview_row_end.phtml');
+
 		} // public function overview_row_end(&$overview_view)
-		
-		public function overview_row_end2(&$overview_view) {
-			
-			if ($this->shop->get_option('wpsg_mod_weight_showOverview') != '1') return;
-			
-			$this->shop->view['wpsg_mod_weight']['weight'] = $overview_view['basket']['sum']['weight'];
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/overview_row_end2.phtml');
-			
-		} // public function overview_row_end(&$overview_view)
-		
+
 		public function product_addedit_content(&$product_content, &$product_data)
-		{ 
-			
+		{
+
 			if (isset($_REQUEST['wpsg_lang'])) return;
-			
+
 			if (!array_key_exists('stock', $product_content))
 			{
-				
+
 				$this->shop->view['arSubAction']['stock'] = array(
 					'title' => __('Bestand / MaÃe', 'wpsg'),
 					'content' => ''
 				);
-				
-			}
-						
-			$this->shop->view['wpsg_mod_weight']['weight'] = wpsg_getFloat($product_data['weight']);			
+
+			}
+
+			$this->shop->view['wpsg_mod_weight']['weight'] = wpsg_getFloat($product_data['weight']);
 			$this->shop->view['arSubAction']['stock']['content'] .= $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/product_addedit_content.phtml', false);
-			
+
 		} // public function produkt_edit_allgemein(&$produkt_data)
 
 		public function produkt_save_before(&$produkt_data)
-		{ 
-			
+		{
+
 			$produkt_data['weight'] = wpsg_tf($_REQUEST['wpsg_mod_weight']['weight']);
-			
+
 		} // public function produkt_save_before(&$produkt_data)
-		
+
 		public function loadProduktArray(&$product_data)
 		{
-			
+
 			$product_data['weight'] = $this->getWeight($product_data['id']);
-			
+
 		}
-						
+
 		public function basket_toArray(&$produkt, $backend = false, $noMwSt = false)
 		{
-			
+
 			$produkt['weight_one'] = $this->getWeight($produkt['id']);
 			$produkt['weight'] = $this->getWeight($produkt['id']) * $produkt['menge'];
-		 
+
 		}
-		 		
-		public function basket_toArray_preshippayment(&$basket, &$arBasket) 
-		{  
-			
+
+		public function basket_toArray_preshippayment(&$basket, &$arBasket)
+		{
+
 			if ($basket->loadFromSession)
 			{
-			
+
 				$weight_sum = 0;
-				
+
 				foreach ($arBasket['produkte'] as $k => $p)
 				{
-					
+
 					$weight_sum += $p['weight'];
-					
+
 				}
-				
+
 				$arBasket['sum']['weight'] = $weight_sum;
-				
+
 			}
 			else if ($basket->o_id > 0)
 			{
-				
+
 				$order_data = $this->shop->cache->loadOrder($basket->o_id);
-				
+
 				$arBasket['sum']['weight'] = $order_data['weight'];
-				
-			}
-		
+
+			}
+
 		} // public function basket_toArray_final(&$basket, &$arBasket)
-				
-		public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order) { 
-			
+
+		public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order) {
+
 			$data['weight'] = $arBasket['sum']['weight'];
-			
+
 		} // public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order)
-		
-		public function basket_save_product(&$data, &$product_data, $finish_order) 
-		{ 
+
+		public function basket_save_product(&$data, &$product_data, $finish_order)
+		{
 
 			$data['weight'] = $product_data['weight'];
 
 		} // public function basket_save_product(&$data, &$product_data)
-		
+
 		/* --- */
-		
+
 		public function getWeight($product_key)
 		{
-			 
+
 			$product_data_db = $this->shop->cache->loadProduct($this->shop->getProduktId($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'];
-				
+
 			}
 			else
 			{
-			
+
 				$weight = $product_data_db['weight'];
-			
-			}
-			
+
+			}
+
 			return $weight;
-			
+
 		} // public function getWeight($produkt_key)
-		 		
+
 	} // class wpsg_mod_weight extends wpsg_mod_basic
 
Index: /views/mods/mod_abo/overview_row.phtml
===================================================================
--- /views/mods/mod_abo/overview_row.phtml	(revision 6331)
+++ /views/mods/mod_abo/overview_row.phtml	(revision 6332)
@@ -2,12 +2,19 @@
 
 	/**
-	 * Template fÃŒr die Anzeige der Abo-VerlÃ€ngerung im Warenkorb
+	 * Template fÃŒr die Anzeige der Abo-VerlÃ€ngerung im Overview
 	 */
 
 ?>
-<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
-	<td><?php echo __('Abo VerlÃ€ngerung', 'wpsg'); ?>:</td>
-	<td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
-		<?php echo wpsg_translate(__('VerlÃ€ngerung zu Bestellung #1# (#2# Tage)', 'wpsg'), $this->view['wpsg_mod_abo']['order']['onr'], $this->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge']); ?>
-	</td>
-</tr>
+<div class="product_info">
+	<div 
+	<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
+		<?php echo __("Abo VerlÃ€ngerung", "wpsg"); ?>
+	</div>
+	<div class="valuel">
+		<?php echo wpsg_translate(__('VerlÃ€ngerung zu Bestellung #1# (#2# Tage)', 'wpsg'), $this->view['wpsg_mod_abo']['order']['onr'], $this->view['wpsg_mod_abo']['wpsg_mod_abo_durration_menge']); ?>	
+	</div>
+	<div class="dummyr">
+		<?php echo __('&nbsp;'); ?>
+	</div>
+	
+</div>
Index: /views/mods/mod_basketteaser/basket_row.phtml
===================================================================
--- /views/mods/mod_basketteaser/basket_row.phtml	(revision 6331)
+++ /views/mods/mod_basketteaser/basket_row.phtml	(revision 6332)
@@ -23,10 +23,10 @@
     </div>
     <div class="valuer">
-		<input name="wpsg_mod_basketteaser_row[<?php echo $this->view['data']['id']; ?>]" type="text" size="3" value="1" />
+		<input name="wpsg_mod_basketteaser_row[<?php echo $this->view['data']['id']; ?>]" type="text" size="3" value="0" />
     </div>
     <div class="valuer">
 		<a href="#" onclick="return wpsg_mod_basketteaser_add(<?php echo $this->view['data']['id']; ?>);"><?php echo __('HinzufÃŒgen', 'wpsg'); ?></a>
     </div>
-    
+
 </div>
 <br />
Index: /views/mods/mod_deliverytime/overview_row.phtml
===================================================================
--- /views/mods/mod_deliverytime/overview_row.phtml	(revision 6331)
+++ /views/mods/mod_deliverytime/overview_row.phtml	(revision 6332)
@@ -6,25 +6,30 @@
 
 ?>
-<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
-	<td><?php echo __('Lieferzeit', 'wpsg'); ?>:</td>
-	<td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>" class="wpsg_cell_deliverytime_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
+<div class="product_info">
+	<div 
+	<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
+		<?php echo __("Lieferzeit", "wpsg"); ?>
+	</div>
+	<div class="valuel">
 		<?php if (wpsg_isSizedInt($this->view['data']['wpsg_mod_deliverytime_deliverytime'])) { /* Lieferzeit > 0 im Produkte */ ?>
-		 	<?php echo $this->view['wpsg_mod_deliverytime']['deliverytime'] ?>
+			<?php echo $this->view['wpsg_mod_deliverytime']['deliverytime'] ?>
 		<?php } else if (wpsg_isSizedInt($this->get_option('wpsg_mod_deliverytime_mode_days_default')) && $this->view['data']['wpsg_mod_deliverytime_deliverytime'] != '0') { /* Lieferzeit > 0 Global */ ?>
-		  	<?php echo wpsg_translate(__('#1# Tag(e)', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_mode_days_default')); ?>
+				<?php echo wpsg_translate(__('#1# Tag(e)', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_mode_days_default')); ?>
 		<?php } else { /* Sonst sofort lieferbar */ ?>
 		 	<?php echo wpsg_translate(__('sofort lieferbar (0 Tage)', 'wpsg')); ?>
 		<?php } ?>
-	</td>	
-</tr>
-
+	</div>
+	<div class="dummyr">
+		<?php echo __('&nbsp;'); ?>
+	</div>
+	
+</div>
 <?php /* Hinweistext fÃŒr VerzÃ¶gerung in der Lieferzeit */ ?>
 <?php if ($this->get_option('wpsg_mod_deliverytime_delay') == '1') { ?>
-	<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">	
-		<td colspan="3">
-			<div class="wpsg_mod_deliverytime_delay">
-				<?php echo wpsg_translate(__('Aufgrund von #1# kann es zu VerzÃ¶gerungen von #2# Tage in der Zustellung kommen.', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_delayText'), $this->get_option('wpsg_mod_deliverytime_delayTime')); ?>
-			</div>
-		</td>
-	</tr>
+<div class="product_info">
+	<div class="fulll">
+		<?php echo wpsg_translate(__('Aufgrund von #1# kann es zu VerzÃ¶gerungen von #2# Tage in der Zustellung kommen.', 'wpsg'), $this->get_option('wpsg_mod_deliverytime_delayText'), $this->get_option('wpsg_mod_deliverytime_delayTime')); ?>
+
+	</div>
+</div>
 <?php } ?>
Index: /views/mods/mod_productvariants/overview_row.phtml
===================================================================
--- /views/mods/mod_productvariants/overview_row.phtml	(revision 6332)
+++ /views/mods/mod_productvariants/overview_row.phtml	(revision 6332)
@@ -0,0 +1,30 @@
+ <?php
+
+	/**
+	 * Render ein Variantenprodukt in der BestellÃŒbersicht (basket.phtml)
+	 */
+
+?>
+<?php //wpsg_debug($this->view['variante']) ?>
+<div class="product_info">
+	<div 
+	<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
+		<?php echo __("Variante", "wpsg"); ?>
+	</div>
+	<div class="valuel">
+		<?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 } ?>
+	</div>
+	<div class="dummyr">
+		<?php echo __('&nbsp;'); ?>
+	</div>
+	
+</div>
Index: /views/mods/mod_productvars/overview_row.phtml
===================================================================
--- /views/mods/mod_productvars/overview_row.phtml	(revision 6331)
+++ /views/mods/mod_productvars/overview_row.phtml	(revision 6332)
@@ -7,9 +7,13 @@
 ?>
 <?php if (is_array($this->view['wpsg_mod_productvars']['data']) && sizeof($this->view['wpsg_mod_productvars']['data']) > 0) { ?>
+
 <?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
-<tr class="wpsg_<?php echo (($this->view['wpsg_mod_productvars']['i'] == 0)?'odd':'even'); ?>">
-	<td><?php echo __($pv['name'], 'wpsg'); ?>:</td>
-	<td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>">
-		<?php if ($pv['typ'] == '1') { // Auswahl ?>
+<div class="product_info">
+	<div 
+	<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
+		<?php echo __($pv['name'], 'wpsg'); ?><?php if ($pv['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>
+	</div>
+	<div class="valuel">
+		<?php if ($pv['typ'] == '1') { // Auswahlfeld ?>		
 			<?php if ($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']] == 'not_set') { ?>
 			<?php echo __('Nicht angegeben', 'wpsg'); ?>
@@ -26,6 +30,10 @@
 			<?php } ?>
 		<?php } ?>
-	</td>
-</tr>
+	</div>
+	<div class="dummyr">
+		<?php echo __('&nbsp;'); ?>
+	</div>
+	
+</div>
 <?php } ?>
 <?php } ?>
Index: /views/mods/mod_produktattribute/overview_row.phtml
===================================================================
--- /views/mods/mod_produktattribute/overview_row.phtml	(revision 6331)
+++ /views/mods/mod_produktattribute/overview_row.phtml	(revision 6332)
@@ -8,10 +8,16 @@
 
 <?php foreach ((array)$this->view['wpsg_mod_produktattribute']['data'] as $pa_id) { ?>
-					
-<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">	
-	<td colspan="1"><?php echo __('Attribut', 'wpsg'); ?>:</td>
-	<td class="wpsg_cell_produktattribute_value" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>">
+<div class="product_info">
+	<div 
+	<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
+		<?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeLabel', array($pa_id)); ?>
+	</div>
+	<div class="valuel">
 		<?php echo $this->callMod('wpsg_mod_produktattribute', 'getAttributeValue', array($this->view['wpsg_mod_produktattribute']['id'], $pa_id)); ?>
-	</td>
-</tr>
+	</div>
+	<div class="dummyr">
+		<?php echo __('&nbsp;'); ?>
+	</div>
+	
+</div>
 <?php }?>
Index: /views/mods/mod_weight/overview_row.phtml
===================================================================
--- /views/mods/mod_weight/overview_row.phtml	(revision 6331)
+++ /views/mods/mod_weight/overview_row.phtml	(revision 6332)
@@ -6,8 +6,15 @@
 
 ?>
-<tr class="wpsg_<?php echo (($this->view['i'] % 2 == 0)?'odd':'even'); ?>">
-	<td ><?php echo __('Gewicht', 'wpsg'); ?>:</td>
-	<td colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'2':'1'); ?>" class="wpsg_cell_weight_value">
-		<?php echo wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
-	</td>
-</tr>
+<div class="product_info">
+	<div 
+	<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
+		<?php echo __("Gewicht", "wpsg"); ?>
+	</div>
+	<div class="valuer">
+		<?php echo wpsg_ff($this->view['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>	
+	</div>
+	<div class="dummyr">
+		<?php echo __('&nbsp;'); ?>
+	</div>
+	
+</div>
Index: /views/mods/mod_weight/overview_row_end.phtml
===================================================================
--- /views/mods/mod_weight/overview_row_end.phtml	(revision 6331)
+++ /views/mods/mod_weight/overview_row_end.phtml	(revision 6332)
@@ -6,10 +6,13 @@
 
 ?>
-<tr class="wpsg_row_weight wpsg_row_small">
-	<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_weight_label">
+<div class="overview_sum_row">
+	<div class="title">
 		<?php echo __('Gesamtgewicht', 'wpsg'); ?>:
-	</td>
-	<td class="wpsg_cell_weight_value">
+	</div>
+	<div class="value">
 		<?php echo wpsg_ff($this->view['wpsg_mod_weight']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?>
-	</td>
-</tr>
+	</div>
+    <div class="value">
+        <?php echo __('&nbsp;'); ?>
+    </div>
+</div>
Index: /views/warenkorb/basket.phtml
===================================================================
--- /views/warenkorb/basket.phtml	(revision 6331)
+++ /views/warenkorb/basket.phtml	(revision 6332)
@@ -38,5 +38,5 @@
 		<div class="basket_product_wrap">
 		
-			<?php $i = 0; foreach ($this->view['basket']['produkte'] as $k => $product_data) { $i ++; ?>		
+			<?php $i = 0; foreach ($this->view['basket']['produkte'] as $k => $product_data) { $i ++; ?>
 
 			<div class="basket_product_row">
@@ -44,8 +44,8 @@
 				<?php $this->view['$bPicture'] = false; ?>
 
-				<?php if ($this->get_option('wpsg_mod_produktbilder_basketimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) { 
-					
-					if (wpsg_isSizedString($product_data['varianten_image'])) $arImages = array($product_data['varianten_image']);						
-					else $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktID($product_data['id']))); 
+				<?php if ($this->get_option('wpsg_mod_produktbilder_basketimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) {
+					
+					if (wpsg_isSizedString($product_data['varianten_image'])) $arImages = array($product_data['varianten_image']);
+					else $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktID($product_data['id'])));
 					
 				?>
@@ -71,5 +71,4 @@
 					echo "<img src=".$url." alt='' />";
 					?>
-					
 					<?php } ?>
 				</div>
@@ -138,5 +137,5 @@
 					<?php } ?>
 
-					<?php $strBasketRow = ''; ob_start(); $this->callMods('basket_row', array(&$product_data, $i)); $strBasketRow = ob_get_contents(); ob_end_clean(); ?>	
+					<?php $strBasketRow = ''; ob_start(); $this->callMods('basket_row', array(&$product_data, $i)); $strBasketRow = ob_get_contents(); ob_end_clean(); ?>
 					<?php echo $strBasketRow; ?>
 					
@@ -144,5 +143,4 @@
 				
 			</div>
-			<div class="wpsg_spacer"></div>
 			
 			<?php }   // foreach products ?>
@@ -162,5 +160,5 @@
 					<div class="wpsg_basket_removelink">
 						<a href="<?php echo str_replace('&', '&amp;', $this->getRemoveLinkURL('gs')); ?>" title="<?php echo __('Gutschein aus dem Warenkorb entfernen', 'wpsg'); ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass sie den Gutschein aus dem Warenkorb entfernen mÃ¶chten?', 'wpsg'); ?>');">
-							<img src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('LÃ¶schen', 'wpsg'); ?>" />					
+							<img src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('LÃ¶schen', 'wpsg'); ?>" />
 						</a>
 					</div>
@@ -209,5 +207,5 @@
 					<?php } else { ?>
 						<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
-						<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:					
+						<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:				
 						<?php } else { ?>
 						<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
@@ -253,5 +251,5 @@
 						
 							echo __('anteilig', 'wpsg');
-												
+						
 						}
 						else if (array_key_exists($this->view['basket']['checkout']['shipping'], $this->arShipping))
@@ -265,5 +263,5 @@
 				</div>
 				<div class="value">
-					<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?> 
+					<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>
 				</div>
 			</div>
@@ -275,6 +273,6 @@
 						<?php echo __('Zahlungsart:', 'wpsg').'&nbsp;&nbsp;&nbsp;&nbsp;'; ?>
 						<?php if (sizeof($this->arPayment) > 1) { ?>
-						<select name="set_payment" class="wpsg_form_submit set_payment">	
-							<option><?php echo __('Bitte wÃ€hlen', 'wpsg')?></option>		
+						<select name="set_payment" class="wpsg_form_submit set_payment">
+							<option><?php echo __('Bitte wÃ€hlen', 'wpsg')?></option>
 							<?php foreach ($this->arPayment as $p_id => $p) { ?>
 							<option <?php echo (($p['id'] == $this->view['basket']['checkout']['payment'])?'selected="selected"':''); ?> value="<?php echo $p_id; ?>"><?php echo wpsg_hspc($p['name']); ?></option>
@@ -344,5 +342,5 @@
 					<div class="basket_sum_row">
 						<div class="title2">
-							<?php echo wpsg_translate(__('zuzÃŒglich MwSt. (#1#)', 'wpsg'), __($mwst['name'], 'wpsg')); ?>:										
+							<?php echo wpsg_translate(__('zuzÃŒglich MwSt. (#1#)', 'wpsg'), __($mwst['name'], 'wpsg')); ?>:
 						</div>
 						<div class="value">
Index: /views/warenkorb/overview.phtml
===================================================================
--- /views/warenkorb/overview.phtml	(revision 6331)
+++ /views/warenkorb/overview.phtml	(revision 6332)
@@ -7,5 +7,5 @@
 
 	//wpsg_debug($this->view['basket']);
- 
+
 ?>
 <div class="wpsg wpsg_overview">
@@ -21,21 +21,21 @@
 
 		<h2><?php echo __('Zusammenfassung', 'wpsg'); ?></h2>
-		
+
 		<div class="wpsg_spacer"></div>
-		
+
 		<?php if (!$this->hasMod('wpsg_mod_ordercondition')) { ?>
 		<div class="wpsg_agb">
 			<label>
 				<input type="checkbox" value="1" name="wpsg[agb]" />
-				<?php echo wpsg_translate(__('Ich habe die #1# des Anbieters gelesen und erklÃ€re mit dem Absenden der Bestellung mein EinverstÃ€ndnis. Die #2# habe ich zur Kenntnis genommen.', 'wpsg'), 
-					'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_AGB).'">'.__('AGB', 'wpsg').'</a>', 
-					'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_WIDERRUF).'">'.__('Widerrufsbelehrung', 'wpsg').'</a>'); 
+				<?php echo wpsg_translate(__('Ich habe die #1# des Anbieters gelesen und erklÃ€re mit dem Absenden der Bestellung mein EinverstÃ€ndnis. Die #2# habe ich zur Kenntnis genommen.', 'wpsg'),
+					'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_AGB).'">'.__('AGB', 'wpsg').'</a>',
+					'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_WIDERRUF).'">'.__('Widerrufsbelehrung', 'wpsg').'</a>');
 				?>
 			</label>
-		</div> 
+		</div>
 		<?php } ?>
-		
+
 		<?php $this->callMods('overview_top', array(&$this->view['basket'])); ?>
-		
+
 		<div class="shippayment">
 			<div class="subtitle"><?php echo __('Zahlung/Versand', 'wpsg'); ?>&nbsp;
@@ -45,9 +45,9 @@
 			<div class="shipping"><?php echo wpsg_hspc($this->arShipping[$this->view['basket']['checkout']['shipping']]['name']); ?></div>
 		</div>
-		
+
 		<?php
 			$arAnrede = explode('|', $this->get_option('wpsg_admin_pflicht')['anrede_auswahl']);
 		?>
-		
+
 		<?php if (wpsg_getStr($this->view['basket']['checkout']['diff_shippingadress']) == '1') { ?>
 		<div class="anschrift">
@@ -55,5 +55,5 @@
 				<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ãndern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
 			</div>
-			<?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>			
+			<?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>
 			<?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?><br />
 			<?php } ?>
@@ -63,13 +63,13 @@
 			<?php if (wpsg_isSizedArray($this->view['basket']['land'])) { ?>
 			<?php echo wpsg_hspc($this->view['basket']['land']['name']); ?>
-			<?php } ?>					
-		</div>		
+			<?php } ?>
+		</div>
 		<div class="wpsg_clear"></div><br />
-					
+
 		<div class="anschrift">
 			<div class="subtitle"><?php echo __('Lieferanschrift', 'wpsg'); ?>&nbsp;
 				<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ãndern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_CHECKOUT)); ?></span>
 			</div>
-			<?php if (trim($this->view['basket']['checkout']['shipping_firma']) != '') { ?>			
+			<?php if (trim($this->view['basket']['checkout']['shipping_firma']) != '') { ?>
 			<?php echo wpsg_hspc($this->view['basket']['checkout']['shipping_firma']); ?><br />
 			<?php } ?>
@@ -79,10 +79,10 @@
 			<?php if (wpsg_isSizedArray($this->view['basket']['shipping_land'])) { ?>
 			<?php echo wpsg_hspc($this->view['basket']['shipping_land']['name']); ?>
-			<?php } ?>		
-		</div>		
+			<?php } ?>
+		</div>
 		<div class="wpsg_clear"></div><br />
-		
+
 		<?php } else { ?>
-					
+
 		<div class="anschrift">
 			<div class="subtitle"><?php echo __('Liefer- und Rechnungsanschrift', 'wpsg'); ?>&nbsp;
@@ -93,5 +93,5 @@
 				<?php } ?>
 			</div>
-			<?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>			
+			<?php if (trim($this->view['basket']['checkout']['firma']) != '') { ?>
 			<?php echo wpsg_hspc($this->view['basket']['checkout']['firma']); ?><br />
 			<?php } ?>
@@ -101,208 +101,311 @@
 			<?php if (wpsg_isSizedArray($this->view['basket']['land'])) { ?>
 			<?php echo wpsg_hspc($this->view['basket']['land']['name']); ?>
-			<?php } ?>							
-		</div>		
+			<?php } ?>
+		</div>
 		<div class="wpsg_clear"></div><br />
 		<?php } ?>
-		
+
 		<?php if (wpsg_isSizedString($this->view['basket']['checkout']['ustidnr'])) { ?>
 		<?php echo __('UStIdNr.', 'wpsg'); ?>: <?php echo wpsg_hspc($this->view['basket']['checkout']['ustidnr']); ?><br /><br />
 		<?php } ?>
-	
+
 		<div class="subtitle">
 			<?php echo __('Bestellte Produkte', 'wpsg'); ?>&nbsp;
 			<span class="sublink"><?php echo wpsg_translate(__('[<a href="#1#">Ãndern</a>]', 'wpsg'), $this->getURL(wpsg_ShopController::URL_BASKET)); ?></span>
 		</div>
-		
+
 		<div class="wpsg_table_wrap">
-			<table class="wpsg_produkte">
-				<tr class="wpsg_kopf">
-					<th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>					
-					<th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
+
+			<?php $i = 0; foreach ($this->view['basket']['produkte'] as $k => $product_data) { $i ++; ?>
+
+			<div class="overview_product_row">
+
+				<?php $this->view['$bPicture'] = false; ?>
+
+				<?php if ($this->get_option('wpsg_mod_produktbilder_basketimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) {
+
+					if (wpsg_isSizedString($product_data['varianten_image'])) $arImages = array($product_data['varianten_image']);
+					else $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktID($product_data['id'])));
+
+				?>
+				<div class="productimage">
+					<?php if (wpsg_isSizedString($arImages[0]['guid'])) { ?>
+
+					<?php
+					if (isset($product_data['product_key'])) {
+						$arr = $this->callMod('wpsg_mod_productvariants', 'getKombiVariImages', array($product_data['product_key']));
+						if (wpsg_isSizedArray($arr))
+						{
+							$ais = wp_get_attachment_image_src($arr[0]['post_id'], 'thumbnail');
+							$url = $ais[0];
+						}
+						else
+						{
+							$url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($product_data['productkey'], 'thumbnail'));
+						}
+					} else {
+						$url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($product_data['productkey'], 'thumbnail'));
+					}
+					if (wpsg_isSizedString($url)) $this->view['$bPicture'] = true;
+					echo "<img src=".$url." alt='' />";
+					?>
+
+					<?php } ?>
+				</div>
+				<?php } ?>
+
+				<div class="product_content">
+
+					<div class="product_name">
+						<?php if ($this->getProduktLink($product_data)) { ?>
+						<a href="<?php echo $this->getProduktLink($product_data); ?>"><?php echo wpsg_hspc((($product_data['detailname'] != '')?$product_data['detailname']:$product_data['name'])); ?></a>
+						<?php } else { ?>
+						<?php echo wpsg_hspc((($product_data['detailname'] != '')?$product_data['detailname']:$product_data['name'])); ?>
+						<?php } ?>
+
+						<?php if (wpsg_isSizedString($product_data['shortdesc'])) { ?>
+						<div class="product_shortdesc"><?php echo $product_data['shortdesc']; ?></div>
+						<?php } ?>
+
+					</div>
+
+					<div class="product_action">
+						<div class="title">
+							<?php echo __("Anzahl", "wpsg"); ?>
+						</div>
+						<div class="amount">
+							<?php echo wpsg_hspc($product_data['menge']); ?>
+						</div>
+					</div>
+					<div class="product_action">
+						<div class="title">
+							<?php echo __("Einzelpreis", "wpsg"); ?>
+						</div>
+						<div class="price">
+							<?php echo wpsg_ff($product_data['preis'], $this->get_option('wpsg_currency')); ?>
+						</div>
+					</div>
+					<div class="product_action">
+						<div class="title">
+							<?php echo __("Gesamtpreis", "wpsg"); ?>
+						</div>
+						<div class="price_total">
+							<?php echo wpsg_ff($product_data['menge'] * $product_data['preis'], $this->get_option('wpsg_currency')); ?>
+						</div>
+					</div>
+
 					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-					<th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+					<div class="product_info">
+						<div
+						<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
+							<?php echo __("MwSt.", "wpsg"); ?>
+						</div>
+						<div class="valuer">
+							<?php echo wpsg_ff($product_data['mwst_value'], ' %'); ?>
+						</div>
+						<div class="dummyr">
+							<?php echo __('&nbsp;'); ?>
+						</div>
+
+					</div>
 					<?php } ?>
-					<th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
-				</tr>
-				<?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
-				<?php $strOverviewRow = ''; ob_start(); $this->callMods('overview_row', array(&$p, $i)); $strOverviewRow = ob_get_contents(); ob_end_clean(); ?>
-				<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
-					<td class="wpsg_cell_menge" rowspan="<?php echo 2 + substr_count($strOverviewRow, '<tr'); ?>">
-						<?php echo wpsg_hspc($p['menge']); ?>			
-					</td>					
-					<td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+
+					<?php $strOverviewRow= ''; ob_start(); $this->callMods('overview_row', array(&$product_data, $i)); $strOverviewRow= ob_get_contents(); ob_end_clean(); ?>
+					<?php echo $strOverviewRow; ?>
+
+				</div>
+
+			</div>
+			<?php }   // foreach products ?>
+
+		<div class="overview_sum_wrap">
+
+			<?php $bLine = false; ?>
+			<?php if (isset($this->view['basket']['gs'])) { $bLine = true; ?>
+				<div class="overview_sum_row">
+					<div class="titlegs">
+						<?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?>
+					</div>
+				</div>
+				<div class="overview_sum_row">
+					<div class="delgs">&nbsp;</div>
+					<div class="colgsl">1</div>
+					<div class="colgsl">
+						<?php if ($this->view['basket']['gs']['calc'] == 'p') { ?>
+						<?php echo '-'.wpsg_ff($this->view['basket']['gs']['value'], '%'); ?>
+						<?php } else { ?>
+						<?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?>
+						<?php } ?>
+					</div>
+				<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+				<div class="colgsr"><?php echo __('anteilig', 'wpsg'); ?></div>
+				<?php } ?>
+				<div class="colgsr"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></div>
+			</div>
+			<?php } ?>
+
+			<div class="overview_sum_row">
+				<?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
+					<div class="title">
+						<?php echo __("Rabatt", "wpsg"); $bLine = true; ?>:
+					</div>
 					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-					<td class="wpsg_cell_mwst"><?php echo wpsg_ff($p['mwst_value']); ?> %</td>				
+						<div class="value">
+							<?php echo __('anteilig', 'wpsg'); ?>
+						</div>
 					<?php } ?>
-					<td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
-				</tr>
-				<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
-					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_name">
-						<?php if ($this->get_option('wpsg_mod_produktbilder_overviewimage') == '1' && $this->hasMod('wpsg_mod_produktbilder')) { 
-							
-							if (wpsg_isSizedString($p['varianten_image'])) $arBilder = array($p['varianten_image']);						
-							else $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktID($p['id'])));  
-							
-						?>
-						<div class="wpsg_overview_productimage">
-							
-							<?php if (wpsg_isSizedString($arBilder[0]['guid'])) { ?>
-							
-							<?php
-							if (isset($p['product_key'])) {
-								$img_url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($p['product_key'], 'thumbnail'));
-							} else {
-								$img_url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($p['productkey'], 'thumbnail'));
-							} ?>
-							<?php if ($img_url !== false) { ?>
-							   <img class="theme_border_color_2 theme_color_2" src="<?php echo $img_url; ?>" alt="<?php echo wpsg_translate(__('Produktbilder von Produkte #1#', 'wpsg'), $p['name']); ?>" />
-							<?php } ?>
-							
-							<?php } ?>
-						</div>
+						<div class="value">
+							<?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+						</div>
+				<?php } ?>
+			</div>
+
+			<?php if ($bLine == true) { ?>
+				<div class="wpsg_spacer"></div>
+			<?php } ?>
+
+			<div class="overview_sum_row">
+				<div class="title2">
+					<?php if ($this->get_option("wpsg_kleinunternehmer") == "1") { ?>
+						<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+					<?php } else { ?>
+						<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+						<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
+						<?php } else { ?>
+						<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
 						<?php } ?>
-						<?php if ($this->getProduktLink($p)) { ?>
-						<a href="<?php echo $this->getProduktLink($p); ?>"><?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?></a>
-						<?php } else { ?>
-						<?php echo wpsg_hspc((($p['detailname'] != '')?$p['detailname']:$p['name'])); ?>
-						<?php } ?>	
-					</td>
-				</tr>
-				<?php echo $strOverviewRow; ?>
-				<?php } ?>
-				<?php  if (isset($this->view['basket']['gs'])) { ?>
-				<tr class="wpsg_row_gutschein"> 
-					<td class="wpsg_cell_menge" rowspan="2">1</td>					
-					<td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
-					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-					<td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
 					<?php } ?>
-					<td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
-				</tr>
-				<tr class="wpsg_row_gutschein">				
-					<td class="wpsg_cell_name" colspan="<?php echo $this->view['colspan']; ?>"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
-				</tr>
-				<?php } ?>
-				<?php if (isset($this->view['basket']['sum']['preis_rabatt']) && wpsg_tf($this->view['basket']['sum']['preis_rabatt']) > 0) { ?>
-				<tr class="wpsg_row_discount">
-					<td class="wpsg_cell_menge" rowspan="2"></td>					
-					<td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?></td>					
-					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-					<td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
-					<?php } ?>
-					<td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?></td>
-				</tr>
-				<tr class="wpsg_row_discount">
-					<td class="wpsg_cell_name" colspan="<?php echo $this->view['colspan']; ?>"><?php echo __('Rabatt', 'wpsg'); ?></td>
-				</tr>
-				<?php } ?>
-				<tr class="wpsg_row_summe">
-					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
-						<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
-							<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
-						<?php } else { ?>					
-							<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
-							<?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
-							<?php } else { ?>
-							<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>:
-							<?php } ?>
-						<?php } ?>
-					</td>
-					<td class="wpsg_cell_summe_value">
-						<?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-					</td>
-				</tr>	
-				<?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
-				<tr class="wpsg_row_shipping">
-					<td colspan="2" class="wpsg_cell_shipping_label">
+				</div>
+				<div class="value">
+					<?php echo wpsg_ff($this->view['basket']['sum']['preis'], $this->get_option('wpsg_currency')); ?>
+				</div>
+			</div>
+
+			<?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
+			<div class="overview_sum_row">
+				<div class="title">
 						<?php echo wpsg_translate(__('<a href="#1#">Versandkosten</a> (#2#)', 'wpsg'),
 							$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN),
 							$this->arShipping[$this->view['basket']['checkout']['shipping']]['name']
-						); ?>:								
-					</td>
-					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>										
-					<td class="wpsg_cell_mwst">
-					<?php if (isset($this->view['basket']['shipping']['tax_rata']) && $this->view['basket']['shipping']['tax_rata'] === true) { ?>
-					<?php echo __('anteilig', 'wpsg'); ?>
-					<?php } else { ?>
-					<?php echo wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%'); ?>
-					<?php } ?>
-					</td>					
-					<?php } ?>
-					<td class="wpsg_cell_shipping_value">
-						<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>
-					</td>
-				</tr>
+						); ?>:
+
+				</div>
+				<div class="value">
+					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') {
+						if (isset($this->view['basket']['shipping']['tax_rata']) && $this->view['basket']['shipping']['tax_rata'] === true)
+						{
+
+							echo __('anteilig', 'wpsg');
+
+						}
+						else if (array_key_exists($this->view['basket']['checkout']['shipping'], $this->arShipping))
+						{
+
+							echo wpsg_ff($this->arShipping[$this->view['basket']['checkout']['shipping']]['mwst_value'], '%');
+
+						}
+				 	}
+					?>
+				</div>
+				<div class="value">
+					<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>
+				</div>
+			</div>
+			<?php } ?>
+
+			<?php /* Zeile fÃŒr Zahlungsart BEGIN */ ?>
+			<?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
+				<div class="overview_sum_row">
+					<div class="title">
+						<?php echo wpsg_translate(__('Zahlungsart (#1#)', 'wpsg'), $this->arPayment[$this->view['basket']['checkout']['payment']]['name']); ?>:
+					</div>
+					<div class="value">
+						<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') {
+
+							if (isset($this->view['basket']['payment']['tax_rata']) && $this->view['basket']['payment']['tax_rata'] === true)
+							{
+
+								echo __('anteilig', 'wpsg');
+
+							}
+							else if (array_key_exists(wpsg_getStr($this->view['basket']['checkout']['payment']), $this->arPayment))
+							{
+
+								echo wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '%');
+
+							}
+
+						} ?>
+					</div>
+					<div class="value">
+						<?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>
+					</div>
+				</div>
+			<?php } ?>
+			<?php /* Zeile fÃŒr Zahlungsart ENDE */ ?>
+
+			<?php if (get_option("wpsg_kleinunternehmer") == "1") { ?>
+				<div class="overview_sum_row">
+					<div class="title2">
+						<?php echo get_option('wpsg_kleinunternehmer_text'); ?>
+					</div>
+					<div class="value">
+						<?php echo __('&nbsp;'); ?>
+					</div>
+				</div>
+
+				<div class="overview_sum_row">
+					<div class="title2">
+						<?php echo __('Gesamtpreis', 'wpsg'); ?>:
+					</div>
+					<div class="sum">
+						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
+					</div>
+				</div>
+			<?php } else { ?>
+
+				<div class="overview_sum_row">
+					<div class="title2">
+						<?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:
+					</div>
+					<div class="sum">
+						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')); ?>
+					</div>
+				</div>
+
+				<?php foreach ($this->view['basket']['mwst'] as $mwst) { ?>
+					<div class="overview_sum_row">
+						<div class="title2">
+							<?php echo wpsg_translate(__('zuzÃŒglich MwSt. (#1#)', 'wpsg'), __($mwst['name'], 'wpsg')); ?>:
+						</div>
+						<div class="value">
+							<?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+						</div>
+					</div>
 				<?php } ?>
-				<?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
-				<tr class="wpsg_row_payment">
-					<td colspan="2" class="wpsg_cell_payment_label">
-						<?php echo wpsg_translate(__('Zahlungsart (#1#)', 'wpsg'), $this->arPayment[$this->view['basket']['checkout']['payment']]['name']); ?>:
-					</td>
-					<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-					<td class="wpsg_cell_mwst">
-					<?php if (isset($this->view['basket']['payment']['tax_rata']) && $this->view['basket']['payment']['tax_rata'] === true) { ?>
-					<?php echo __('anteilig', 'wpsg'); ?>
-					<?php } else { ?>
-					<?php echo wpsg_ff($this->arPayment[$this->view['basket']['checkout']['payment']]['mwst_value'], '%'); ?>
-					<?php } ?>
-					</td>
-					<?php } ?>
-					<td class="wpsg_cell_payment_value">
-						<?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>
-					</td>
-				</tr>
-				<?php } ?>		
-				
-				<?php if ($this->get_option("wpsg_kleinunternehmer") == "1") { ?>
-				<tr class="wpsg_basket_kleinunternehmer">	
-					<td colspan="<?php echo $this->view['colspan'] + 1; ?>"><?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?></td>
-				</tr>		
-				<tr class="wpsg_row_gesamt">
-					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
-						<?php echo __('Gesamtpreis', 'wpsg'); ?>:
-					</td>
-					<td class="wpsg_cell_gesamt_value">
-						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-					</td>
-				</tr>					
-				<?php } else { ?>		
-				<tr class="wpsg_row_gesamt">
-					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
-						<?php echo __('Gesamtpreis (Netto)', 'wpsg'); ?>:
-					</td>
-					<td class="wpsg_cell_gesamt_value">
-						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-					</td>
-				</tr>	
-				<?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
-				<tr class="wpsg_row_mwst">
-					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
-						<?php echo wpsg_translate(__('zuzÃŒglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
-					</td>
-					<td class="wpsg_cell_mwst_value">
-						<?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-					</td>
-				</tr>
-				<?php } ?>	
-				<tr class="wpsg_row_gesamt_brutto wpsg_row_small">
-					<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+				<div class="wpsg_spacer"></div>
+				<div class="overview_sum_row">
+					<div class="title2">
 						<?php echo __('Gesamtpreis (Brutto)', 'wpsg'); ?>:
-					</td>
-					<td class="wpsg_cell_gesamt_value">
+					</div>
+					<div class="sum">
 						<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')); ?>
-					</td>
-				</tr>
-				<?php } ?>
-				
-				<?php $this->callMods('overview_row_end', array(&$this->view)); ?>
-			
-			</table>
-			
+					</div>
+				</div>
+				<div class="wpsg_spacer"></div>
+			<?php } ?>
+
+			<?php $this->callMods('overview_row_end', array(&$this->view)); ?>
+			<div class="wpsg_spacer"></div>
+
+			<br />
+
+		</div>
+
 			<div class="wpsg_versandhinweis"><?php echo __('Sofern die Lieferung in das Nicht-EU-Ausland erfolgt, kÃ¶nnen weitere ZÃ¶lle, Steuern oder GebÃŒhren vom Kunden zu zahlen sein, jedoch nicht an den Anbieter, sondern an die dort zustÃ€ndigen Zoll- bzw. SteuerbehÃ¶rden. Dem Kunden wird empfohlen, die Einzelheiten vor der Bestellung bei den Zoll- bzw. SteuerbehÃ¶rden zu erfragen.', 'wpsg'); ?></div>
 		</div>
-		
+
 		<br />
-		
+
 		<?php if ($this->view['basket']['checkout']['comment'] != '') { ?>
 			<div class="subtitle">
@@ -313,19 +416,18 @@
 				<?php echo $this->view['basket']['checkout']['comment'] ?>
 			</div>
-		<?php }?>				
-		
-				
+		<?php }?>
+
+
 		<?php $this->callMods('overview_inner_prebutton', array(&$this->view)); ?>
-				
+
+		<div class="wpsg_spacer"></div>
 		<div class="wpsg_clear"></div>
-				
-		<br />
-				
-		<input type="submit" class="wpsg_button wpsg_checkoutbutton" value="<?php echo __('zurÃŒck', 'wpsg'); ?>" name="wpsg_redirect_checkout" />
-		<input type="submit" class="wpsg_button wpsg_orderbutton" value="<?php echo __('zahlungspflichtig bestellen', 'wpsg'); ?>" name="wpsg_order" />
-		
+
+		<input type="submit" class="wpsg_checkoutbutton" value="<?php echo __('zurÃŒck', 'wpsg'); ?>" name="wpsg_redirect_checkout" />
+		<input type="submit" class="wpsg_orderbutton" value="<?php echo __('zahlungspflichtig bestellen', 'wpsg'); ?>" name="wpsg_order" />
+
 		<div class="wpsg_clear"></div>
-		
-	</form>		
+
+	</form>
 
 </div>
