Index: /mods/wpsg_mod_export.class.php
===================================================================
--- /mods/wpsg_mod_export.class.php	(revision 5792)
+++ /mods/wpsg_mod_export.class.php	(revision 5794)
@@ -4,25 +4,25 @@
 	 * Modul fÃŒr die verschiedenen Export Profile
 	 */
-	class wpsg_mod_export extends wpsg_mod_basic
+	class wpsg_mod_export extends wpsg_mod_basic 
 	{
-		 
+		
 		var $lizenz = 1;
 		var $id = 300;
 		var $inline = true;
-
+		
 		/** Hier sind alle mÃ¶glichen Typen drin, wird von loadFields gefÃŒllt */
 		var $fields = array();
-
+		
 		/** Array fÃŒr die mÃ¶glichen Format Umwandlungen */
 		var $arFormats = array();
-
+		
 		var $arCache = array();
-
+		
 		/**
 		 * Costructor
 		 */
 		public function __construct()
-		{
-
+		{ 
+			
 			/*
 			$data = @unserialize('a:6:{s:8:"filename";s:17:"bestellexport.csv";s:9:"separator";s:1:";";s:7:"oneline";s:1:"1";s:3:"iso";s:1:"1";s:16:"firstlinecolname";s:1:"1";s:6:"fields";a:35:{i:0;a:3:{s:4:"name";s:3:"OID";s:5:"value";s:8:"order_id";s:6:"format";s:1:"0";}i:1;a:2:{s:4:"name";s:3:"KID";s:5:"value";s:8:"kunde_id";}i:2;a:2:{s:4:"name";s:3:"RNR";s:5:"value";s:11:"rechnung_nr";}i:3;a:3:{s:4:"name";s:14:"Rechnungsdatum";s:5:"value";s:6:"rdatum";s:6:"format";s:3:"400";}i:4;a:2:{s:4:"name";s:6:"Status";s:5:"value";s:12:"order_status";}i:5;a:2:{s:4:"name";s:9:"Bezahlart";s:5:"value";s:20:"order_payment_method";}i:6;a:2:{s:4:"name";s:10:"Versandart";s:5:"value";s:21:"order_shipping_method";}i:7;a:2:{s:4:"name";s:4:"Name";s:5:"value";s:10:"kunde_name";}i:8;a:2:{s:4:"name";s:7:"Vorname";s:5:"value";s:13:"kunde_vorname";}i:9;a:3:{s:4:"name";s:12:"Bestelldatum";s:5:"value";s:11:"order_cdate";s:6:"format";s:3:"400";}i:10;a:3:{s:4:"name";s:11:"Gesamtpreis";s:5:"value";s:11:"order_price";s:6:"format";s:3:"200";}i:11;a:3:{s:4:"name";s:5:"Netto";s:5:"value";s:17:"order_price_netto";s:6:"format";s:3:"200";}i:12;a:2:{s:4:"name";s:9:"Kommentar";s:5:"value";s:15:"order_bemerkung";}i:15;a:2:{s:4:"name";s:5:"EMail";s:5:"value";s:11:"kunde_email";}i:16;a:2:{s:4:"name";s:8:"UStIdNr.";s:5:"value";s:11:"kunde_ustid";}i:17;a:2:{s:4:"name";s:5:"Firma";s:5:"value";s:11:"kunde_firma";}i:18;a:2:{s:4:"name";s:3:"Tel";s:5:"value";s:9:"kunde_tel";}i:19;a:2:{s:4:"name";s:3:"Fax";s:5:"value";s:9:"kunde_fax";}i:20;a:2:{s:4:"name";s:7:"Strasse";s:5:"value";s:13:"kunde_strasse";}i:21;a:2:{s:4:"name";s:3:"PLZ";s:5:"value";s:9:"kunde_plz";}i:22;a:2:{s:4:"name";s:3:"Ort";s:5:"value";s:9:"kunde_ort";}i:23;a:2:{s:4:"name";s:4:"Land";s:5:"value";s:10:"kunde_land";}i:24;a:2:{s:4:"name";s:20:"Versandadresse Firma";s:5:"value";s:11:"order_firma";}i:25;a:2:{s:4:"name";s:22:"Versandadresse Vorname";s:5:"value";s:13:"order_vorname";}i:26;a:2:{s:4:"name";s:19:"Versandadresse Name";s:5:"value";s:10:"order_name";}i:27;a:2:{s:4:"name";s:22:"Versandadresse Strasse";s:5:"value";s:13:"order_strasse";}i:28;a:2:{s:4:"name";s:18:"Versandadresse PLZ";s:5:"value";s:9:"order_plz";}i:29;a:2:{s:4:"name";s:18:"Versandadresse Ort";s:5:"value";s:9:"order_ort";}i:30;a:2:{s:4:"name";s:19:"Versandadresse Land";s:5:"value";s:10:"order_land";}i:31;a:2:{s:4:"name";s:26:"Name der Bank (Bankeinzug)";s:5:"value";s:11:"order_bname";}i:32;a:2:{s:4:"name";s:24:"Kontonummer (Bankeinzug)";s:5:"value";s:9:"order_bnr";}i:33;a:2:{s:4:"name";s:25:"BLZ der Bank (Bankeinzug)";s:5:"value";s:10:"order_bblz";}i:34;a:2:{s:4:"name";s:25:"Kontoinhaber (Bankeinzug)";s:5:"value";s:14:"order_binhaber";}i:35;a:2:{s:4:"name";s:2:"ip";s:5:"value";s:8:"order_ip";}i:36;a:2:{s:4:"name";s:9:"UserAgent";s:5:"value";s:15:"order_useragent";}}}');
@@ -36,10 +36,10 @@
 			$data['fields'][32]['format'] = 900;
 			$data['fields'][33]['format'] = 900;
-			$data['fields'][35]['format'] = 900;
-			wpsg_debug($data);die(serialize($data));
+			$data['fields'][35]['format'] = 900;			
+			wpsg_debug($data);die(serialize($data));			
 			*/
-
+			
 			parent::__construct();
-
+						
 			$this->arFormats = array(
 				0 => __('UnverÃ€ndert', 'wpsg'),
@@ -52,7 +52,7 @@
 				700 => __('Benutzerdefiniert', 'wpsg'),
 				800 => __('Text', 'wpsg'),
-				900 => __('Text Excel 2007', 'wpsg')
+				900 => __('Text Excel 2007', 'wpsg')					
 			);
-
+			
 			$this->name = __('Exportprofile', 'wpsg');
 			$this->group = __('Sonstiges', 'wpsg');
@@ -60,10 +60,10 @@
 
 		} // public function __construct()
-
-		public function install()
+		
+		public function install() 
 		{
-
+			
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
-
+			
 			/*
 		   	 * Tabelle fÃŒr die Exportprofile
@@ -75,13 +75,13 @@
 		   		PRIMARY KEY  (id)
 		   	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-
+		   	
 		   	dbDelta($sql);
-
+			
 		   	// StandardmÃ€Ãig einen Export vorgeben sollte keiner existieren
 		   	$existsID1 = $this->db->fetchOne("SELECT COUNT(*) FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '1'");
-
+		   	
 		   	if ($existsID1 <= 0)
 		   	{
-
+		   		
 		   		$ins_data = array(
 		   			"id" => 1,
@@ -89,28 +89,28 @@
 		   			"data" => 'a:6:{s:8:"filename";s:17:"bestellexport.csv";s:9:"separator";s:1:";";s:7:"oneline";s:1:"1";s:3:"iso";s:1:"1";s:16:"firstlinecolname";s:1:"1";s:6:"fields";a:37:{i:0;a:3:{s:4:"name";s:3:"OID";s:5:"value";s:8:"order_id";s:6:"format";s:1:"0";}i:1;a:3:{s:4:"name";s:3:"ONR";s:5:"value";s:9:"order_onr";s:6:"format";i:900;}i:2;a:2:{s:4:"name";s:3:"KID";s:5:"value";s:8:"kunde_id";}i:3;a:3:{s:4:"name";s:3:"KNR";s:5:"value";s:8:"kunde_nr";s:6:"format";i:900;}i:4;a:2:{s:4:"name";s:3:"RNR";s:5:"value";s:11:"rechnung_nr";}i:5;a:3:{s:4:"name";s:14:"Rechnungsdatum";s:5:"value";s:6:"rdatum";s:6:"format";s:3:"400";}i:6;a:2:{s:4:"name";s:6:"Status";s:5:"value";s:12:"order_status";}i:7;a:2:{s:4:"name";s:9:"Bezahlart";s:5:"value";s:20:"order_payment_method";}i:8;a:2:{s:4:"name";s:10:"Versandart";s:5:"value";s:21:"order_shipping_method";}i:9;a:2:{s:4:"name";s:4:"Name";s:5:"value";s:10:"kunde_name";}i:10;a:2:{s:4:"name";s:7:"Vorname";s:5:"value";s:13:"kunde_vorname";}i:11;a:3:{s:4:"name";s:12:"Bestelldatum";s:5:"value";s:11:"order_cdate";s:6:"format";s:3:"400";}i:12;a:3:{s:4:"name";s:11:"Gesamtpreis";s:5:"value";s:11:"order_price";s:6:"format";s:3:"200";}i:13;a:3:{s:4:"name";s:5:"Netto";s:5:"value";s:17:"order_price_netto";s:6:"format";s:3:"200";}i:14;a:2:{s:4:"name";s:9:"Kommentar";s:5:"value";s:15:"order_bemerkung";}i:15;a:2:{s:4:"name";s:5:"EMail";s:5:"value";s:11:"kunde_email";}i:16;a:3:{s:4:"name";s:8:"UStIdNr.";s:5:"value";s:11:"kunde_ustid";s:6:"format";i:900;}i:17;a:2:{s:4:"name";s:5:"Firma";s:5:"value";s:11:"kunde_firma";}i:18;a:3:{s:4:"name";s:3:"Tel";s:5:"value";s:9:"kunde_tel";s:6:"format";i:900;}i:19;a:3:{s:4:"name";s:3:"Fax";s:5:"value";s:9:"kunde_fax";s:6:"format";i:900;}i:20;a:2:{s:4:"name";s:7:"Strasse";s:5:"value";s:13:"kunde_strasse";}i:21;a:3:{s:4:"name";s:3:"PLZ";s:5:"value";s:9:"kunde_plz";s:6:"format";i:900;}i:22;a:2:{s:4:"name";s:3:"Ort";s:5:"value";s:9:"kunde_ort";}i:23;a:2:{s:4:"name";s:4:"Land";s:5:"value";s:10:"kunde_land";}i:24;a:2:{s:4:"name";s:20:"Versandadresse Firma";s:5:"value";s:11:"order_firma";}i:25;a:2:{s:4:"name";s:22:"Versandadresse Vorname";s:5:"value";s:13:"order_vorname";}i:26;a:2:{s:4:"name";s:19:"Versandadresse Name";s:5:"value";s:10:"order_name";}i:27;a:2:{s:4:"name";s:22:"Versandadresse Strasse";s:5:"value";s:13:"order_strasse";}i:28;a:3:{s:4:"name";s:18:"Versandadresse PLZ";s:5:"value";s:9:"order_plz";s:6:"format";i:900;}i:29;a:2:{s:4:"name";s:18:"Versandadresse Ort";s:5:"value";s:9:"order_ort";}i:30;a:2:{s:4:"name";s:19:"Versandadresse Land";s:5:"value";s:10:"order_land";}i:31;a:2:{s:4:"name";s:26:"Name der Bank (Bankeinzug)";s:5:"value";s:11:"order_bname";}i:32;a:3:{s:4:"name";s:24:"IBAN Nummer (Bankeinzug)";s:5:"value";s:10:"order_iban";s:6:"format";i:900;}i:33;a:3:{s:4:"name";s:25:"BIC der Bank (Bankeinzug)";s:5:"value";s:9:"order_bic";s:6:"format";i:900;}i:34;a:2:{s:4:"name";s:25:"Kontoinhaber (Bankeinzug)";s:5:"value";s:14:"order_binhaber";}i:35;a:3:{s:4:"name";s:2:"ip";s:5:"value";s:8:"order_ip";s:6:"format";i:900;}i:36;a:2:{s:4:"name";s:9:"UserAgent";s:5:"value";s:15:"order_useragent";}}}'
 		   		);
-
+		   		
 		   		// Standardexport anlegen
 		   		$this->db->ImportQuery(WPSG_TBL_EXPORTPROFILE, $ins_data);
-
+		   		
 		   	}
-
-		} // public function install()
-
+		   	
+		} // public function install() 
+		
 		public function settings_edit()
 		{
-
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/settings_edit.phtml');
-
+									
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/settings_edit.phtml'); 
+						
 		} // public function settings_edit()
-
+		
 		public function settings_save()
 		{
-
-
+			
+			
 		} // public function settings_save()
-
+		
 		public function profilList()
 		{
-
+		
 			$this->shop->view['arProfile'] = $this->db->fetchAssoc("
 				SELECT
@@ -119,268 +119,263 @@
 					`".WPSG_TBL_EXPORTPROFILE."`
 			");
-
+			
 			foreach ($this->shop->view['arProfile'] as $k => $v)
 			{
-
+				
 				$this->shop->view['arProfile'][$k]['data'] = @unserialize($v['data']);
-
-			}
-
+							
+			}
+			
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/profillist.phtml');
-
+			
 		} // public function profilList()
-
-		public function order_ajax()
+		
+		public function handleExport()
 		{
-
-			parse_str($_REQUEST['filter'], $arFilter);
-
-			if (!wpsg_isSizedArray($_REQUEST['wpsg_mod_export_profile']))
-			{
-
-				$this->shop->addBackendError(__('Bitte mindestens ein Export Profil anlegen.', 'wpsg'));
-				$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order');
-
-			}
-
-			$arProfile = $_REQUEST['wpsg_mod_export_profile'];
-
-			$this->loadFields();
-
-			foreach ($arProfile as $profil_id)
-			{
-
-				$profil = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '".wpsg_q($profil_id)."'");
-				$profil['data'] = @unserialize($profil['data']);
-				$profil['filename'] = $profil['data']['filename'];
-
-				$tmpfname = tempnam($this->getTmpFilePath(), "wpsg");
-
-				$filehandler = fopen($tmpfname, 'w');
-
-				// Kopf
-				if ($profil['data']['firstlinecolname'] == '1')
-				{
-
-					$row = array();
-
-					foreach ($profil['data']['fields'] as $f)
-					{
-
-						$row[] = $f['name'];
-
-					}
-
-					fputcsv($filehandler, $row, $profil['data']['separator']);
-
-				}
-
-				$arOrder = wpsg_order::find($arFilter['filter']);
-
-				//foreach ($this->shop->view['data'] as $d)
-				foreach ($arOrder as $oOrder)
-				{
-
-					$d = $oOrder->data;
-
-					$row = array();
-
-					if ($profil['data']['oneline'] == '1')
-					{
-
+						
+			$arProfile = explode(",", $_REQUEST['wpsg_mod_export_profile']);
+			
+			if (sizeof($arProfile) >= 1)
+			{
+				
+				$this->loadFields();
+
+				foreach ($arProfile as $profil_id)
+				{
+					
+					$profil = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '".wpsg_q($profil_id)."'");
+					$profil['data'] = @unserialize($profil['data']);
+					$profil['filename'] = $profil['data']['filename'];
+					
+					$tmpfname = tempnam($this->getTmpFilePath(), "wpsg");
+					
+					$filehandler = fopen($tmpfname, 'w');
+					
+					// Kopf
+					if ($profil['data']['firstlinecolname'] == '1')
+					{
+					
+						$row = array();
+						
 						foreach ($profil['data']['fields'] as $f)
 						{
-
-							$row[] = $this->getValue($f, $profil['data']['separator'], $d['id']);
-
+							
+							$row[] = $f['name'];
+							
 						}
-
+						
 						fputcsv($filehandler, $row, $profil['data']['separator']);
-
+						
+					}
+					
+					foreach ($this->shop->view['data'] as $d) 
+					{
+												
+						$row = array();
+						
+						if ($profil['data']['oneline'] == '1')
+						{
+						
+							foreach ($profil['data']['fields'] as $f) 
+							{
+
+								$row[] = $this->getValue($f, $profil['data']['separator'], $d['id']);
+								
+							}
+							
+							fputcsv($filehandler, $row, $profil['data']['separator']);
+							
+						}
+						else 
+						{
+							
+							$arProdukte = $this->db->fetchAssoc("
+								SELECT 
+									OP.`p_id`, 
+									OP.`productkey`, 
+									OP.`product_index`,
+									OP.`id` AS `order_product_id`
+								FROM 
+									`".WPSG_TBL_ORDERPRODUCT."` AS OP 
+								WHERE 
+									OP.`o_id` = '".wpsg_q($d['id'])."'
+							");
+							
+							foreach ($arProdukte as $p)
+							{
+							
+								$row = array();
+								
+								foreach ($profil['data']['fields'] as $f)
+								{
+
+									$row[] = $this->getValue($f, $profil['data']['separator'], $d['id'], $p['p_id'], $p['product_index'], $p['productkey'], $p['order_product_id']);
+																		
+								}
+
+								fputcsv($filehandler, $row, $profil['data']['separator']);
+																	
+							}
+							
+						}
+	    				
+					}
+					
+					fclose($filehandler);
+					
+					// In ISO wandeln
+					if ($profil['data']['iso'] == '1')
+					{
+						
+						file_put_contents($tmpfname, utf8_decode(file_get_contents($tmpfname)));
+												
+					}
+					
+					$arFiles[] = array(strval($profil['data']['filename']), $tmpfname);
+					
+				}
+				
+				if (sizeof($arFiles) == 1)
+				{
+					
+					header("Content-Type: text/csv"); 
+					header("Content-Disposition: attachment; filename=".$arFiles[0][0]); 
+					header("Pragma: no-cache"); 
+					header("Expires: 0"); 
+					
+					die(file_get_contents($arFiles[0][1]));
+						
+				}
+				else if (sizeof($arFiles) > 1)
+				{
+					
+					$zip = new ZipArchive();
+					
+					$tmpfname = tempnam($this->getTmpFilePath(), "wpsg").'.zip';			
+
+					if ($zip->open($tmpfname, ZIPARCHIVE::CREATE) == true) 
+					{
+    
+						foreach ($arFiles as $f)
+						{
+						
+							$zip->addFile($f[1], $f[0]);
+							
+						}
+						
+						$zip->close();
+						
+						header("Content-Type: application/octet-stream"); 
+						header("Content-Disposition: attachment; filename=export.zip"); 
+						header("Pragma: no-cache"); 
+						header("Expires: 0"); 
+						
+						die(file_get_contents($tmpfname));
+						
 					}
 					else
 					{
-
-						$arProdukte = $this->db->fetchAssoc("
-							SELECT 
-								OP.`p_id`, 
-								OP.`productkey`, 
-								OP.`product_index`,
-								OP.`id` AS `order_product_id`
-							FROM 
-								`".WPSG_TBL_ORDERPRODUCT."` AS OP 
-							WHERE 
-								OP.`o_id` = '".wpsg_q($d['id'])."'
-						");
-
-						foreach ($arProdukte as $p)
-						{
-
-							$row = array();
-
-							foreach ($profil['data']['fields'] as $f)
-							{
-
-								$row[] = $this->getValue($f, $profil['data']['separator'], $d['id'], $p['p_id'], $p['product_index'], $p['productkey'], $p['order_product_id']);
-
-							}
-
-							fputcsv($filehandler, $row, $profil['data']['separator']);
-
-						}
-
-					}
-
-				}
-
-				fclose($filehandler);
-
-				// In ISO wandeln
-				if ($profil['data']['iso'] == '1')
-				{
-
-					file_put_contents($tmpfname, utf8_decode(file_get_contents($tmpfname)));
-
-				}
-
-				$arFiles[] = array(strval($profil['data']['filename']), $tmpfname);
-
-			}
-
-			if (sizeof($arFiles) == 1)
-			{
-
-				header("Content-Type: text/csv");
-				header("Content-Disposition: attachment; filename=".$arFiles[0][0]);
-				header("Pragma: no-cache");
-				header("Expires: 0");
-
-				die(file_get_contents($arFiles[0][1]));
-
-			}
-			else if (sizeof($arFiles) > 1)
-			{
-
-				$zip = new ZipArchive();
-
-				$tmpfname = tempnam($this->getTmpFilePath(), "wpsg").'.zip';
-
-				if ($zip->open($tmpfname, ZIPARCHIVE::CREATE) == true)
-				{
-
-					foreach ($arFiles as $f)
-					{
-
-						$zip->addFile($f[1], $f[0]);
-
-					}
-
-					$zip->close();
-
-					header("Content-Type: application/octet-stream");
-					header("Content-Disposition: attachment; filename=export.zip");
-					header("Pragma: no-cache");
-					header("Expires: 0");
-
-					die(file_get_contents($tmpfname));
-
-				}
-				else
-				{
-
-					die(__('Konnte Zip Archiv nicht erstellen!', 'wpsg'));
-
-				}
-
-			}
-
-			return true;
-
-			return false;
-
-		} // public function order_ajax()
-
-		public function product_index_tab(&$arTabs)
+						
+						die(__('Konnte Zip Archiv nicht erstellen!', 'wpsg'));
+						
+					}
+					
+				}
+				
+				return true;
+				
+			}
+			
+			return false;			
+			
+		} // public function handleExport()
+		
+		public function produkt_index_head()
 		{
 
 			$this->shop->view['wpsg_mod_export']['arProfile'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."`");
-
+			
 			if (sizeof($this->shop->view['wpsg_mod_export']['arProfile']) <= 0) return;
-
-			$arTabs['right'][$this->id] = array(
-				'tab_title' => __('Export', 'wpsg'),
-				'tab_icon' => 'glyphicon glyphicon-export',
-				'tab_content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/order_index_tab.phtml', false)
-			);
-
-		} // public function product_index_tab(&$arTabs) { }
-
+			
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/produkt_index_head.phtml');
+			
+		} // public function produkt_index_head()
+		 
+		public function produkt_index_aftersearch()
+		{
+			
+			$this->shop->view['wpsg_mod_export']['arProfile'] = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."`");
+			
+			if (sizeof($this->shop->view['wpsg_mod_export']['arProfile']) <= 0) return;
+			
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/produkt_index_aftersearch.phtml');
+			
+		} // public function produkt_index_aftersearch()
+		
 		public function be_ajax()
 		{
-
+			
 			if ($_REQUEST['do'] == 'wpsg_mod_export_addProfil')
 			{
-
+				
 				$this->db->ImportQuery(WPSG_TBL_EXPORTPROFILE, array(
 					"name" => __('Neues Profil', 'wpsg'),
 					"data" => serialize(array('separator' => ';')),
 				));
-
+				
 				die($this->profilList());
-
+				
 			}
 			else if ($_REQUEST['do'] == 'wpsg_mod_export_removeProfil')
 			{
-
+				
 				$this->db->Query("DELETE FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '".wpsg_q($_REQUEST['profil'])."'");
 				die($this->profilList());
-
-
+				
+			
 			}
 			else if ($_REQUEST['do'] == 'wpsg_mod_export_removeField')
 			{
-
+				
 				$data = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '".wpsg_q($_REQUEST['profil'])."'");
 				$data['data'] = @unserialize($data['data']);
-
+		 
 				unset($data['data']['fields'][$_REQUEST['field_key']]);
-
-				$data['data'] = @serialize($data['data']);
+				
+				$data['data'] = @serialize($data['data']);				
 				$this->db->UpdateQuery(WPSG_TBL_EXPORTPROFILE, $data, "`id` = '".wpsg_q($_REQUEST['profil'])."'");
-
+				
 				die("1");
-
+				
 			}
 			else if ($_REQUEST['do'] == 'wpsg_mod_export_profilSwitch')
 			{
-
+				
 				$this->loadFields();
-
+				
 				$this->shop->view['profil'] = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '".wpsg_q($_REQUEST['profil'])."'");
-
+				 
 				$this->shop->view['profil']['data'] = unserialize($this->shop->view['profil']['data']);
-
-				if (!isset($this->shop->view['profil']['data']['fields']) ||  !is_array($this->shop->view['profil']['data']['fields'])) $this->shop->view['profil']['data']['fields'] = array();
-
-				foreach ($this->shop->view['profil']['data']['fields'] as $k => $v)
+											
+				foreach ((array)$this->shop->view['profil']['data']['fields'] as $k => $v)
 				{
 					if (!isset($v['format'])) $this->shop->view['profil']['data']['fields'][$k]['format'] = 0;
 				}
-
+				
 				$this->shop->view['arFormats'] = $this->arFormats;
 				$this->shop->view['fields'] = $this->fields;
-
+				
 				die($this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/profil.phtml'));
-
+				
 			}
 			else if ($_REQUEST['do'] == 'inlinedit')
 			{
-
+				
 				$data = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '".wpsg_q($_REQUEST['profil_id'])."'");
 				$data['data'] = @unserialize($data['data']);
-
+				
 				switch ($_REQUEST['field'])
 				{
-
+					
 					case 'name': $data['name'] = wpsg_q($_REQUEST['value']); break;
 					case 'filename': $data['data']['filename'] = wpsg_q($_REQUEST['value']); break;
@@ -389,73 +384,73 @@
 					case 'firstlinecolname': $data['data']['firstlinecolname'] = wpsg_q($_REQUEST['value']); break;
 					case 'iso': $data['data']['iso'] = wpsg_q($_REQUEST['value']); break;
-
-				}
-
-				if (preg_match('/fieldname_/', $_REQUEST['field']))
-				{
-
+					
+				}
+				
+				if (preg_match('/fieldname_/', $_REQUEST['field']))				    
+				{
+					
 					$f_id = substr($_REQUEST['field'], 10);
 					$data['data']['fields'][$f_id]['name'] = $_REQUEST['value'];
-
-				}
-
+					
+				}
+				
 				if (preg_match('/fieldformat_/', $_REQUEST['field']))
 				{
-
+					
 					$f_id = substr($_REQUEST['field'], 12);
 					$data['data']['fields'][$f_id]['format'] = $_REQUEST['value'];
 					$_REQUEST['value'] = $this->arFormats[$_REQUEST['value']];
-
-				}
-
+					
+				}
+				
 				if (preg_match('/fielduserformat_/', $_REQUEST['field']))
 				{
-
-					$f_id = substr($_REQUEST['field'], 16);
+					
+					$f_id = substr($_REQUEST['field'], 16);					
 					$data['data']['fields'][$f_id]['userformat'] = $_REQUEST['value'];
-
-				}
-
+										
+				}
+				
 				if (preg_match('/fieldtyp_/', $_REQUEST['field']))
 				{
-
+					
 					$f_id = substr($_REQUEST['field'], 9);
 					$data['data']['fields'][$f_id]['value'] = $_REQUEST['value'];
 					$this->loadFields();
 					$_REQUEST['value'] = $this->getFieldName($_REQUEST['value']);
-
-				}
-
-				$data['data'] = @serialize($data['data']);
+					
+				}
+				
+				$data['data'] = @serialize($data['data']);				
 				$this->db->UpdateQuery(WPSG_TBL_EXPORTPROFILE, $data, "`id` = '".wpsg_q($_REQUEST['profil_id'])."'");
-
+				
 				die($_REQUEST['value']);
-
+				
 			}
 			else if ($_REQUEST['do'] == 'musterupload')
 			{
-
+				
 				$data = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_EXPORTPROFILE."` WHERE `id` = '".wpsg_q($_REQUEST['profil_id'])."'");
 				$data['data'] = @unserialize($data['data']);
-
-				if (!isset($data['data']['separator']) || strlen($data['data']['separator']) < 1)
-				{
-
+				
+				if (!isset($data['data']['separator']) || strlen($data['data']['separator']) < 1) 
+				{
+					
 					$this->shop->addBackendError(__('UngÃŒltiges Trennzeichen angegeben!', 'wpsg'));
 					die('<script type="text/javascript">parent.wpsg_mod_export_profilSwitch();</script>');
-
-				}
-
+						
+				}
+				
 				if ($data['data']['iso'] == '1')
 				{
 
 					$strFileContent = wpsg_toUtf8(file_get_contents($_FILES['wpsg_mod_export_muster']['tmp_name']));
-
+					
 				}
 				else
 				{
-
+				
 					$strFileContent = file_get_contents($_FILES['wpsg_mod_export_muster']['tmp_name']);
-
+					
 				}
 
@@ -464,60 +459,60 @@
 
 				$arFields = explode($data['data']['separator'], $strFileContent);
-
-				if (sizeof($arFields) > 1)
-				{
-
+				
+				if (sizeof($arFields) > 1) 
+				{
+					
 					// Neue Felder gefundne, verwirft die alten
 					$data['data']['fields'] = array();
-
-					foreach ($arFields as $f)
+					
+					foreach ($arFields as $f) 
 					{
 
 						if (preg_match('/^\"(.*)\"$/', $f)) $f = substr($f, 1, strlen($f) - 2);
-
+						
 						$data['data']['fields'][] = array(
 							'name' => $f,
 							'value' => '-1'
-						);
-
-					}
-
-				}
-
+						);							
+						
+					}
+				
+				}
+				
 				$data['data'] = @serialize($data['data']);
-
+						 
 				$data = wpsg_q($data);
-
+				 
 				$this->db->UpdateQuery(WPSG_TBL_EXPORTPROFILE, $data, "`id` = '".wpsg_q($_REQUEST['profil_id'])."'");
-
+				 
 				$this->shop->addBackendMessage(__('Muster Datei erfolgreich verarbeitet.', 'wpsg'));
-
+				
 				die('<script type="text/javascript">parent.wpsg_mod_export_profilSwitch();</script>');
-
-			}
-
+				
+			}
+		
 		} // public function be_ajax()
-
+		
 		private function getFieldName($field_key)
 		{
-
+			
 			foreach ($this->fields as $fieldgroup)
 			{
-
+				
 				foreach ($fieldgroup['fields'] as $key => $fieldname)
 				{
-
+					
 					if ($key == $field_key) return $fieldname;
-
-				}
-
-			}
-
+					
+				}
+				
+			}
+			
 		} // private function getFieldName($field_key)
-
+		
 		private function loadFields()
 		{
-
-			$this->fields = array(
+			
+			$this->fields = array(	
 				5 => array(
 					'name' => __('Allgemein', 'wpsg'),
@@ -540,5 +535,5 @@
 						'order_payment' => __('Kosten Bezahlmethode', 'wpsg'),
 						'order_useragent' => __('UserAgent', 'wpsg'),
-						'order_ip' => __('IP Adresse', 'wpsg'),
+						'order_ip' => __('IP Adresse', 'wpsg'),						
 						'order_vorname' => __('Lieferadresse Vorname', 'wpsg'),
 						'order_name' => __('Lieferadresse Name', 'wpsg'),
@@ -558,7 +553,7 @@
 						'order_binhaber' => __('Kontoinhaber (Bankeinzug)', 'wpsg'),
 						'order_bnr' => __('Kontonummer (Bankeinzug)', 'wpsg'),
-						'order_iban' => __('IBAN Nummer (Bankeinzug)', 'wpsg'),
+						'order_iban' => __('IBAN Nummer (Bankeinzug)', 'wpsg'),						
 						'order_status' => __('Status der Bestellung', 'wpsg'),
-						'order_menge' => __('Anzahl an Artikeln', 'wpsg'),
+						'order_menge' => __('Anzahl an Artikeln', 'wpsg'),	
 						'order_weight' => __('Gesamtgewicht', 'wpsg')
 					)
@@ -580,5 +575,5 @@
 						'produkt_fmenge' => __('FÃŒllmenge', 'wpsg'),
 						'produkt_beschreibung' => __('Beschreibung', 'wpsg'),
-						'produkt_weight' => __('Gewicht', 'wpsg'),
+						'produkt_weight' => __('Gewicht', 'wpsg'),						 
 						'produkt_anr' => __('Artikelnummer', 'wpsg'),
 						'produkt_menge' => __('Anzahl', 'wpsg'),
@@ -606,12 +601,12 @@
 						'kunde_email' => __('E-Mail', 'wpsg'),
 						'kunde_ustid' => __('Umsatzsteuernummer', 'wpsg'),
-						'kunde_geb' => __('Geburtsdatum', 'wpsg')
+						'kunde_geb' => __('Geburtsdatum', 'wpsg')					
 					)
 				)
 			);
-
+			
 			if ($this->shop->hasMod('wpsg_mod_rechnungen'))
 			{
-
+				
 				$this->fields[11] = array(
 					'name' => __('Rechnung', 'wpsg'),
@@ -620,150 +615,153 @@
 						'gutschrift_nr' => __('Rechnungskorrekturnummer', 'wpsg'),
 						'rdatum' => __('Datum der Rechnung/Rechnungskorrektur', 'wpsg')
-					)
+					) 
 				);
-
-			}
-
+				
+			}
+			
 			// Gutscheinmodul
 			if ($this->shop->hasMod('wpsg_mod_gutschein'))
 			{
-
+				
 				$this->fields[10]['fields']['order_gutschein'] = __('Gutscheinnummer', 'wpsg');
-
-			}
-
-			// Bestellvariablen
+				
+			}
+			
+			// Bestellvariablen 
 			if ($this->shop->hasMod('wpsg_mod_ordervars'))
 			{
-
+				
 				$arOV = array();
 				$arOrderVars = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_ORDERVARS."` WHERE `deleted` != '1' ORDER BY `pos` ASC, `id` ASC ");
-
+				
 				foreach ($arOrderVars as $ov)
 				{
-
-					$arOV['ov_'.$ov['id']] = $ov['name'];
-
-				}
-
+					
+					$arOV['ov_'.$ov['id']] = $ov['name'];	
+					
+				}
+				
 				if (is_array($arOV) && sizeof($arOV) > 0)
 				{
-
+					
 					$arOV = array(
 						'name' => __('Bestellvariablen', 'wpsg'),
 						'fields' => $arOV
 					);
-
+					
 					$this->fields[12] = $arOV;
-
-				}
-
-			}
-
-			/* Produktvariablen */
+					
+				}
+				
+			}			
+			
+			/* Produktvariablen */ 
 			if ($this->shop->hasMod('wpsg_mod_productvars'))
 			{
-
+							
 				$arPV = array();
 				$arProduktVars = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_PRODUCTS_VARS."` ORDER BY `name` ");
-
+				
 				foreach ($arProduktVars as $pv)
 				{
-
+					
 					$arPV['pv_'.$pv['id']] = $pv['name'];
-
-				}
-
+					
+				}
+				
 				if (is_array($arPV) && sizeof($arPV) > 0)
 				{
-
+					
 					$arPV = array(
 						'name' => __('Produktvariablen', 'wpsg'),
 						'fields' => $arPV
 					);
-
+					
 					$this->fields[21] = $arPV;
-
-				}
-
-			}
-
+					
+				}
+				
+			} 
+			
 			/* Produktattribute */
 			if ($this->shop->hasMod('wpsg_mod_produktattribute'))
 			{
-
+				
 				$arPA = array();
 				$arProduktAttribute = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_AT."` ORDER BY `name` ");
