Index: /changelog
===================================================================
--- /changelog	(revision 7002)
+++ /changelog	(revision 7003)
@@ -98,5 +98,5 @@
 - Bugfix: Fehler bei fehlender SSL-VerschlÃŒsselung entfernt
 - Bugfix: Konverter verschiebt PDF-Dokumente (DownloadProdukte) unter uploads
-- Bugfix: Kein Abbruch wenn es keine administrator Rolle gibt
+- Bugfix: Kein Abbruch wenn es keine Administrator-Rolle gibt
 - Feature: mehrzeilige Eingabe von FuÃtexten
 
@@ -105,2 +105,3 @@
 - Feature: Modul (FÃŒllmenge, Gewicht, ...) aktiv und keine Eingabe in Produktbackend, wird keine Darstellung im Produktfrontend
 - Feature: Grundpreis in FÃŒllmenge separat ausgewiesen
+- Feature: Integration eines EU-Vertreters fÃŒr Shops mit Hauptsitz ausserhalb der EU
Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 7002)
+++ /controller/wpsg_AdminController.class.php	(revision 7003)
@@ -6,5 +6,9 @@
 	class wpsg_AdminController extends wpsg_SystemController
 	{
-
+		
+		const SHOPDATA_EU_GERMANY = '0';
+		const SHOPDATA_EU_EU = '1';
+		const SHOPDATA_EU_WORLD = '2';
+		
 		/**
 		 * Ãbernimmt das Routing
@@ -83,5 +87,15 @@
 
 		} // public function dispatch()
-
+		
+		public function init()
+		{
+		
+			// Option gab es frÃŒher nicht und wird hier auf den Default Wert korrigiert.
+			if ($this->shop->get_option('wpsg_shopdata_eu') === false) $this->shop->update_option('wpsg_shopdata_eu', self::EXPIRE_GERMANY);
+			if ($this->shop->get_option('wpsg_shopdata_eu') === false) $this->shop->update_option('wpsg_shopdata_eu', self::EXPIRE_EU);
+			if ($this->shop->get_option('wpsg_shopdata_eu') === false) $this->shop->update_option('wpsg_shopdata_eu', self::EXPIRE_WORLD);
+		
+		} // public function init()
+		
 		/**
 		 * Index des Backends
@@ -143,5 +157,8 @@
 
 			}
-
+			$this->shop->view['arSubAction']['dataprotection'] = array(
+					'Menutext' => __('Datenschutz', 'wpsg'),
+					'subTemplate' => WPSG_PATH_VIEW.'/admin/dataprotection.phtml'
+			);
 			$this->shop->view['arSubAction']['kalkulation'] = array(
 				'Menutext' => __('Preiskalkulation', 'wpsg'),
@@ -246,7 +263,7 @@
 
 		} // public function indexAction()
- 
-		/**
-		 * Beim Speichern und Anzeigen der Shopdatne
+ 	
+		/**
+		 * Beim Speichern und Anzeigen der Shopdaten
 		 */
 		public function shopdataAction()
@@ -267,5 +284,25 @@
 				$this->shop->update_option('wpsg_shopdata_zip', $_REQUEST['wpsg_shopdata_zip'], false, true);
 				$this->shop->update_option('wpsg_shopdata_city', $_REQUEST['wpsg_shopdata_city'], false, true);
-
+				$this->shop->update_option('wpsg_shopdata_city', $_REQUEST['wpsg_shopdata_city'], false, true);
+
+				$this->shop->update_option('wpsg_shopdata_eu', $_REQUEST['wpsg_shopdata_eu'], false, true);
+				$this->shop->update_option('wpsg_shopdata_eu_name', $_REQUEST['wpsg_shopdata_eu_name'], false, true);
+				$this->shop->update_option('wpsg_shopdata_eu_tel', $_REQUEST['wpsg_shopdata_eu_tel'], false, true);
+				$this->shop->update_option('wpsg_shopdata_eu_fax', $_REQUEST['wpsg_shopdata_eu_fax'], false, true);
+				$this->shop->update_option('wpsg_shopdata_eu_email', $_REQUEST['wpsg_shopdata_eu_email'], false, true);
+				$this->shop->update_option('wpsg_shopdata_eu_street', $_REQUEST['wpsg_shopdata_eu_street'], false, true);
+				$this->shop->update_option('wpsg_shopdata_eu_zip', $_REQUEST['wpsg_shopdata_eu_zip'], false, true);
+				$this->shop->update_option('wpsg_shopdata_eu_city', $_REQUEST['wpsg_shopdata_eu_city'], false, true);		
+				$this->shop->update_option('wpsg_shopdata_eu_country', $_REQUEST['wpsg_shopdata_eu_country'], false, true);
+				
+				$this->shop->update_option('dataprotectioncommissioner', $_REQUEST['dataprotectioncommissioner'], false, true);
+				$this->shop->update_option('dataprotectioncommissioner_name', $_REQUEST['dataprotectioncommissioner_name'], false, true);
+				$this->shop->update_option('dataprotectioncommissioner_tel', $_REQUEST['dataprotectioncommissioner_tel'], false, true);
+				$this->shop->update_option('dataprotectioncommissioner_email', $_REQUEST['dataprotectioncommissioner_email'], false, true);
+				$this->shop->update_option('dataprotectioncommissioner_baskettext', $_REQUEST['dataprotectioncommissioner_baskettext'], false, true);
+				$this->shop->update_option('dataprotectioncommissioner_mailtext', $_REQUEST['dataprotectioncommissioner_mailtext'], false, true);	
+				$this->shop->update_option('dataprotectioncommissioner_cookie', $_REQUEST['dataprotectioncommissioner_cookie'], false, true);
+				$this->shop->update_option('dataprotectioncommissioner_cookietext', $_REQUEST['dataprotectioncommissioner_cookietext'], false, true);
+				
 				$this->shop->update_option('wpsg_shopdata_bank_name', $_REQUEST['wpsg_shopdata_bank_name'], false, true);
 				$this->shop->update_option('wpsg_shopdata_bank_owner', $_REQUEST['wpsg_shopdata_bank_owner'], false, true);
@@ -1432,4 +1469,7 @@
 			foreach ($this->shop->arPayment as $p_id => $p) $this->shop->view['arPayment'][$p['id']] = $p['name'];
 
+			$this->shop->view['customerdatadelete'] = array();
+			foreach ($this->shop->customerdatadelete as $d_id => $d) $this->shop->view['customerdatadelete'][$d['id']] = $d['name'];
+
 			$this->shop->view['arLander'] = $this->db->fetchAssocField("SELECT L.`id`, L.`name` FROM `".WPSG_TBL_LAND."` AS L ORDER BY `name` ASC ", "id", "name");
 
@@ -1917,4 +1957,22 @@
 
 			}
