Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7285)
+++ /controller/wpsg_ShopController.class.php	(revision 7286)
@@ -1600,5 +1600,5 @@
 			if (wpsg_isSizedInt($this->view['data']['euleistungsortregel'])) $this->showEULayer = true;
 
-			if ($this->view['data']['deleted'] == '1') return;
+			if (wpsg_isSizedInt($this->view['data']['deleted'])) return;
 
 			if ($force_template !== false)
@@ -1607,5 +1607,6 @@
 			}
 
-			$template_file = WPSG_PATH_PRODUKTTEMPLATES.$this->view['data']['ptemplate_file'];
+			if (isset($this->view['data']['ptemplate_file'])) $template_file = WPSG_PATH_PRODUKTTEMPLATES.$this->view['data']['ptemplate_file'];
+			else $template_file = WPSG_PATH_PRODUKTTEMPLATES.'standard.phtml';
 
 			$this->callMods('renderProdukt_templateSelect', array(&$this->view['data'], &$template_file));
@@ -3597,5 +3598,5 @@
 			}
 			
-			foreach ($arCustomReplace as $k => $v) { $arReplace[$k] = $v; }
+			if (wpsg_isSizedArray($arCustomReplace)) foreach ($arCustomReplace as $k => $v) { $arReplace[$k] = $v; }
 
 			$value = preg_replace(array_keys($arReplace), array_values($arReplace), $value);
Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 7285)
+++ /lib/wpsg_basket.class.php	(revision 7286)
@@ -1273,11 +1273,15 @@
 				if (wpsg_isSizedInt($_SESSION['wpsg']['order_id'])) $arReturn['oOrder'] = wpsg_order::getInstance($_SESSION['wpsg']['order_id']);
 				