-
+				
 				foreach ($arProduktAttribute as $pa)
 				{
-
+					
 					$arPA['pa_'.$pa['id']] = $pa['name'];
-
-				}
-
+					
+				}
+				
 				if (is_array($arPA) && sizeof($arPA) > 0)
 				{
-
+					
 					$arPA = array(
 						'name' => __('Produktattribute', 'wpsg'),
 						'fields' => $arPA
 					);
-
+					
 					$this->fields[22] = $arPA;
-
-				}
-
-			}
-
+					
+				}
+				
+			}
+								
 			/* Kundenvariablen */
 			$kv = $this->shop->loadPflichtFeldDaten();
 			if (is_array($kv) && sizeof($kv) > 0 && sizeof($kv['custom']) > 0)
 			{
-
-				$arKV = array();
+				
+				$arKV = array(); 
 				foreach ($kv['custom'] as $kv_key => $kv)
 				{
-
+					
 					$arKV['kv_'.$kv_key] = $kv['name'];
-
-				}
-
+					
+				}
+				
 				if (is_array($arKV) && sizeof($arKV) > 0)
 				{
-
+					
 					$arKV = array(
 						'name' => __('Kundenvariablen', 'wpsg'),
 						'fields' => $arKV
 					);
-
+					
 					$this->fields[31] = $arKV;
-
-				}
-
-			}
-
+					
+				}
+				
+			}
+			
 			$this->shop->callMods('wpsg_mod_export_loadFields', array(&$this->fields));