+			else if (@$_REQUEST['subaction'] == "dataprotection")
+			{
+				
+				$this->update_option('dataprotectioncommissioner', $_REQUEST['dataprotectioncommissioner']);
+				$this->update_option('dataprotectioncommissioner_name', $_REQUEST['dataprotectioncommissioner_name']);
+				$this->update_option('dataprotectioncommissioner_tel', $_REQUEST['dataprotectioncommissioner_tel']);
+				$this->update_option('dataprotectioncommissioner_email', $_REQUEST['dataprotectioncommissioner_email']);
+				$this->update_option('dataprotectioncommissioner_mailtext', $_REQUEST['dataprotectioncommissioner_mailtext']);
+				$this->update_option('dataprotectioncommissioner_baskettext', $_REQUEST['dataprotectioncommissioner_baskettext']);
+				$this->update_option('dataprotectioncommissioner_cookie', $_REQUEST['dataprotectioncommissioner_cookie']);
+				$this->update_option('dataprotectioncommissioner_cookietext', $_REQUEST['dataprotectioncommissioner_cookietext']);
+				
+				$this->addBackendMessage(__('Einstellungen gespeichert.', 'wpsg'));
+				
+				$this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=dataprotection');
+				
+			}
+			
 			else if (@$_REQUEST['subaction'] == 'extended')
 			{
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7002)
+++ /controller/wpsg_ShopController.class.php	(revision 7003)
@@ -3297,5 +3297,14 @@
 			$arReplace['/%shopinfo_street%/i'] = $this->get_option('wpsg_shopdata_street');
 			$arReplace['/%shopinfo_zip%/i'] = $this->get_option('wpsg_shopdata_zip');
-			$arReplace['/%shopinfo_city%/i'] = $this->get_option('wpsg_shopdata_city');
+			$arReplace['/%shopinfo_city%/i'] = $this->get_option('wpsg_shopdata_city');		
+			$arReplace['/%shopinfo_country%/i'] = $this->get_option('wpsg_shopdata_country');
+			$arReplace['/%shopinfo_eu_name%/i'] = $this->get_option('wpsg_shopdata_eu_name');
+			$arReplace['/%shopinfo_eu_tel%/i'] = $this->get_option('wpsg_shopdata_eu_tel');
+			$arReplace['/%shopinfo_eu_fax%/i'] = $this->get_option('wpsg_shopdata_eu_fax');
+			$arReplace['/%shopinfo_eu_email%/i'] = $this->get_option('wpsg_shopdata_eu_email');
+			$arReplace['/%shopinfo_eu_street%/i'] = $this->get_option('wpsg_shopdata_eu_street');
+			$arReplace['/%shopinfo_eu_zip%/i'] = $this->get_option('wpsg_shopdata_eu_zip');
+			$arReplace['/%shopinfo_eu_city%/i'] = $this->get_option('wpsg_shopdata_eu_city');
+			$arReplace['/%shopdata_eu_country%/i'] = $this->get_option('wpsg_shopdata_eu_country');
 			$arReplace['/%shopinfo_bankname%/i'] = $this->get_option('wpsg_shopdata_bank_name');
 			$arReplace['/%shopinfo_accountowner%/i'] = $this->get_option('wpsg_shopdata_bank_owner');