-				$land = 
-				
-				$land = $this->shop->db->fetchRow("SELECT * FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->arCheckout['land'])."'");
-				
-				if ($land['mwst'] == '1' || $this->shop->get_option('wpsg_kleinunternehmer') == '1') $noMwSt = true;
-				else if ($land['mwst'] == '2' && wpsg_isSizedString($this->arCheckout['ustidnr'])) $noMwSt = true;
-				else $noMwSt = false;
+				$noMwSt = false;
+				
+				if (isset($this->arCheckout['land'])) {
+				
+					$land = $this->shop->db->fetchRow("SELECT * FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->arCheckout['land'])."'");
+				
+					if ($land['mwst'] == '1' || $this->shop->get_option('wpsg_kleinunternehmer') == '1') $noMwSt = true;
+					else if ($land['mwst'] == '2' && wpsg_isSizedString($this->arCheckout['ustidnr'])) $noMwSt = true;
+					else $noMwSt = false;
+					
+				}
 				
 				$arReturn['noMwSt'] = $noMwSt;
Index: /mods/wpsg_mod_coverletter.class.php
===================================================================
--- /mods/wpsg_mod_coverletter.class.php	(revision 7285)
+++ /mods/wpsg_mod_coverletter.class.php	(revision 7286)
@@ -15,5 +15,5 @@
 			parent::__construct();
 			
-			define('WPSG_TBL_COVERLETTER', $this->shop->prefix.'wpsg_coverletter');
+			if (!defined('WPSG_TBL_COVERLETTER')) define('WPSG_TBL_COVERLETTER', $this->shop->prefix.'wpsg_coverletter');
 			
 			$this->name = __('Anschreiben', 'wpsg');
@@ -219,5 +219,5 @@
 				$this->writeCoverLetter(
 					$_REQUEST['edit_id'],
-					$_REQUEST['text'],
+					$_REQUEST['text'], $_REQUEST['edit_id'],
 					true,
 					__('Vorschau', 'wpsg'),
@@ -363,4 +363,6 @@
 		public function writeCoverLetter($order_id, $text, $preview, $clnr, $filename, $arCustomReplace = []) {
 
+			$text = $this->shop->replaceUniversalPlatzhalter($text, $order_id);
+			
 			if ($preview === true && !wpsg_isSizedInt($order_id)) {
 				
Index: /mods/wpsg_mod_legaltexts.class.php
===================================================================
--- /mods/wpsg_mod_legaltexts.class.php	(revision 7285)
+++ /mods/wpsg_mod_legaltexts.class.php	(revision 7286)
@@ -16,6 +16,5 @@
 		const PROVIDER_ITRECHT = 3;
 		
-		public function __construct()
-		{
+		public function __construct() {
 			
 			parent::__construct();
@@ -27,41 +26,41 @@
 		} // public function __construct();
 		
-		public function settings_edit()
-		{
+		public function install() {
+			
+			$this->shop->checkDefault('wpsg_mod_legaltexts_provider', self::PROVIDER_ITRECHT);
+			
+		}
+		
+		public function settings_edit() {
 
+			$this->shop->view['wpsg_mod_legaltexts_provider'] = $this->shop->get_option('wpsg_mod_legaltexts_provider');
+			if ($this->shop->view['wpsg_mod_legaltexts_provider'] === false || !in_array($this->shop->view['wpsg_mod_legaltexts_provider'], [self::PROVIDER_ITRECHT, self::PROVIDER_HAENDLERBUND, self::PROVIDER_PROTECTEDSHOPS])) $this->shop->view['wpsg_mod_legaltexts_provider'] = self::PROVIDER_ITRECHT;
+						
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_legaltexts/settings_edit.phtml');
 			
 		} // public function settings_edit()
 		
-		public function settings_save()
-		{
+		public function settings_save() {
 			
 			$this->shop->update_option('wpsg_mod_legaltexts_provider', $_REQUEST['wpsg_mod_legaltexts_provider']);
 			
-			if (isset($_REQUEST['wpsg_mod_legaltexts_submitform']) && $_REQUEST['wpsg_mod_legaltexts_submitform'] == '1')
-			{
+			if (isset($_REQUEST['wpsg_mod_legaltexts_submitform']) && $_REQUEST['wpsg_mod_legaltexts_submitform'] == '1') {
 				
-				if ($_REQUEST['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS)
-				{
+				if ($_REQUEST['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS) {
 					
 					$wpsg_ps = new wpsg_protected_shops();
 					$wpsg_ps->saveForm();
 					
-				}
-				else if ($_REQUEST['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND)
-				{
+				} else if ($_REQUEST['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND) {
 					
 					$wphb = new wphb();
 					$wphb->saveForm();
 					
-				}
-				else if ($_REQUEST['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT)
-				{
+				} else if ($_REQUEST['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT) {
 					
 					$wpit = new wpsg_itrecht();
 					$wpit->saveForm();
 					
-				}
-				else throw new \wpsg\Exception(__('Es wurde beim Speichern der Einstellungen ein ungÃŒltiger Provider ÃŒbergeben', 'wpsg'));
+				} else throw new \wpsg\Exception(__('Es wurde beim Speichern der Einstellungen ein ungÃŒltiger Provider ÃŒbergeben', 'wpsg'));
 				
 			}
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 7285)
+++ /views/css/admin.css	(revision 7286)
@@ -95,4 +95,25 @@
 .wpsg_mod_legaltexts_protectedshops_table th label { margin-right:30px; }
 .wpsg_mod_legaltexts_protectedshops_table #wpshopgermany_ts_shopid {  }
+.itrechtlogo { float:right; margin-left:15px; }
+.wpsg_mod_legaltext_select > label { width:100%; font-size:18px; font-weight:normal; padding:15px; display:flex; flex-direction:row; justify-content:flex-start; align-items:center; border:1px solid #31708f; }
+.wpsg_mod_legaltext_select > label.mark { border-width:3px; }
+.wpsg_mod_legaltext_select > label.open { border-bottom:0px; }
+.wpsg_mod_legaltext_select > label > * { flex-grow:0; flex-shrink:0; }
+.wpsg_mod_legaltext_select > label > .grow { flex-grow:1; flex-shrink:1; }
+.wpsg_mod_legaltext_select > label > .glyphicon { font-size:2em; }
+.wpsg_mod_legaltext_select > label input { margin:0px 15px 0px 0px; }
+.wpsg_provider_target { display:none; padding:15px; border:1px solid #31708f; border-top:0px; margin-top:-5px; margin-bottom:15px; }
+.wpsg_provider_target .wpsgitrecht_form_field { width:100%; display:flex; flex-direction:row; justify-content:flex-start; align-items:center; }
+.wpsg_provider_target .wpsgitrecht_form_field .wpsgitrecht_form_left { width:50%; flex-grow:0; flex-shrink:0; }
+.wpsg_provider_target .wpsgitrecht_form_field .wpsgitrecht_form_right { width:50%; flex-grow:0; flex-shrink:0; }
+.wpsg_provider_target .wpsgitrecht_form_field .wpsgitrecht_form_right input { width:100%; }
+.wpsg_provider_target .wpsgitrecht_table { width:100%; border-spacing:0px; border-collapse:collapse; }
+.wpsg_provider_target .wpsgitrecht_table .col0 { width:50%; }
+.wpsg_provider_target .wpsgitrecht_table .col1 { width:50%; }
+.wpsg_provider_target .wpsgitrecht_table select { margin-bottom:5px; width:100%; }
+.wpsg_provider_target .wpsgitrecht_table p { padding:0px 0px 0px 8px; }
+.wpsg_provider_target_3 { border-width:3px; margin-top:-8px; }
+.wpsg_provider_target_3 .button_agb { float:right; }
+.wpsg_provider_target_3 ul li { list-style:initial; margin-left:20px; } 
 
 .wphb_form_left { width:30% !important; }
@@ -101,11 +122,4 @@
 .wphb_form_right input.checkbox { margin-left:20px !important; }
 .wphb_clear { clear:none !important; }
-
-.wpsgitrecht_form_left { float:left; width:50%;  }
-table.wpsgitrecht_table { width:100%; }
-.wpsgitrecht_table td { float:left; width:50%; }
-.wpsgitrecht_table td p { float:left; margin-left:20px; margin-top:5px; }
-.wpsgitrecht_table td br { display:none; }
-.wpsgitrecht_table td select { float:left; }
 
 /* Datepicker */
Index: /views/mods/mod_legaltexts/form_itrecht.phtml
===================================================================
--- /views/mods/mod_legaltexts/form_itrecht.phtml	(revision 7285)
+++ /views/mods/mod_legaltexts/form_itrecht.phtml	(revision 7286)
@@ -9,24 +9,29 @@
 <?php if ($this->view['wpsg_mod_legaltexts']['form'] == false) { ?>
 	
-	<p><?php echo __('wpShopGermany bietet eine AGB-Schnittstelle zur <a href="http://www.it-recht-kanzlei.de/Service/rechtstexte_fuer_onlineshops.php?partner_id=150">IT-Recht Kanzlei</a> an.', 'wpsg'); ?></p>
+	<a href="https://www.it-recht-kanzlei.de/Service/wpShopGermany-agb.php?partner_id=150">
+		<img class="itrechtlogo" src="<?php echo $this->getRessourceURL('mods/mod_legaltexts/Logo_150.png'); ?>" alt="it-recht Kanzlei MÃŒnchen" />
+	</a>
 	
-	<p><?php echo __('Die IT-Recht Kanzlei bietet fÃŒr monatlich nur 9,99 Euro abmahnsichere Rechtstexte an - natÃŒrlich inkl. Haftung. Dazu gehÃ¶ren die AGB, die Widerrufsbelehrung, die DatenschutzerklÃ€rung sowie das Impressum. Mit dem wpShopGermany-IT-Recht Kanzlei Plugin (ab Version 1.0) werden die angebotenen Rechtstexte auf Ihre Blog-Seiten mittels Mausklick automatisch ÃŒbernommen und kÃŒnftig auch automatisch aktualisiert - inklusive permanenter AGB-Ãberwachung.', 'wpsg'); ?></p>
+	<p><?php echo __('wpShopGermany bietet eine AGB-Schnittstelle zur <a href="https://www.it-recht-kanzlei.de/Service/wpShopGermany-agb.php?partner_id=150">IT-Recht Kanzlei</a> an.', 'wpsg'); ?></p>
+	
+	<ul>
+		<li><?php echo wpsg_translate(__('Kostenloses Plugin zur automatisierten Nutzung des AGB-Service der <a href="#1#">IT-Recht-Kanzlei</a>', 'wpsg'), 'https://www.it-recht-kanzlei.de/Service/wpShopGermany-agb.php?partner_id=150'); ?></li>
+		<li><?php echo wpsg_translate(__('abmahnsichere Rechtstexte (AGB, DatenschutzerklÃ€rung, Widerrufsbelehrung & Co) von der <a href="#1#">IT-Recht Kanzlei</a> ab nur 8,90 â¬/mtl.', 'wpsg'), 'https://www.it-recht-kanzlei.de/Service/wpShopGermany-agb.php?partner_id=150'); ?></li>
+		<li><?php echo __('Einfache Integration von aktuellen & abmahnsicheren Rechtstexten in den wpShopGermany-Shop', 'wpsg'); ?></li>
+		<li><?php echo __('Automatische Ãberwachung und Aktualisierung der Rechtstexte', 'wpsg'); ?></li>
+		<li><?php echo __('SelbstverstÃ€ndlich: Anwaltliche Haftung', 'wpsg'); ?></li>
+		<li><?php echo __('Flexibles Vertragsmodell fÃŒr den AGB-Service: Bei Bedarf Jederzeit monatlich kÃŒndbar', 'wpsg'); ?></li>
+	</ul>
+	
+	<br />
 	
 	<p>
-	
-		<?php echo __('Jetzt AGB Service buchen', 'wpsg'); ?>:<br />
-		<a href="http://www.it-recht-kanzlei.de/Service/rechtstexte_fuer_onlineshops.php?partner_id=150">http://www.it-recht-kanzlei.de/Service/rechtstexte_fuer_onlineshops.php</a>
-		
-		<br /><br /> 
-
-		<?php echo __('Rechtstexte im gÃŒnstigen Paketpreis finden Sie hier', 'wpsg'); ?>:<br />
-		<a href="http://www.agb-pakete.de/?partner_id=150">http://www.agb-pakete.de</a>
-		
+		<a class="button" href="https://www.it-recht-kanzlei.de/Service/wpShopGermany-agb.php?partner_id=150"><?php echo __('Jetzt absichern', 'wpsg'); ?></a>
 	</p>
-	
+	 	
 	<?php if (file_exists(WP_PLUGIN_DIR."/wpshopgermany-itrecht/wpshopgermany-itrecht.php")) { ?>
 		<p style="color:red;"><?php echo __('Das Plugin wurde bereits gefunden aber noch nicht aktiviert. Bitte aktivieren sie das Plugin in der <a href="plugins.php">Pluginverwaltung</a>.', 'wpsg'); ?></p>
 	<?php } ?>
-	
+ 
 <?php } else { ?>
 	
Index: /views/mods/mod_legaltexts/settings_edit.phtml
===================================================================
--- /views/mods/mod_legaltexts/settings_edit.phtml	(revision 7285)
+++ /views/mods/mod_legaltexts/settings_edit.phtml	(revision 7286)
@@ -4,36 +4,70 @@
 	 * Template fÃŒr das Modul "Rechtstexte"
 	 */
-
+		
 ?>
 
-<?php echo wpsg_drawForm_Select('wpsg_mod_legaltexts_provider', __('Anbieter', 'wpsg'), array(
-	wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS => __('Protected Shops', 'wpsg'),
-	wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND => __('HÃ€ndlerbund', 'wpsg'),
-	wpsg_mod_legaltexts::PROVIDER_ITRECHT => __('IT-Recht Kanzlei MÃŒnchen', 'wpsg')
-), $this->get_option('wpsg_mod_legaltexts_provider'), array('help' => 'wpsg_mod_legaltexts_provider')); ?>
+<div class="wpsg_mod_legaltext_select">
+	
+	<label class="bg-info mark <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT)?'open':''); ?>" title="<?php echo __('Premiumpartner', 'itrecht'); ?>">
+		
+		<input type="radio" <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT)?'checked="checked"':''); ?> name="wpsg_mod_legaltexts_provider" class="wpsg_mod_legaltexts_provider" value="<?php echo wpsg_mod_legaltexts::PROVIDER_ITRECHT; ?>" />
+		<span class="name"><?php echo __('IT-Recht Kanzlei MÃŒnchen') ?></span>
+		<span class="grow"></span>
+		<span class="text-info glyphicon glyphicon-star-empty" aria-hidden="true"></span>
+				
+	</label>
+	
+	<div class="wpsg_provider_target wpsg_provider_target_<?php echo wpsg_mod_legaltexts::PROVIDER_ITRECHT; ?>"></div>
 
-<br />
+	<label class="<?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS)?'open':''); ?>">
 
-<div id="wpsg_provider_target"></div>
+		<input type="radio" <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS)?'checked="checked"':''); ?> name="wpsg_mod_legaltexts_provider" class="wpsg_mod_legaltexts_provider" value="<?php echo wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS; ?>" />
+		<span class="name"><?php echo __('Protected Shops') ?></span>
 
+	</label>
+
+	<div class="wpsg_provider_target wpsg_provider_target_<?php echo wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS; ?>"></div>
+
+	<label class="<?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND)?'open':''); ?>">
+
+		<input type="radio" <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND)?'checked="checked"':''); ?> name="wpsg_mod_legaltexts_provider" class="wpsg_mod_legaltexts_provider" value="<?php echo wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND; ?>" />
+		<span class="name"><?php echo __('HÃ€ndlerbund') ?></span>
+
+	</label>
+
+	<div class="wpsg_provider_target wpsg_provider_target_<?php echo wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND; ?>"></div>
+	
+</div> 
+ 
 <script type="text/javascript">/* <![CDATA[ */
 
 	jQuery(document).ready(function() {
 
-		jQuery('#wpsg_mod_legaltexts_provider').bind('change', function() {
+		jQuery('.wpsg_mod_legaltexts_provider').bind('change', function() {
 
-			jQuery('#wpsg_provider_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-			
-			jQuery.ajax( {
-				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_legaltexts&noheader=1&do=add',
-				data: {
-					'provider': jQuery('#wpsg_mod_legaltexts_provider').val()
-				},
-				success: function(data) {
+			if (parseInt(jQuery('input[name=wpsg_mod_legaltexts_provider]:checked').val()) > 0) {
 
-					jQuery('#wpsg_provider_target').html(data);
-					
-				}
-			} );
+				jQuery('.wpsg_mod_legaltext_select > label').removeClass('open');
+				jQuery('.wpsg_provider_target').slideUp(125);
+				
+				var target = '.wpsg_provider_target_' + jQuery('input[name=wpsg_mod_legaltexts_provider]:checked').val();
+				
+				jQuery(target).html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+				
+				jQuery.ajax( {
+					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_legaltexts&noheader=1&do=add',
+					data: {
+						'provider': jQuery('input[name=wpsg_mod_legaltexts_provider]:checked').val()
+					},
+					success: function(data) {
+	
+						jQuery(target).prev().addClass('open');
+						jQuery(target).html(data);
+						jQuery(target).slideDown(125);
+						
+					}
+				} );
+				
+			}
 			
 		} ).change();