-
+			
 			ksort($this->fields);
-
+			
 		}
-
+		
 		public function getValue($f, $profil_separator, $o_id, $p_id = false, $product_index = 1, $productkey = false, $order_product_id = false)
 		{
-
+			
 			$field_value = $f['value'];
-
-			if (array_key_exists($o_id.'_'.$p_id, $this->arCache))
-			{
-
-				$order = $this->arCache[$o_id.'_'.$p_id]['order'];
-				$produkt = $this->arCache[$o_id.'_'.$p_id]['produkt'];
-				$kunde = $this->arCache[$o_id.'_'.$p_id]['kunde'];
-
+			
+			$cache_key = $o_id.'_'.$p_id.'_'.$product_index.'_'.$productkey.'_'.$order_product_id;
+			
+			// Hier werden die Ergebnisse gespeichert
+			if (array_key_exists($cache_key, $this->arCache))
+			{
+				
+				$order = $this->arCache[$cache_key]['order'];
+				$produkt = $this->arCache[$cache_key]['produkt'];
+				$kunde = $this->arCache[$cache_key]['kunde'];				
+				
 			}
 			else
 			{
-
+			
 				$order = $this->db->fetchRow("
 					SELECT 
@@ -777,61 +775,61 @@
 						O.`id` = '".wpsg_q($o_id)."'
 				");
-
+				
 				// Anzahl an tatsÃ€chlich bestellten Artikeln
 				$order['menge'] = $this->db->fetchOne("SELECT SUM(OP.`menge`) FROM `".WPSG_TBL_ORDERPRODUCT."` AS OP WHERE OP.`o_id` = '".wpsg_q($order['id'])."'");
-
+				
 				// Anzahl an Produkten in der Bestellung (MengenunabhÃ€ngig)
 				$order['count'] = $this->db->fetchOne("SELECT COUNT(*) FROM `".WPSG_TBL_ORDERPRODUCT."` WHERE `o_id` = '".wpsg_q($order['id'])."'");
-
-				$order['payment_method'] = wpsg_getStr($this->shop->arPayment[$order['type_payment']]['name'], wpsg_translate(__('Deaktivierte Zahlungsart (#1#)', 'wpsg'), $order['type_payment']));
-				$order['shipping_method'] = wpsg_getStr($this->shop->arShipping[$order['type_shipping']]['name'], wpsg_translate(__('Deaktivierte Versandart (#1#)', 'wpsg'), $order['type_shipping']));
-
+				
+				$order['payment_method'] = $this->shop->arPayment[$order['type_payment']]['name'];
+				$order['shipping_method'] = $this->shop->arShipping[$order['type_shipping']]['name'];
+				
 				$order['custom_data'] = unserialize($order['custom_data']);
-
+				
 				if ($this->shop->hasMod('wpsg_mod_rechnungen'))
 				{
-
+					
 					$last_invoice = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_RECHNUNGEN."` WHERE `o_id` = '".wpsg_q($order['id'])."' AND `rnr` != '' ORDER BY `datum` DESC LIMIT 1 ");
 					$last_storno = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_RECHNUNGEN."` WHERE `o_id` = '".wpsg_q($order['id'])."' AND `gnr` != '' ORDER BY `datum` DESC LIMIT 1 ");
 					$last = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_RECHNUNGEN."` WHERE `o_id` = '".wpsg_q($order['id'])."' ORDER BY `datum` DESC LIMIT 1 ");
-
+					
 					$order['gnr'] = '--';
 					$order['rnr'] = '--';
-					$order['rdatum'] = '--';
-
+					$order['rdatum'] = '--'; 
+					
 					if (wpsg_isSizedInt($last_invoice['id']))
 					{
-
+						
 						$order['rnr'] = $last_invoice['rnr'];
 						$order['rdatum'] = $last_invoice['datum'];
-
-					}
-
+						
+					}
+					
 					if (wpsg_isSizedInt($last_storno['id']) && $last['id'] === $last_storno['id'])
 					{
-
-						$order['gnr'] = $last_storno['gnr'];
+						
+						$order['gnr'] = $last_storno['gnr']; 
 						$order['rdatum'] = $last_storno['datum'];
-
-					}
-
-				}
-
+						
+					}
+										
+				}
+				
 				/* Bestellvariablen */
 				if ($this->shop->hasMod('wpsg_mod_ordervars'))
 				{
-
+					
 					$order['bvars'] = @unserialize($order['bvars']);
-
-				}
-
+					
+				}
+				
 				/* Produktvariablen */
 				if ($this->shop->hasMod('wpsg_mod_productvars'))
 				{
-
+					
 					$order['pvars'] = @unserialize($order['pvars']);
-
-				}
-
+					
+				}
+								
 				$kunde = $this->db->fetchRow("
 					SELECT
@@ -845,11 +843,11 @@
 						K.`id` = '".wpsg_q($order['k_id'])."'
 				");
-
+				
 				/* Kundenvariablen */
 				$kunde['kv'] = @unserialize($kunde['custom']);
-
+								
 				if ($p_id == false)
 				{
-
+					
 					$arProdukte = $this->db->fetchAssoc("
 						SELECT
@@ -865,34 +863,34 @@
 							OP.`o_id` = '".wpsg_q($o_id)."'
 					");
-
+					
 					$produkt = array();
-
+					
 					foreach ($arProdukte as $p)
 					{
-
+					
 						foreach ($p as $col_name => $col_value)
 						{
 
 							$produkt[$col_name][] = $col_value;
-
+							
 						}
-
+						
 					}
 
 					foreach ($produkt as $col_name => $values)
 					{
-
+						
 						if ($profil_separator == ',') $produkt[$col_name] = implode(";", $values);
 						else $produkt[$col_name] = implode(",", $values);
-
-					}
-
+						
+					}
+					
 				}
 				else
 				{
-
+					
 					if (wpsg_isSizedInt($order_product_id))
 					{
-
+						 
 						$produkt = $this->db->fetchRow("
 							SELECT
@@ -908,9 +906,9 @@
 								OP.`id` = '".wpsg_q($order_product_id)."'
 						");
-
+					 
 					}
 					else
 					{
-
+						
 						$produkt = $this->db->fetchRow("
 							SELECT
@@ -926,11 +924,11 @@
 								P.`id` = '".wpsg_q($p_id)."'
 						");
-
-					}
-
+						
+					}
+					
 					/* Produktattribute */
 					if ($this->shop->hasMod('wpsg_mod_produktattribute'))
 					{
-
+						
 						$produkt['mod_attribute'] = $this->db->fetchAssocField("
 							SELECT
@@ -941,40 +939,40 @@
 								PA.`p_id` = '".wpsg_q($produkt['id'])."'								
 						", "a_id", "value");
-
-					}
-
-				}
-
-				$this->arCache[$o_id.'_'.$p_id] = array(
+						
+					}
+					
+				}
+
+				$this->arCache[$cache_key] = array(
 					"order" => $order,
 					"produkt" => $produkt,
 					"kunde" => $kunde
 				);
-
-			}
-
+				
+			}
+			
 			if (wpsg_isSizedInt($order['land']))
 			{
-
+				
 				$oFrontendCountry = wpsg_country::getInstance($order['land']);
-
+								
 			}
 			else
 			{
-
+				
 				$oFrontendCountry = $this->shop->getDefaultCountry();
-
-			}
-
+				
+			}
+			  
 			switch ($field_value)
 			{
-
+				
 				case 'allgemein_empty': $return = ''; break;
 				case 'allgemein_statisch': $return = $f['static']; break;
-				case 'allgemein_currency': $return = get_option('wpshopgermany_currency'); break;
-
-				case 'order_id': $return = $order['id']; break;
-				case 'order_cdate':
-
+				case 'allgemein_currency': $return = get_option('wpshopgermany_currency'); break; 
+								
+				case 'order_id': $return = $order['id']; break; 
+				case 'order_cdate': 
+					
 					if (strtotime($order['cdate']) !== false)
 					{
@@ -985,31 +983,31 @@
 						$return = '--';
 					}
-
+					
 					break;
 				case 'order_onr': $return = $order['onr']; break;
 				case 'order_bemerkung': $return = preg_replace('/\r\n|\r|\n/', ' ', $order['comment']); break;
-				case 'order_price':
-
+				case 'order_price': 
+					
 					if (!is_array($order['custom_data']['basket']))
 					{
-						$return = wpsg_ff($order['price_gesamt']);
+						$return = wpsg_ff($order['price_gesamt']);	
 					}
 					else
-					{
+					{					
 						$return = wpsg_ff($order['custom_data']['basket']['sum']['preis_gesamt_brutto'], $this->shop->get_option('wpsg_currency'));
 					}
-
+					 
 					break;
-
-				case 'order_price_netto':
-
-					$return = wpsg_ff($order['custom_data']['basket']['sum']['preis_gesamt_netto'], $this->shop->get_option('wpsg_currency'));
-
+					
+				case 'order_price_netto': 
+					
+					$return = wpsg_ff($order['custom_data']['basket']['sum']['preis_gesamt_netto'], $this->shop->get_option('wpsg_currency'));						
+					
 					break;
-
+					
 				case 'order_shipping': $return = number_format($order['price_shipping'], 2, ',', '.'); break;
-				case 'order_payment': $return = number_format($order['price_payment'], 2, ',', '.'); break;
+				case 'order_payment': $return = number_format($order['price_payment'], 2, ',', '.'); break;	
 				case 'order_useragent':	$return = $order['useragent']; break;
-				case 'order_ip': $return = $order['ip']; break;
+				case 'order_ip': $return = $order['ip']; break;	
 				case 'order_vorname': $return = $order['shipping_vname']; break;
 				case 'order_name': $return = $order['shipping_name']; break;
@@ -1021,29 +1019,29 @@
 				case 'order_hausnr': $return = $order['shipping_hausnr']; break;
 				case 'order_payment_method': $return = $order['payment_method']; break;
-				case 'order_shipping_method': $return = $order['shipping_method']; break;
+				case 'order_shipping_method': $return = $order['shipping_method']; break;				
 				case 'order_count': $return = $order['count']; break;
 				case 'order_firma': $return = $order['shipping_firma']; break;
 				case 'order_status': $return = $this->shop->arStatus[$order['status']]; break;
-				case 'order_bname': $return = wpsg_getStr($order['mod_autodebit_name']); break;
-				case 'order_bblz': $return = wpsg_getStr($order['mod_autodebit_blz']); break;
-				case 'order_binhaber': $return = wpsg_getStr($order['mod_autodebit_inhaber']); break;
+				case 'order_bname': $return = $order['mod_autodebit_name']; break;
+				case 'order_bblz': $return = $order['mod_autodebit_blz']; break;
+				case 'order_binhaber': $return = $order['mod_autodebit_inhaber']; break;
 				case 'order_menge': $return = $order['menge']; break;
-				case 'order_bnr': $return = wpsg_getStr($order['mod_autodebit_knr']); break;
-				case 'order_iban': $return = wpsg_getStr($order['mod_autodebit_iban']); break;
-				case 'order_bic': $return = wpsg_getStr($order['mod_autodebit_bic']); break;
+				case 'order_bnr': $return = $order['mod_autodebit_knr']; break;
+				case 'order_iban': $return = $order['mod_autodebit_iban']; break;
+				case 'order_bic': $return = $order['mod_autodebit_bic']; break;
 				case 'order_weight': $return = $order['weight']; break;
-				case 'order_gutschein':
-
+				case 'order_gutschein': 
+					
 					if ($order['gs_id'] > 0)
 						$return = $this->db->fetchOne("SELECT `code` FROM `".WPSG_TBL_GUTSCHEIN."` WHERE `id` = '".wpsg_q($order['gs_id'])."'");
-
+						
 					break;
-
+				
 				case 'rechnung_nr': $return = $order['rnr']; break;
 				case 'rechnungskorrektur_nr':
-				case 'gutschrift_nr':
+				case 'gutschrift_nr': 
 					$return = $order['gnr']; break;
-				case 'rdatum':
-
+				case 'rdatum': 
+					
 					if (strtotime($order['rdatum']) !== false)
 					{
@@ -1053,41 +1051,40 @@
 					{
 						$return = '--';
-					}
-
-					break;
-
+					} 
+					
+					break;				
+								
 				case 'produkt_id': $return = $produkt['id']; break;
-				case 'produkt_index': $return = $product_index; break;
+				case 'produkt_index': $return = $product_index; break; 
 				case 'produkt_name': $return = $produkt['name']; break;
 				case 'produkt_typ': $return = $produkt['typ']; break;
 				case 'produkt_preis': // Brutto Preis im Produkt
-
+					
 					if ($this->shop->getBackendTaxview() == WPSG_BRUTTO)
 						$return = number_format($produkt['preis'], 2, ',', '.');
-					else
+					else 
 						$return = number_format($produkt['preis'] + $produkt['mwst_value'], 2, ',', '.');
-
+										
 					break;
-
+				
 				case 'produkt_preis_netto': // Netto Preis im Produkt
-
+					
 					if ($this->shop->getBackendTaxView() == WPSG_BRUTTO)
 						$return = number_format($produkt['preis'] - $produkt['mwst_value'], 2, ',', '.');
 					else
-						$return = number_format($produkt['preis'], 2, ',', '.');
-
+						$return = number_format($produkt['preis'], 2, ',', '.');	
+					
 					break;
-
+				
 				case 'product_preis_order': // Brutto Preis aus bestelltem Produkt
-
+					
 					$return = number_format($produkt['price'], 2, ',', '.');
 					break;
-
+					
 				case 'product_preis_order_netto':
-
+					
 					$return = number_format($produkt['price'] - $produkt['mwst_value'], 2, ',', '.');
 					break;
-
-
+				
 				case 'produkt_mwst': $return = $produkt['mwst_key']; break;
 				case 'produkt_mwst_value': $return = wpsg_ff($oFrontendCountry->getTax($produkt['mwst_key'])); break;
@@ -1100,5 +1097,5 @@
 				case 'produkt_ean': $return = $produkt['ean']; break;
 				case 'produkt_gtin': $return = $produkt['gtin']; break;
-
+				
 				case 'kunde_id': $return = $kunde['id']; break;
 				case 'kunde_nr': $return = $kunde['knr']; break;
@@ -1115,7 +1112,7 @@
 				case 'kunde_tel': $return = $kunde['tel']; break;
 				case 'kunde_fax': $return = $kunde['fax']; break;
-				case 'kunde_email': $return = $kunde['email']; break;
+				case 'kunde_email': $return = $kunde['email']; break;		
 				case 'kunde_ustid': $return = $kunde['ustidnr']; break;
-				case 'kunde_geb':
+				case 'kunde_geb': 
 
 					if (strtotime($kunde['geb']) !== false)
@@ -1126,8 +1123,8 @@
 					{
 						$return = '--';
-					}
-
-					break;
-
+					} 
+					
+					break;			
+				
 				default:
 
@@ -1138,22 +1135,22 @@
 						$ordervarid = substr($field_value, 3);
 						$return = $order['bvars'][$ordervarid];
-
+						
 					}
 					else if (preg_match('/pv_\d+/', $field_value))
 					{
-
+						 
 						$produktvarid = substr($field_value, 3);
-
+						 
 						// Produktvariable (index kann auch 0 sein)
 						if (isset($order['pvars'][$product_index]))
 						{
-
+							
 							$return = $order['pvars'][$product_index][$produktvarid];
-
+							
 						}
 						else
 						{
-
-							// AbwÃ€rtskompatibilitÃ€t < 3.5.1
+							
+							// AbwÃ€rtskompatibilitÃ€t < 3.5.1 
 							if ($produkt['mod_vp_varkey'] != '')
 							{
@@ -1166,49 +1163,49 @@
 
 							$return = $order['pvars'][$produkt_key][$produktvarid];
-
+							
 						}
-
+					 
 					}
 					else if (preg_match('/pa_\d+/', $field_value))
 					{
-
+						
 						// Produktattribute
 						$paid = substr($field_value, 3);
 						$return = $produkt['mod_attribute'][$paid];
-
+						
 					}
 					else if (preg_match('/kv_\d+/', $field_value))
 					{
-
+						
 						// Kundenvariable
 						$kvid = substr($field_value, 3);
 						$return = $kunde['kv'][$kvid];
-
+						
 					}
 					else
 					{
-
-						$return = false;
+						
+						$return = false;						
 						$this->shop->callMods('wpsg_mod_export_getValue', array(&$return, $field_value, $o_id, $p_id, $productkey, $product_index, $profil_separator));
-
+						
 						if ($return === false)
 						{
-
+						
 							$return = __('Nicht definiert!'.$field_value, 'wpsg');
-
+							
 						}
-
-					}
-
-			}
-
+						
+					}
+				
+			}  
+			
 			$f['size'] = 111255;