Index: /system/wpsg-en_US.po
===================================================================
--- /system/wpsg-en_US.po	(revision 7002)
+++ /system/wpsg-en_US.po	(revision 7003)
@@ -67,4 +67,9 @@
 msgid "Bibliotheken/Includes"
 msgstr "Libraries/Includes"
+
+#: controller/wpsg_AdminController.class.php:2
+#@ wpsg
+msgid "Datenschutz"
+msgstr "data protection"
 
 #: controller/wpsg_AdminController.class.php:2
Index: /views/admin/shopdata.phtml
===================================================================
--- /views/admin/shopdata.phtml	(revision 7002)
+++ /views/admin/shopdata.phtml	(revision 7003)
@@ -44,9 +44,14 @@
 				<?php echo wpsg_drawForm_Input('wpsg_shopdata_street', __('StraÃe', 'wpsg'), $this->get_option('wpsg_shopdata_street'), array('help' => 'wpsg_shopdata_street')); ?>
 				<?php echo wpsg_drawForm_Input('wpsg_shopdata_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_zip'), array('help' => 'wpsg_shopdata_zip')); ?>
-				<?php echo wpsg_drawForm_Input('wpsg_shopdata_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_city'), array('help' => 'wpsg_shopdata_city')); ?>
+				<?php echo wpsg_drawForm_Input('wpsg_shopdata_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_city'), array('help' => 'wpsg_shopdata_city')); ?>			
+				<?php echo wpsg_drawForm_Select('wpsg_shopdata_eu', __('Hauptsitz des Shopbetreiber befindet sich:', 'wpsg'), Array(	
+					wpsg_AdminController::SHOPDATA_EU_GERMANY => __('in Deutschland', 'wpsg'),
+					wpsg_AdminController::SHOPDATA_EU_EU => __('innerhalb der EU', 'wpsg'),
+					wpsg_AdminController::SHOPDATA_EU_WORLD => __('im europÃ€ischen Ausland', 'wpsg')	
+				), $this->get_option('wpsg_shopdata_eu'), array('help' => 'wpsg_shopdata_eu')); ?>
 
 			</div>
 		</div>
-	
+		
 		<div class="panel panel-default">
   			<div class="panel-heading clearfix">
@@ -62,6 +67,36 @@
 			</div>
 		</div>
+		
+		<?php /* only Standort = Ausland */ ?>
+		<div class="wpsg_shopdata_eu wpsg_shopdata_eu_<?php echo wpsg_AdminController::SHOPDATA_EU_WORLD; ?>" style="display:<?php echo (($this->get_option('wpsg_shopdata_eu') == wpsg_AdminController::SHOPDATA_EU_WORLD || $this->get_option('wpsg_shopdata_eu') === false)?'block':'none'); ?>;">		
+			<div class="panel panel-default">
+				<div class="panel-heading clearfix">
+					<h3 class="panel-title"><?php echo __('EU-Vertreter', 'wpsg'); ?></h3>
+				</div>
+				<div class="panel-body">				
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_name', __('Name des EU-Vertreters', 'wpsg'), $this->get_option('wpsg_shopdata_eu_name'), array('help' => 'wpsg_shopdata_eu_name')); ?>
+					<br />
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_street', __('StraÃe', 'wpsg'), $this->get_option('wpsg_shopdata_eu_street'), array('help' => 'wpsg_shopdata_eu_street')); ?>
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_eu_zip'), array('help' => 'wpsg_shopdata_eu_zip')); ?>
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_city', __('Stadt', 'wpsg'), $this->get_option('wpsg_shopdata_eu_city'), array('help' => 'wpsg_shopdata_eu_city')); ?>
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_country', __('Land', 'wpsg'), $this->get_option('wpsg_shopdata_eu_country'), array('help' => 'wpsg_shopdata_eu_country')); ?>
+					<br />				
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_tel', __('Telefonnummer', 'wpsg'), $this->get_option('wpsg_shopdata_eu_tel'), array('help' => 'wpsg_shopdata_eu_tel')); ?>
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_fax', __('Faxnummer', 'wpsg'), $this->get_option('wpsg_shopdata_eu_fax'), array('help' => 'wpsg_shopdata_eu_fax')); ?>
+					<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_eu_email'), array('help' => 'wpsg_shopdata_eu_email')); ?>
+				</div>
+			</div>
+		</div>
 	
 		<p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" /></p>
+		
+		<script type="text/javascript">/* <![CDATA[ */
+ 
+			jQuery(document).ready(function() {
+
+
+			} );
+		
+		/* ]]> */</script>
 		
   	</form>