-
+			
 			if (isset($f['format']) && $f['format'] > 0 && $return != '--')
 			{
-
+				
 				switch ($f['format'])
 				{
-
+					
 					case 100: $return = number_format(floatval(wpsg_tf($return)), 2, '.', ''); break;
 					case 200: $return = number_format(floatval(wpsg_tf($return)), 2, ',', ''); break;
@@ -1216,6 +1213,6 @@
 					case 400: $return = date('d.m.Y', strtotime($return)); break;
 					case 500: $return = date('H:i:s', strtotime($return)); break;
-					case 600: $return = date('d.m.Y H:i:s', strtotime($return)); break;
-					case 700: $return = strftime($this->shop->replaceUniversalPlatzhalter(wpsg_getStr($f['userformat']), $order['id'], $kunde['id'], false, $p_id), strtotime($return)); break;
+					case 600: $return = date('d.m.Y H:i:s', strtotime($return)); break;					
+					case 700: $return = strftime($this->shop->replaceUniversalPlatzhalter($f['userformat'], $order['id'], $kunde['id'], false, $p_id), strtotime($return)); break;
 					case 800: $return = '"'.$return.'"'; break;
 					case 900: $return = '"=""'.$return.'"""'; break;
Index: /mods/wpsg_mod_fuellmenge.class.php
===================================================================
--- /mods/wpsg_mod_fuellmenge.class.php	(revision 5792)
+++ /mods/wpsg_mod_fuellmenge.class.php	(revision 5794)
@@ -138,6 +138,7 @@
 			else
 			{
-
-				$produkt['feinheit'] = array_values($arFeinheiten)[0];
+					
+				$arFeinheitenValues = array_values($arFeinheiten);
+				$produkt['feinheit'] = $arFeinheitenValues[0];
 
 
Index: /views/mods/mod_abo/mail_autobuy.php
===================================================================
--- /views/mods/mod_abo/mail_autobuy.php	(revision 5792)
+++ /views/mods/mod_abo/mail_autobuy.php	(revision 5794)
@@ -2,12 +2,12 @@
 
 	/**
-	 * Template für die Mail an den Kunden wenn ein Abo automatisch verlängert wird
+	 * Template fÃŒr die Mail an den Kunden wenn ein Abo automatisch verlÃ€ngert wird
 	 */
 
 ?><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,
  
-<?php echo wpsg_translate(__('Ihr Abonnement von Produkt "#1#" wurde automatisch verlängert.', 'wpsg'), $this->view['oProduct']->getProductName()); ?>  
+<?php echo wpsg_translate(__('Ihr Abonnement von Produkt "#1#" wurde automatisch verlÃ€ngert.', 'wpsg'), $this->view['oProduct']->getProductName()); ?>  
  
-<?php echo __('Viele Grüße', 'wpsg'); ?> 
+<?php echo __('Viele GrÃŒÃe', 'wpsg'); ?> 
  
 <?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> 
Index: /views/mods/mod_abo/mail_autobuy_html.php
===================================================================
--- /views/mods/mod_abo/mail_autobuy_html.php	(revision 5792)
+++ /views/mods/mod_abo/mail_autobuy_html.php	(revision 5794)
@@ -2,12 +2,12 @@
 
 	/**
-	 * Template für die Mail an den Kunden wenn ein Abo automatisch verlängert wird (HTML)
+	 * Template fÃŒr die Mail an den Kunden wenn ein Abo automatisch verlÃ€ngert wird (HTML)
 	 */
 
 ?><p><?php echo __('Hallo', 'wpsg'); ?> <?php echo wpsg_hspc($this->view['customer']['vname']); ?> <?php echo wpsg_hspc($this->view['customer']['name']); ?>,</p>
  
-<p><?php echo wpsg_translate(__('Ihr Abonnement von Produkt "#1#" wurde automatisch verlängert.', 'wpsg'), $this->view['oProduct']->getProductName()); ?></p> 
+<p><?php echo wpsg_translate(__('Ihr Abonnement von Produkt "#1#" wurde automatisch verlÃ€ngert.', 'wpsg'), $this->view['oProduct']->getProductName()); ?></p> 
  
-<p><?php echo __('Viele Grüße', 'wpsg'); ?></p> 
+<p><?php echo __('Viele GrÃŒÃe', 'wpsg'); ?></p> 
  
 <p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> 
Index: /views/mods/mod_abo/mail_storno.phtml
===================================================================
--- /views/mods/mod_abo/mail_storno.phtml	(revision 5792)
+++ /views/mods/mod_abo/mail_storno.phtml	(revision 5794)
@@ -2,5 +2,5 @@
 
 	/**
-	 * Template für die Mail an den Kunden wenn ein Abo storniert wurde
+	 * Template fÃŒr die Mail an den Kunden wenn ein Abo storniert wurde
 	 */
 
@@ -8,10 +8,10 @@
  
 <?php if ($this->view['cancel_storno']) { ?>
-<?php echo wpsg_translate(__('die Stornierung für Ihr Abo von Produkt "#1#" wurde aufgehoben.', 'wpsg'), $this->view['oProduct']->getProductName()); ?> 
+<?php echo wpsg_translate(__('die Stornierung fÃŒr Ihr Abo von Produkt "#1#" wurde aufgehoben.', 'wpsg'), $this->view['oProduct']->getProductName()); ?> 
 <?php } else { ?>
 <?php echo wpsg_translate(__('Ihr Abo von Produkt "#1#" wurde zum "#2#" storniert.', 'wpsg'), $this->view['oProduct']->getProductName(), date('d.m.Y', $this->view['stornoDate'])); ?> 
 <?php } ?>
  
-<?php echo __('Viele Grüße', 'wpsg'); ?> 
+<?php echo __('Viele GrÃŒÃe', 'wpsg'); ?> 
  
 <?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?> 
Index: /views/mods/mod_abo/mail_storno_html.phtml
===================================================================
--- /views/mods/mod_abo/mail_storno_html.phtml	(revision 5792)
+++ /views/mods/mod_abo/mail_storno_html.phtml	(revision 5794)
@@ -2,5 +2,5 @@
 
 	/**
-	 * Template für die Mail an den Kunden wenn ein Abo storniert wurde (HTML)
+	 * Template fÃŒr die Mail an den Kunden wenn ein Abo storniert wurde (HTML)
 	 */
 
@@ -8,10 +8,10 @@
  
 <?php if ($this->view['cancel_storno']) { ?>
-<p><?php echo wpsg_translate(__('die Stornierung für Ihr Abo von Produkt "#1#" wurde aufgehoben.', 'wpsg'), $this->view['oProduct']->getProductName()); ?></p>
+<p><?php echo wpsg_translate(__('die Stornierung fÃŒr Ihr Abo von Produkt "#1#" wurde aufgehoben.', 'wpsg'), $this->view['oProduct']->getProductName()); ?></p>
 <?php } else { ?>
 <p><?php echo wpsg_translate(__('Ihr Abo von Produkt "#1#" wurde zum #2# storniert.', 'wpsg'), $this->view['oProduct']->getProductName(), date('d.m.Y', $this->view['stornoDate'])); ?></p>
 <?php } ?>
  
-<p><?php echo __('Viele Grüße', 'wpsg'); ?></p> 
+<p><?php echo __('Viele GrÃŒÃe', 'wpsg'); ?></p> 
  
 <p><?php echo __($this->get_option('wpsg_shopdata_name'), 'wpsg'); ?> - <?php echo __('Team', 'wpsg'); ?></p> 
Index: /views/mods/mod_deliverytime/basket_row.phtml
===================================================================
--- /views/mods/mod_deliverytime/basket_row.phtml	(revision 5792)
+++ /views/mods/mod_deliverytime/basket_row.phtml	(revision 5794)
@@ -2,5 +2,5 @@
 
 	/**
-	 * Template für die Integration der Lieferzeit in den Warenkorb
+	 * Template fÃŒr die Integration der Lieferzeit in den Warenkorb
 	 */
 
@@ -19,10 +19,10 @@
 </tr>
 
-<?php /* Hinweistext für Verzögerung in der Lieferzeit */ ?>
+<?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="4">
 			<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')); ?>
+				<?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>
Index: /views/mods/mod_deliverytime/overview_row.phtml
===================================================================
--- /views/mods/mod_deliverytime/overview_row.phtml	(revision 5792)
+++ /views/mods/mod_deliverytime/overview_row.phtml	(revision 5794)
@@ -2,5 +2,5 @@
 
 	/**
-	 * Template für die Integration der Lieferzeit in die Bestellübersichtsseite
+	 * Template fÃŒr die Integration der Lieferzeit in die BestellÃŒbersichtsseite
 	 */
 
@@ -19,10 +19,10 @@
 </tr>
 
-<?php /* Hinweistext für Verzögerung in der Lieferzeit */ ?>
+<?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')); ?>
+				<?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>
Index: /views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml	(revision 5792)
+++ /views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml	(revision 5794)
@@ -2,5 +2,5 @@
 
  /**
-  * Template für die Registrierung während des Checkouts
+  * Template fÃŒr die Registrierung wÃ€hrend des Checkouts
   * wird von checkout.phtml eingebunden
   */
@@ -10,5 +10,5 @@
 	<?php /* display:none, bis Option aktiv */ ?>   
   	<input <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'checked="checked"':''); ?> type="checkbox" id="checkout_login" value="" onclick="jQuery('#checkout_login_fields').toggle();">&nbsp;
- <span class="wpsg-checkbox-label">Ich möchte ein Kundenkonto anlegen.</span>
+ <span class="wpsg-checkbox-label">Ich mÃ¶chte ein Kundenkonto anlegen.</span>
 </label>         
 
Index: /views/mods/mod_newsletter/checkout_customer_inner.phtml
===================================================================
--- /views/mods/mod_newsletter/checkout_customer_inner.phtml	(revision 5792)
+++ /views/mods/mod_newsletter/checkout_customer_inner.phtml	(revision 5794)
@@ -9,5 +9,5 @@
 <div class="wpsg_checkoutblock">
 	<label for="wpsg_mod_newsletter">
-		<input class="wpsg_checkout" type="checkbox" id="wpsg_mod_newsletter" name="wpsg[checkout][wpsg_mod_newsletter]" value="1" <?php echo (($this->view['basket']['checkout']['wpsg_mod_newsletter'] == '1')?'checked="checked"':''); ?> /><?php echo __("Melden Sie sich hier für unseren Newsletter an.", "wpsg"); ?>						
+		<input class="wpsg_checkout" type="checkbox" id="wpsg_mod_newsletter" name="wpsg[checkout][wpsg_mod_newsletter]" value="1" <?php echo (($this->view['basket']['checkout']['wpsg_mod_newsletter'] == '1')?'checked="checked"':''); ?> /><?php echo __("Melden Sie sich hier fÃŒr unseren Newsletter an.", "wpsg"); ?>						
 	</label>
 </div>
Index: /views/mods/mod_scaleprice/produkt_addedit_sidebar.phtml
===================================================================
--- /views/mods/mod_scaleprice/produkt_addedit_sidebar.phtml	(revision 5792)
+++ /views/mods/mod_scaleprice/produkt_addedit_sidebar.phtml	(revision 5794)
@@ -167,5 +167,5 @@
 	<div class="panel-heading clearfix">
 		<h3 class="panel-title">
-			<?php echo __('Staffelpreise', 'wpsg'); ?></span>
+			<span><?php echo __('Staffelpreise', 'wpsg'); ?></span>
 		</h3>
 	</div> 
Index: /views/order/index.phtml
===================================================================
--- /views/order/index.phtml	(revision 5792)
+++ /views/order/index.phtml	(revision 5794)
@@ -233,5 +233,5 @@
                                     <?php echo $oOrder->getShippingStreet(); ?>
                                     <?php echo $oOrder->getShippingZip(); ?> <?php echo $oOrder->getShippingCity(); ?> <?php echo $oOrder->getShippingCountryKuerzel(); ?><br />
-                            </span
+                            </span>
                             <?php } ?>
 
Index: /views/warenkorb/checkout.phtml
===================================================================
--- /views/warenkorb/checkout.phtml	(revision 5792)
+++ /views/warenkorb/checkout.phtml	(revision 5794)
@@ -2,5 +2,5 @@
 
 	/**
-	 * Template für den ersten Schritt der Kasse
+	 * Template fÃŒr den ersten Schritt der Kasse
 	 * Kundendaten etc.
 	 */
@@ -78,5 +78,5 @@
 			<?php /*Wenn Kunden eingeloggt, oder wenn Kunde nicht eingeloggt */ ?>
 			<?php if ($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn')) { ?>
-				<h2><?php echo __('Bitte überprüfen Sie Ihre Kundendaten','wpsg');?></h2>
+				<h2><?php echo __('Bitte ÃŒberprÃŒfen Sie Ihre Kundendaten','wpsg');?></h2>
 			<?php } else { ?>		
 				<h2><?php echo __('Bitte geben Sie Ihre Kundendaten ein', 'wpsg'); ?></h2>
@@ -98,5 +98,5 @@
 					<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:</label>
 					<select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_title" name="wpsg[checkout][title]">
-						<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+						<option value="-1"><?php echo __('Bitte auswÃ€hlen', 'wpsg'); ?></option>
 						<?php foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
 						<option value="<?php echo wpsg_hspc($t); ?>" <?php echo (($this->view['basket']['checkout']['title'] == $t)?'selected="selected"':''); ?>><?php echo $t; ?></option>
@@ -182,5 +182,5 @@
 					</label>					
 					<select name="wpsg[checkout][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
-						<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
+						<option value="-1"><?php echo __('Bitte auswÃ€hlen', 'wpsg'); ?></option>
 						<?php foreach ($this->view['laender'] as $l) { ?>
 						<option value="<?php echo wpsg_hspc($l['id']); ?>" <?php echo (($l['id'] == $this->view['basket']['checkout']['land'])?'selected="selected"':((!wpsg_isSizedInt($this->view['basket']['checkout']['land']) && $this->get_option('wpsg_defaultland') == $l['id'])?'selected="selected"':'')); ?>><?php echo wpsg_hspc(__($l['name'], 'wpsg')); ?></option>
@@ -207,5 +207,5 @@
                     <?php } else if ($c['typ'] == '1') { $arAuswahl = explode("|", $c['auswahl']); // Auswahlfeld ?>
                     <select class="<?php echo (($c['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$c_id, (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $c_id; ?>]">
-                        <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+                        <option value="-1"><?php echo __('Bitte auswÃ€hlen', 'wpsg'); ?></option>
                         <?php foreach ((array)$arAuswahl as $a) { ?>
                         <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['basket']['checkout']['custom'][$c_id])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
@@ -224,5 +224,5 @@
 				<?php /* $this->callMods('checkout_customer_inner'); START */ ?>
 				
-				<?php /* Passwortabfrage für Neuregistrierung */ ?> 
+				<?php /* Passwortabfrage fÃŒr Neuregistrierung */ ?> 
     			<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'checkout_customer_inner'); ?>
        
@@ -232,5 +232,5 @@
 				<?php echo $this->callMod('wpsg_mod_nlsatolo', 'checkout_customer_inner'); ?>
 				
-				<?php /* Einverständnisabfrage Trusted Shops */ ?>
+				<?php /* EinverstÃ€ndnisabfrage Trusted Shops */ ?>
 				<?php echo $this->callMod('wpsg_mod_trustedshops', 'checkout_customer_inner'); ?>
 				
@@ -264,5 +264,5 @@
 		<?php $this->ClearSessionErrors(); ?>
 			 		
-		<input type="submit" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>'; return false;" class="wpsg_button wpsg_basketbutton" value="<?php echo __('zurück zum Warenkorb', 'wpsg'); ?>" name="wpsg_redirect_basket" />
+		<input type="submit" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>'; return false;" class="wpsg_button wpsg_basketbutton" value="<?php echo __('zurÃŒck zum Warenkorb', 'wpsg'); ?>" name="wpsg_redirect_basket" />
 		<input type="submit" id="wpsg_checkout2button" class="wpsg_button wpsg_checkout2button" value="<?php echo __('weiter', 'wpsg'); ?>" name="wpsg_checkout" />
 		
