Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 8123)
+++ /controller/wpsg_ShopController.class.php	(revision 8125)
@@ -317,18 +317,18 @@
 			
 			if ($this->get_option('wpsg_multiblog_standalone', true) === false) $this->update_option('wpsg_multiblog_standalone', '1', true);
-			if ($this->get_option('wpsg_customer_start', true) === false) $this->update_option('wpsg_customer_start', '1', true);
-			if ($this->get_option('wpsg_order_start', true) === false) $this->update_option('wpsg_order_start', '1', true);			
-			
-			if ($this->get_option('wpsg_page_basket') === false) $this->createPage(__('Warenkorb', 'wpsg'), 'wpsg_page_basket', '-1');
-			if ($this->get_option('wpsg_currency') === false) $this->update_option('wpsg_currency', 'EUR');
-			if ($this->get_option('wpsg_produkte_perpage') === false) $this->update_option('wpsg_produkte_perpage', '25');
-			if ($this->get_option('wpsg_order_perpage') === false) $this->update_option('wpsg_order_perpage', '25');
-			if ($this->get_option('wpsg_page_basket_more') === false) $this->createPage(__('Weiter shoppen', 'wpsg'), 'wpsg_page_basket_more', '-1');			
-			if ($this->get_option('wpsg_page_versand') === false) $this->createPage(__('Versandkosten', 'wpsg'), 'wpsg_page_versand', '-1');
-			if ($this->get_option('wpsg_page_agb') === false) $this->createPage(__('AGB', 'wpsg'), 'wpsg_page_agb', '-1');
-			if ($this->get_option('wpsg_page_datenschutz') === false) $this->createPage(__('Datenschutz', 'wpsg'), 'wpsg_page_datenschutz', '-1');
+			if ($this->get_option('wpsg_customer_start', true) 	  === false) $this->update_option('wpsg_customer_start', '1', true);
+			if ($this->get_option('wpsg_order_start', true) 	  === false) $this->update_option('wpsg_order_start', '1', true);			
+			
+			if ($this->get_option('wpsg_page_basket') 			  === false) $this->createPage(__('Warenkorb', 'wpsg'), 'wpsg_page_basket', '-1');
+			if ($this->get_option('wpsg_currency') 				  === false) $this->update_option('wpsg_currency', 'EUR');
+			if ($this->get_option('wpsg_produkte_perpage') 		  === false) $this->update_option('wpsg_produkte_perpage', '25');
+			if ($this->get_option('wpsg_order_perpage') 		  === false) $this->update_option('wpsg_order_perpage', '25');
+			if ($this->get_option('wpsg_page_basket_more')  	  === false) $this->createPage(__('Weiter shoppen', 'wpsg'), 'wpsg_page_basket_more', '-1');			
+			if ($this->get_option('wpsg_page_versand') 			  === false) $this->createPage(__('Versandkosten', 'wpsg'), 'wpsg_page_versand', '-1');
+			if ($this->get_option('wpsg_page_agb') 				  === false) $this->createPage(__('AGB', 'wpsg'), 'wpsg_page_agb', '-1');
+			if ($this->get_option('wpsg_page_datenschutz') 		  === false) $this->createPage(__('Datenschutz', 'wpsg'), 'wpsg_page_datenschutz', '-1');
 			if ($this->get_option('wpsg_page_widerrufsbelehrung') === false) $this->createPage(__('Widerrufsbelehrung', 'wpsg'), 'wpsg_page_widerrufsbelehrung', '-1');
-			if ($this->get_option('wpsg_page_impressum') === false) $this->createPage(__('Impressum', 'wpsg'), 'wpsg_page_impressum', '-1');
-            if ($this->get_option('wpsg_page_product') === false) $this->createPage(__('Produktdetails', 'wpsg'), 'wpsg_page_product', '-1');
+			if ($this->get_option('wpsg_page_impressum') 		  === false) $this->createPage(__('Impressum', 'wpsg'), 'wpsg_page_impressum', '-1');
+            if ($this->get_option('wpsg_page_product') 			  === false) $this->createPage(__('Produktdetails', 'wpsg'), 'wpsg_page_product', '-1');
 			//if ($this->get_option('wpsg_page_onlinedisputeresolution') === false) $this->createPage(__('Online Streitbeilegung', 'wpsg'), 'wpsg_page_onlinedisputeresolution', '-1');
 			
@@ -442,16 +442,16 @@
 
 			// Betreffs der E-Mails vordefinieren
-			$this->checkDefault('wpsg_global_betreff', 'Allgemeiner Betreff', false, true);
-			$this->checkDefault('wpsg_global_absender', 'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME);
-
-			$this->checkDefault('wpsg_adminmail_betreff', 'Eingang einer neuen Bestellung', false, true);
-			$this->checkDefault('wpsg_adminmail_absender', 'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME);
+			$this->checkDefault('wpsg_global_betreff', 		 'Allgemeiner Betreff', false, true);
+			$this->checkDefault('wpsg_global_absender',		 'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME);
+
+			$this->checkDefault('wpsg_adminmail_betreff', 	 'Eingang einer neuen Bestellung', false, true);
+			$this->checkDefault('wpsg_adminmail_absender', 	 'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME);
 			$this->checkDefault('wpsg_adminmail_empfaenger', 'bestellungen@'.$_SERVER['HTTP_HOST']);
 
-			$this->checkDefault('wpsg_kundenmail_betreff', 'BestellbestÃ€tigung', false, true);
-			$this->checkDefault('wpsg_kundenmail_absender', 'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME );
-
-			$this->checkDefault('wpsg_status_betreff', 'StatusÃ€nderung Ihrer Bestellung', false, true);
-			$this->checkDefault('wpsg_status_absender', 'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME);
+			$this->checkDefault('wpsg_kundenmail_betreff', 	 'BestellbestÃ€tigung', false, true);
+			$this->checkDefault('wpsg_kundenmail_absender',  'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME );
+
+			$this->checkDefault('wpsg_status_betreff', 		 'StatusÃ€nderung Ihrer Bestellung', false, true);
+			$this->checkDefault('wpsg_status_absender', 	 'Shop XYZ <shop@'.$_SERVER['HTTP_HOST'].'>', false, false, WPSG_SANITIZE_EMAILNAME);
 
 			$this->checkDefault('wpsg_path_upload_multiblog', 'uploads/sites/%blog_id%/', true);
@@ -655,5 +655,5 @@
 			}
 
-			if (wpsg_isSizedString($mod)) $url .= ((strpos($url, '?') === false)?'?':'&').'wpsg_mod='.$mod;
+			if (wpsg_isSizedString($mod))    $url .= ((strpos($url, '?') === false)?'?':'&').'wpsg_mod='.$mod;
 			if (wpsg_isSizedString($action)) $url .= ((strpos($url, '?') === false)?'?':'&').'wpsg_action='.$action;
 			if (wpsg_isSizedArray($arParam)) $url .= ((strpos($url, '?') === false)?'?':'&').http_build_query($arParam);
@@ -781,6 +781,6 @@
                     'render_callback' => ['\wpsg\GutenbergBlock', 'product'],
                     'attributes' => [
-                        'product' => ['type' => 'string'],
-                        'template' => ['type' => 'string'],
+                        'product'    => ['type' => 'string'],
+                        'template'   => ['type' => 'string'],
                         'hide_title' => ['type' => 'string']
                     ],
@@ -804,12 +804,12 @@
         	$arReturn = [
         		1 => [
-					'label' => __('Hauptsitz', 'wpsg'),
-					'street' => $this->get_option('wpsg_shopdata_street'),
-					'zip' => $this->get_option('wpsg_shopdata_zip'),
-					'city' => $this->get_option('wpsg_shopdata_city'),
+					'label'   => __('Hauptsitz', 'wpsg'),
+					'street'  => $this->get_option('wpsg_shopdata_street'),
+					'zip' 	  => $this->get_option('wpsg_shopdata_zip'),
+					'city'    => $this->get_option('wpsg_shopdata_city'),
 					'country' => $this->getDefaultCountry()->getName(),
-					'tel' => $this->get_option('wpsg_shopdata_tel'),
-					'fax' => $this->get_option('wpsg_shopdata_fax'),
-					'email' => $this->get_option('wpsg_shopdata_email')
+					'tel' 	  => $this->get_option('wpsg_shopdata_tel'),
+					'fax' 	  => $this->get_option('wpsg_shopdata_fax'),
+					'email'   => $this->get_option('wpsg_shopdata_email')
 				],
 			];
@@ -818,12 +818,12 @@
         		
         		$arReturn[2] = [
-        			'label' => __('Zweigstelle', 'wpsg'),
-        			'street' => $this->get_option('wpsg_shopdata_2_street'),
-					'zip' => $this->get_option('wpsg_shopdata_2_zip'),
-					'city' => $this->get_option('wpsg_shopdata_2_city'),
+        			'label'   => __('Zweigstelle', 'wpsg'),
+        			'street'  => $this->get_option('wpsg_shopdata_2_street'),
+					'zip' 	  => $this->get_option('wpsg_shopdata_2_zip'),
+					'city' 	  => $this->get_option('wpsg_shopdata_2_city'),
 					'country' => $this->get_option('wpsg_shopdata_2_country'),
-					'tel' => $this->get_option('wpsg_shopdata_2_tel'),
-					'fax' => $this->get_option('wpsg_shopdata_2_fax'),
-					'email' => $this->get_option('wpsg_shopdata_2_email')
+					'tel'     => $this->get_option('wpsg_shopdata_2_tel'),
+					'fax' 	  => $this->get_option('wpsg_shopdata_2_fax'),
+					'email'   => $this->get_option('wpsg_shopdata_2_email')
 				];
 					
@@ -979,14 +979,14 @@
 			{
 
-				wp_enqueue_script('wpsg_bsjs', $this->getRessourceURL('js/bootstrap-3.4.1-dist/js/bootstrap.min.js'));
+				wp_enqueue_script('wpsg_bsjs',  $this->getRessourceURL('js/bootstrap-3.4.1-dist/js/bootstrap.min.js'));
                 wp_enqueue_script('wpsg_vuejs', $this->getRessourceURL('js/vue.min.js'));
 
 				wp_enqueue_script('common');
 
-				wp_enqueue_script('wpsg_adminjs', $this->getRessourceURL('js/admin.js'));
-                wp_enqueue_script('wpsg_momentjs', $this->getRessourceURL('js/moment_2.0.0.min.js'));
-				wp_enqueue_script('wpsg_cookiejs', $this->getRessourceURL('js/jquery.cookie.js'));
+				wp_enqueue_script('wpsg_adminjs', 	  $this->getRessourceURL('js/admin.js'));
+                wp_enqueue_script('wpsg_momentjs', 	  $this->getRessourceURL('js/moment_2.0.0.min.js'));
+				wp_enqueue_script('wpsg_cookiejs', 	  $this->getRessourceURL('js/jquery.cookie.js'));
 				wp_enqueue_script('wpsg_bs_editable', $this->getRessourceURL('js/bootstrap3-editable-1.5.1/bootstrap3-editable/js/bootstrap-editable.js'));
-				wp_enqueue_script('wpsg_editable', $this->getRessourceURL('js/editable.js'));
+				wp_enqueue_script('wpsg_editable',    $this->getRessourceURL('js/editable.js'));
 
 				wp_enqueue_script('utils');
@@ -1000,7 +1000,7 @@
 				wp_enqueue_script('jquery-ui-datepicker-de', $this->url(WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/lib/ui/jquery.ui.datepicker-de.js'), array('jquery', 'jquery-ui-core'));
 
-				wp_enqueue_style('wpsg-bscss', $GLOBALS['wpsg_sc']->getRessourceURL('js/bootstrap-3.4.1-dist/css/bootstrap.css'));
+				wp_enqueue_style('wpsg-bscss',		  $GLOBALS['wpsg_sc']->getRessourceURL('js/bootstrap-3.4.1-dist/css/bootstrap.css'));
 				wp_enqueue_style('wpsg-bs-theme-css', $GLOBALS['wpsg_sc']->getRessourceURL('js/bootstrap-3.4.1-dist/css/bootstrap-theme.css'));
-				wp_enqueue_style('wpsg_bs_editable', $GLOBALS['wpsg_sc']->getRessourceURL('js/bootstrap3-editable-1.5.1/bootstrap3-editable/css/bootstrap-editable.css'));
+				wp_enqueue_style('wpsg_bs_editable',  $GLOBALS['wpsg_sc']->getRessourceURL('js/bootstrap3-editable-1.5.1/bootstrap3-editable/css/bootstrap-editable.css'));
 
 				wp_enqueue_style('wp-jquery-ui-dialog');
@@ -1035,5 +1035,5 @@
                 if ($this->get_option('wpsg_load_css') != '1') wp_enqueue_style('wpsg-frontendstyle', '/?wpsg_scss');
 				
-				if ($this->get_option('wpsg_load_thickbox_js') == '1') wp_enqueue_script('thickbox', null, array('jquery'));
+				if ($this->get_option('wpsg_load_thickbox_js')  == '1') wp_enqueue_script('thickbox', null, array('jquery'));
 				if ($this->get_option('wpsg_load_thickbox_css') == '1') 
 				{
@@ -1729,12 +1729,10 @@
 
 			// Das Template im UserView suchen
-			$template_file_child_theme = str_replace(WPSG_PATH_PRODUKTTEMPLATES, WPSG_PATH_PRODUKTTEMPLATES_CTV, $template_file);
-            $template_file_theme = str_replace(WPSG_PATH_PRODUKTTEMPLATES, WPSG_PATH_PRODUKTTEMPLATES_TV, $template_file);
-            $template_file_uv = str_replace(WPSG_PATH_PRODUKTTEMPLATES, WPSG_PATH_PRODUKTTEMPLATES_UV, $template_file);
-            $template_file_uv_old = str_replace(WPSG_PATH_PRODUKTTEMPLATES, WPSG_PATH_PRODUKTTEMPLATES_UV_OLD, $template_file);
-
-            if (file_exists($template_file_child_theme) && $wpsg_ignoreuserview != '1') $template_file = $template_file_child_theme;
-			else if (file_exists($template_file_theme) && $wpsg_ignoreuserview != '1') $template_file = $template_file_theme;
-			else if (file_exists($template_file_uv) && $wpsg_ignoreuserview != '1') $template_file = $template_file_uv;
+            $template_file_theme = 		 str_replace(WPSG_PATH_PRODUKTTEMPLATES, WPSG_PATH_PRODUKTTEMPLATES_THEME, 	$template_file);
+            $template_file_uv = 		 str_replace(WPSG_PATH_PRODUKTTEMPLATES, WPSG_PATH_PRODUKTTEMPLATES_UV, 	$template_file);
+            $template_file_uv_old = 	 str_replace(WPSG_PATH_PRODUKTTEMPLATES, WPSG_PATH_PRODUKTTEMPLATES_UV_OLD, $template_file);
+
+				 if (file_exists($template_file_theme) 	&& $wpsg_ignoreuserview != '1') $template_file = $template_file_theme;
+			else if (file_exists($template_file_uv) 	&& $wpsg_ignoreuserview != '1') $template_file = $template_file_uv;
 			else if (file_exists($template_file_uv_old) && $wpsg_ignoreuserview != '1') $template_file = $template_file_uv_old;
 			else if ($wpsg_ignoreuserview != '1') {
@@ -1779,7 +1777,7 @@
 
 			$html .= '<div style="display:none;">';
-			$html .= '<input type="hidden" name="wpsg[template]" value="'.basename($template_file).'" />';
-			$html .= '<input type="hidden" name="myReferer" value="'.htmlspecialchars($myReferer).'" />';
-			$html .= '<input type="hidden" name="wpsg[produkt_id]" value="'.$this->getProduktId($produkt_id).'" />';
+			$html .= '<input type="hidden" name="wpsg[template]" 	value="'.basename($template_file).'" />';
+			$html .= '<input type="hidden" name="myReferer" 		value="'.htmlspecialchars($myReferer).'" />';
+			$html .= '<input type="hidden" name="wpsg[produkt_id]"  value="'.$this->getProduktId($produkt_id).'" />';
 			$html .= '<input type="hidden" name="wpsg[product_key]" value="'.$this->view['data']['product_key'].'" />';
 			$html .= '</div>';
@@ -1827,14 +1825,10 @@
 
 			/* Varianten=true -> Ã¶ffnet Lightbox mit Variantenauswahl */
+
 			$strReturn .= (($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', array($product_id)))?'wpsg_variantProduct':'');
-
 			$strReturn .= '" ';
-
 			$strReturn .= ' data-product_id="'.wpsg_hspc($product_id).'" ';
-
 			$strReturn .= ' href="'.wpsg_url($product_url).'" ';
-
 			$strReturn .= ' title="'.wpsg_hspc($title).'" ';
-
 			$strReturn .= '>'.wpsg_hspc($linktext).'</a>';
 
@@ -2053,5 +2047,5 @@
 				
 					$_SESSION['wpsg']['checkout']['payment'] = $this->get_option('wpsg_customerpreset_payment');
-					$this->basket->arCheckout['payment'] = $this->get_option('wpsg_customerpreset_payment');
+					$this->basket->arCheckout['payment']     = $this->get_option('wpsg_customerpreset_payment');
 					
 					$oCalculation->update();
@@ -2076,5 +2070,5 @@
 
 				$_SESSION['wpsg']['checkout']['title'] = $this->get_option('wpsg_customerpreset_title');
-				$this->basket->arCheckout['title'] = $this->get_option('wpsg_customerpreset_title');
+				$this->basket->arCheckout['title']	   = $this->get_option('wpsg_customerpreset_title');
 				
 				if (isset($this->view['basket'])) $this->view['basket']['checkout']['title'] = $_SESSION['wpsg']['checkout']['land'];
@@ -2477,30 +2471,13 @@
 			} @closedir($handle); }
 
-			$handle = @opendir(WPSG_PATH_PRODUKTTEMPLATES_TV);
-			if ($handle) { while ($file = readdir($handle))
-			{
-
-				if (is_file(WPSG_PATH_PRODUKTTEMPLATES_TV.$file) && preg_match('/(.*).phtml$/', $file) && !in_array($file, $arTemplates))
-				{
-
-                    if ($fullpath && $view_path) $file = WPSG_PATH_PRODUKTTEMPLATES.$file;
-                    else if ($fullpath) $file = WPSG_PATH_PRODUKTTEMPLATES_TV.$file;
-
-					if ($key) $arTemplates[$file] = $file;
-					else $arTemplates[] = $file;
-
-				}
-
-			} @closedir($handle); }
-
-            $handle = @opendir(WPSG_PATH_PRODUKTTEMPLATES_CTV);
+            $handle = @opendir(WPSG_PATH_PRODUKTTEMPLATES_THEME);
             if ($handle) { while ($file = readdir($handle))
             {
 
-                if (is_file(WPSG_PATH_PRODUKTTEMPLATES_CTV.$file) && preg_match('/(.*).phtml$/', $file) && !in_array($file, $arTemplates))
+                if (is_file(WPSG_PATH_PRODUKTTEMPLATES_THEME.$file) && preg_match('/(.*).phtml$/', $file) && !in_array($file, $arTemplates))
                 {
 
                     if ($fullpath && $view_path) $file = WPSG_PATH_PRODUKTTEMPLATES.$file;
-                    else if ($fullpath) $file = WPSG_PATH_PRODUKTTEMPLATES_CTV.$file;
+                    else if ($fullpath) $file = WPSG_PATH_PRODUKTTEMPLATES_THEME.$file;
 
                     if ($key) $arTemplates[$file] = $file;
@@ -3534,8 +3511,8 @@
 
 			$from = $this->getMailValue('wpsg_'.$mail_key.'_absender');
-			$cc = $this->getMailValue('wpsg_'.$mail_key.'_cc');
-			$bcc = $this->getMailValue('wpsg_'.$mail_key.'_bcc');
-
-			$subject = $this->replaceUniversalPlatzhalter($subject, $o_id, $k_id);
+			$cc   = $this->getMailValue('wpsg_'.$mail_key.'_cc');
+			$bcc  = $this->getMailValue('wpsg_'.$mail_key.'_bcc');
+
+			$subject   = $this->replaceUniversalPlatzhalter($subject,   $o_id, $k_id);
 			$mail_text = $this->replaceUniversalPlatzhalter($mail_text, $o_id, $k_id);
 			$mail_html = $this->replaceUniversalPlatzhalter($mail_html, $o_id, $k_id);
@@ -3677,7 +3654,7 @@
 			if (!array_key_exists($kv_id, $arKV['custom'])) return;
 
-			$this->view['error'] = $checkout_view['error'];
+			$this->view['error']  = $checkout_view['error'];
 			$this->view['basket'] = $checkout_view['basket'];
-			$this->view['field'] = $arKV['custom'][$kv_id];
+			$this->view['field']  = $arKV['custom'][$kv_id];
 			$this->view['field']['id'] = $kv_id;
 
@@ -3724,23 +3701,23 @@
 				$arReplace['/%order_done_url%/i'] = $this->getDoneURL($order_id);
  
-				$arReplace['/%order_shipping_title%/i'] = $oOrder->getShippingTitle();
-				$arReplace['/%order_shipping_name%/i'] = $oOrder->getShippingName();
-				$arReplace['/%order_shipping_vname%/i'] = $oOrder->getShippingFirstName();
-				$arReplace['/%order_shipping_firma%/i'] = $oOrder->getShippingCompany();
-				$arReplace['/%order_shipping_strasse%/i'] = $oOrder->getShippingStreetClear();
-				$arReplace['/%order_shipping_nr%/i'] = $oOrder->getShippingStreetNr();
-				$arReplace['/%order_shipping_plz%/i'] = $oOrder->getShippingZip();
-				$arReplace['/%order_shipping_ort%/i'] = $oOrder->getShippingCity();
-				$arReplace['/%order_shipping_land%/i'] = $oOrder->getShippingCountryName();
+				$arReplace['/%order_shipping_title%/i'] 	= $oOrder->getShippingTitle();
+				$arReplace['/%order_shipping_name%/i'] 		= $oOrder->getShippingName();
+				$arReplace['/%order_shipping_vname%/i'] 	= $oOrder->getShippingFirstName();
+				$arReplace['/%order_shipping_firma%/i'] 	= $oOrder->getShippingCompany();
+				$arReplace['/%order_shipping_strasse%/i'] 	= $oOrder->getShippingStreetClear();
+				$arReplace['/%order_shipping_nr%/i'] 		= $oOrder->getShippingStreetNr();
+				$arReplace['/%order_shipping_plz%/i'] 		= $oOrder->getShippingZip();
+				$arReplace['/%order_shipping_ort%/i'] 		= $oOrder->getShippingCity();
+				$arReplace['/%order_shipping_land%/i'] 		= $oOrder->getShippingCountryName();
 				
-				$arReplace['/%order_invoice_title%/i'] = $oOrder->getInvoiceTitle();
-				$arReplace['/%order_invoice_name%/i'] = $oOrder->getInvoiceName();
-				$arReplace['/%order_invoice_vname%/i'] = $oOrder->getInvoiceFirstName();
-				$arReplace['/%order_invoice_firma%/i'] = $oOrder->getInvoiceCompany();
-				$arReplace['/%order_invoice_strasse%/i'] = $oOrder->getInvoiceStreetClear();
-				$arReplace['/%order_invoice_nr%/i'] = $oOrder->getInvoiceStreetNr();
-				$arReplace['/%order_invoice_plz%/i'] = $oOrder->getInvoiceZip();
-				$arReplace['/%order_invoice_ort%/i'] = $oOrder->getInvoiceCity();
-				$arReplace['/%order_invoice_land%/i'] = $oOrder->getInvoiceCountryName();
+				$arReplace['/%order_invoice_title%/i']		= $oOrder->getInvoiceTitle();
+				$arReplace['/%order_invoice_name%/i'] 		= $oOrder->getInvoiceName();
+				$arReplace['/%order_invoice_vname%/i'] 		= $oOrder->getInvoiceFirstName();
+				$arReplace['/%order_invoice_firma%/i'] 		= $oOrder->getInvoiceCompany();
+				$arReplace['/%order_invoice_strasse%/i']	= $oOrder->getInvoiceStreetClear();
+				$arReplace['/%order_invoice_nr%/i'] 		= $oOrder->getInvoiceStreetNr();
+				$arReplace['/%order_invoice_plz%/i'] 		= $oOrder->getInvoiceZip();
+				$arReplace['/%order_invoice_ort%/i'] 		= $oOrder->getInvoiceCity();
+				$arReplace['/%order_invoice_land%/i'] 		= $oOrder->getInvoiceCountryName();
 				
 			}
@@ -3839,53 +3816,53 @@
 			$arReplace['/%widerrufsformular_url%/i'] = WPSG_URL_UPLOADS.'wpsg_revocation/'.$this->get_option('wpsg_revocationform');
 
-			$arReplace['/%anfrageliste_url%/i'] = $this->getURL(wpsg_ShopController::URL_REQUEST);
-			$arReplace['/%warenkorb_url%/i'] = $this->getURL(wpsg_ShopController::URL_BASKET);
-			$arReplace['/%warenkorb_more_url%/i'] = $this->getURL(wpsg_ShopController::URL_BASKET_MORE);
-			$arReplace['/%versandkosten_url%/i'] = $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN);
-			$arReplace['/%agb_url%/i'] = $this->getURL(wpsg_ShopController::URL_AGB);
-			$arReplace['/%datenschutz_url%/i'] = $this->getURL(wpsg_ShopController::URL_DATENSCHUTZ);
-			$arReplace['/%widerruf_url%/i'] = $this->getURL(wpsg_ShopController::URL_WIDERRUF);
-			$arReplace['/%kundendaten_url%/i'] = $this->getURL(wpsg_ShopController::URL_CHECKOUT);
-			$arReplace['/%impressum_url%/i'] = $this->getURL(wpsg_ShopController::URL_IMPRESSUM);
-			$arReplace['/%profil_url%/i'] = $this->getURL(wpsg_ShopController::URL_PROFIL);
-			$arReplace['/%bestellungen_url%/i'] = $this->getURL(wpsg_ShopController::URL_ORDER);
-			$arReplace['/%abo_url%/i'] = $this->getURL(wpsg_ShopController::URL_ABO);
-			$arReplace['/%logout_url%/i'] = $this->getURL(wpsg_ShopController::URL_LOGOUT);
+			$arReplace['/%anfrageliste_url%/i'] 	 = $this->getURL(wpsg_ShopController::URL_REQUEST);
+			$arReplace['/%warenkorb_url%/i'] 		 = $this->getURL(wpsg_ShopController::URL_BASKET);
+			$arReplace['/%warenkorb_more_url%/i'] 	 = $this->getURL(wpsg_ShopController::URL_BASKET_MORE);
+			$arReplace['/%versandkosten_url%/i'] 	 = $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN);
+			$arReplace['/%agb_url%/i'] 				 = $this->getURL(wpsg_ShopController::URL_AGB);
+			$arReplace['/%datenschutz_url%/i'] 		 = $this->getURL(wpsg_ShopController::URL_DATENSCHUTZ);
+			$arReplace['/%widerruf_url%/i'] 		 = $this->getURL(wpsg_ShopController::URL_WIDERRUF);
+			$arReplace['/%kundendaten_url%/i'] 		 = $this->getURL(wpsg_ShopController::URL_CHECKOUT);
+			$arReplace['/%impressum_url%/i'] 		 = $this->getURL(wpsg_ShopController::URL_IMPRESSUM);
+			$arReplace['/%profil_url%/i'] 			 = $this->getURL(wpsg_ShopController::URL_PROFIL);
+			$arReplace['/%bestellungen_url%/i'] 	 = $this->getURL(wpsg_ShopController::URL_ORDER);
+			$arReplace['/%abo_url%/i'] 				 = $this->getURL(wpsg_ShopController::URL_ABO);
+			$arReplace['/%logout_url%/i'] 			 = $this->getURL(wpsg_ShopController::URL_LOGOUT);
 			$arReplace['/%passwortvergessen_url%/i'] = $this->getURL(wpsg_ShopController::URL_LOSTPWD);
 
 			/* Shopinfo */
-			$arReplace['/%shopinfo_name%/i'] = $this->get_option('wpsg_shopdata_name');
-			$arReplace['/%shopinfo_owner%/i'] = $this->get_option('wpsg_shopdata_owner');
-			$arReplace['/%shopinfo_tel%/i'] = $this->get_option('wpsg_shopdata_tel');
-			$arReplace['/%shopinfo_fax%/i'] = $this->get_option('wpsg_shopdata_fax');
-			$arReplace['/%shopinfo_email%/i'] = $this->get_option('wpsg_shopdata_email');
-			$arReplace['/%shopinfo_taxnr%/i'] = $this->get_option('wpsg_shopdata_taxnr');
-			$arReplace['/%shopinfo_ustidnr%/i'] = $this->get_option('wpsg_shopdata_ustidnr');
-			$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_country%/i'] = $this->getDefaultCountry()->getName();
-			
-			$arReplace['/%shopinfo_2_street%/i'] = $this->get_option('wpsg_shopdata_2_street');
-			$arReplace['/%shopinfo_2_zip%/i'] = $this->get_option('wpsg_shopdata_2_zip');
-			$arReplace['/%shopinfo_2_city%/i'] = $this->get_option('wpsg_shopdata_2_city');
-			$arReplace['/%shopinfo_2_country%/i'] = $this->get_option('wpsg_shopdata_2_country');
-			$arReplace['/%shopinfo_2_tel%/i'] = $this->get_option('wpsg_shopdata_2_tel');
-			$arReplace['/%shopinfo_2_fax%/i'] = $this->get_option('wpsg_shopdata_2_fax');
-			$arReplace['/%shopinfo_2_email%/i'] = $this->get_option('wpsg_shopdata_2_email');
-			
-			$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_name%/i'] 		 = $this->get_option('wpsg_shopdata_name');
+			$arReplace['/%shopinfo_owner%/i'] 		 = $this->get_option('wpsg_shopdata_owner');
+			$arReplace['/%shopinfo_tel%/i'] 		 = $this->get_option('wpsg_shopdata_tel');
+			$arReplace['/%shopinfo_fax%/i'] 		 = $this->get_option('wpsg_shopdata_fax');
+			$arReplace['/%shopinfo_email%/i'] 		 = $this->get_option('wpsg_shopdata_email');
+			$arReplace['/%shopinfo_taxnr%/i'] 		 = $this->get_option('wpsg_shopdata_taxnr');
+			$arReplace['/%shopinfo_ustidnr%/i'] 	 = $this->get_option('wpsg_shopdata_ustidnr');
+			$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_country%/i'] 	 = $this->getDefaultCountry()->getName();
+			 
+			$arReplace['/%shopinfo_2_street%/i'] 	 = $this->get_option('wpsg_shopdata_2_street');
+			$arReplace['/%shopinfo_2_zip%/i'] 		 = $this->get_option('wpsg_shopdata_2_zip');
+			$arReplace['/%shopinfo_2_city%/i'] 		 = $this->get_option('wpsg_shopdata_2_city');
+			$arReplace['/%shopinfo_2_country%/i'] 	 = $this->get_option('wpsg_shopdata_2_country');
+			$arReplace['/%shopinfo_2_tel%/i'] 		 = $this->get_option('wpsg_shopdata_2_tel');
+			$arReplace['/%shopinfo_2_fax%/i'] 		 = $this->get_option('wpsg_shopdata_2_fax');
+			$arReplace['/%shopinfo_2_email%/i'] 	 = $this->get_option('wpsg_shopdata_2_email');
+			 
+			$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');
-			$arReplace['/%shopinfo_iban%/i'] = $this->get_option('wpsg_shopdata_bank_iban');
-			$arReplace['/%shopinfo_bic%/i'] = $this->get_option('wpsg_shopdata_bank_bic');
+			$arReplace['/%shopinfo_iban%/i'] 		 = $this->get_option('wpsg_shopdata_bank_iban');
+			$arReplace['/%shopinfo_bic%/i'] 		 = $this->get_option('wpsg_shopdata_bank_bic');
 
 			/* Platzhalter fÃŒr die Warenkorbdarstellung, da es recht aufwendig ist suche ich hier vorher nach dem Vorkommen */
@@ -3902,9 +3879,9 @@
 				$current_user = wp_get_current_user();
 				
-				$arReplace['/%user_username%/i'] = $current_user->user_login;
-				$arReplace['/%user_email%/i'] = $current_user->user_email;
+				$arReplace['/%user_username%/i']  = $current_user->user_login;
+				$arReplace['/%user_email%/i'] 	  = $current_user->user_email;
 				$arReplace['/%user_firstname%/i'] = $current_user->user_firstname;				
-				$arReplace['/%user_lastname%/i'] = $current_user->user_lastname;
-				$arReplace['/%display_name%/i'] = $current_user->display_name; 
+				$arReplace['/%user_lastname%/i']  = $current_user->user_lastname;
+				$arReplace['/%display_name%/i']   = $current_user->display_name; 
 				
 			}
@@ -3936,10 +3913,10 @@
 
                 $path = WPSG_PATH_CONTENT.WPSG_MB_UPLOADS.'/wpsg/wpsg_public/';
-                $url = WPSG_URL_CONTENT.WPSG_MB_UPLOADS.'/wpsg/wpsg_public/';
+                $url  = WPSG_URL_CONTENT.WPSG_MB_UPLOADS.'/wpsg/wpsg_public/';
 
             } else {
 
                 $path = WPSG_PATH_CONTENT.'uploads/wpsg/wpsg_public/';
-                $url = WPSG_URL_CONTENT.'uploads/wpsg/wpsg_public/';
+                $url  = WPSG_URL_CONTENT.'uploads/wpsg/wpsg_public/';
 
             }
@@ -3959,10 +3936,10 @@
 
 				$path = WPSG_PATH_CONTENT.WPSG_MB_UPLOADS.'/wpsg/wpsg_temp/';
-				$url = WPSG_URL_CONTENT.WPSG_MB_UPLOADS.'/wpsg/wpsg_temp/';
+				$url  = WPSG_URL_CONTENT.WPSG_MB_UPLOADS.'/wpsg/wpsg_temp/';
 
 			} else {
 
 				$path = WPSG_PATH_CONTENT.'uploads/wpsg/wpsg_temp/';
-				$url = WPSG_URL_CONTENT.'uploads/wpsg/wpsg_temp/';
+				$url  = WPSG_URL_CONTENT.'uploads/wpsg/wpsg_temp/';
 
 			}
@@ -4443,20 +4420,20 @@
 			if (!wpsg_isSizedArray($arPflicht)) {
 				$arPflicht = array();
-				$arPflicht['anrede'] = '1';
+				$arPflicht['anrede'] 		 = '1';
 				$arPflicht['anrede_auswahl'] = 'Herr|Frau';
-				$arPflicht['firma'] = '1';
-				$arPflicht['vname'] = '1';
-				$arPflicht['name'] = '1';
-				$arPflicht['geb'] = '1';
-				$arPflicht['email'] = '1';
-				$arPflicht['emailconfirm'] = '1';
-				$arPflicht['tel'] = '1';
-				$arPflicht['fax'] = '1';
-				$arPflicht['strasse'] = '1';
-				$arPflicht['wpsg_showNr'] = '0';
-				$arPflicht['plz'] = '1';
-				$arPflicht['ort'] = '1';
-				$arPflicht['land'] = '1';
-				$arPflicht['ustidnr'] = '1';
+				$arPflicht['firma'] 		 = '1';
+				$arPflicht['vname']			 = '1';
+				$arPflicht['name'] 			 = '1';
+				$arPflicht['geb'] 			 = '1';
+				$arPflicht['email'] 		 = '1';
+				$arPflicht['emailconfirm']   = '1';
+				$arPflicht['tel'] 			 = '1';
+				$arPflicht['fax'] 			 = '1';
+				$arPflicht['strasse'] 		 = '1';
+				$arPflicht['wpsg_showNr'] 	 = '0';
+				$arPflicht['plz'] 			 = '1';
+				$arPflicht['ort'] 			 = '1';
+				$arPflicht['land'] 			 = '1';
+				$arPflicht['ustidnr'] 		 = '1';
 				
 			}
@@ -4470,5 +4447,5 @@
 				{
 
-					$arPflicht['custom'][$k]['name'] = __($arPflicht['custom'][$k]['name'], 'wpsg');
+					$arPflicht['custom'][$k]['name']    = __($arPflicht['custom'][$k]['name'],    'wpsg');
 					$arPflicht['custom'][$k]['auswahl'] = __($arPflicht['custom'][$k]['auswahl'], 'wpsg');
 
@@ -4523,9 +4500,9 @@
                 '/%i%/' => date('i'),
                 '/%s%/' => date('s'),
-                '/%oid%/' => $o_id,
-                '/%onr%/' => $onr,
+                '/%oid%/' 		=> $o_id,
+                '/%onr%/' 		=> $onr,
                 '/%order_onr%/' => $onr,
-                '/%kid%/' => $k_id,
-                '/%knr%/' => $knr,
+                '/%kid%/' 		=> $k_id,
+                '/%knr%/' 		=> $knr,
                 '/%kunde_knr%/' => $knr
 			);
@@ -4573,9 +4550,9 @@
 				'/%i%/' => date('i'),
 				'/%s%/' => date('s'),
-				'/%knr%/' => $knr,
-				'/%kid%/' => $k_id,
-				'/%kunde_id%/' => $k_id,
+				'/%knr%/' 	=> $knr,
+				'/%kid%/' 	=> $k_id,
+				'/%kunde_id%/'  => $k_id,
 				'/%kunde_knr%/' => $knr,
-				'/%id%/' => $k_id
+				'/%id%/' 	=> $k_id
 			);
 
Index: /controller/wpsg_SystemController.class.php
===================================================================
--- /controller/wpsg_SystemController.class.php	(revision 8123)
+++ /controller/wpsg_SystemController.class.php	(revision 8125)
@@ -507,5 +507,5 @@
 		{
 
-            if (file_exists(WPSG_PATH_CHILD_TEMPLATEVIEW.$path) && $this->get_option('wpsg_ignoreuserview') != '1')
+            if (file_exists(WPSG_PATH_PRODUKTTEMPLATES_THEME.$path) && $this->get_option('wpsg_ignoreuserview') != '1')
             {
 
@@ -617,16 +617,16 @@
             $path_view = preg_replace('/\/views\/(.*)/', '', $file).'/views/';
 
-            // Datei im UserView
-            $uv_file = str_replace($path_view, WPSG_PATH_USERVIEW, $file);
-            $uv_old_file = str_replace($path_view, WPSG_PATH_USERVIEW_OLD, $file);
-            $theme_file = str_replace($path_view, WPSG_PATH_TEMPLATEVIEW, $file);
-            $child_theme_file = str_replace($path_view, WPSG_PATH_CHILD_TEMPLATEVIEW, $file);
+            $uv_file = 			str_replace($path_view, WPSG_PATH_USERVIEW, $file);
+            $uv_old_file = 		str_replace($path_view, WPSG_PATH_USERVIEW_OLD, $file);
+            $theme_file = 		str_replace($path_view, WPSG_PATH_TEMPLATEVIEW, $file);
+            $child_theme_file = str_replace($path_view, WPSG_PATH_PRODUKTTEMPLATES_THEME, $file);
+
 
             $wpsg_ignoreuserview = $this->get_option('wpsg_ignoreuserview');
 
-            if (file_exists($child_theme_file) && $wpsg_ignoreuserview != '1') $render_file = $child_theme_file;
-            else if (file_exists($theme_file) && $wpsg_ignoreuserview != '1') $render_file = $theme_file;
-            else if (file_exists($uv_file) && $wpsg_ignoreuserview != '1') $render_file = $uv_file;
-            else if (file_exists($uv_old_file) && $wpsg_ignoreuserview != '1') $render_file = $uv_old_file;
+            if (file_exists($child_theme_file) && 	$wpsg_ignoreuserview != '1') $render_file = $child_theme_file;
+            else if (file_exists($theme_file) && 	$wpsg_ignoreuserview != '1') $render_file = $theme_file;
+            else if (file_exists($uv_file) && 		$wpsg_ignoreuserview != '1') $render_file = $uv_file;
+            else if (file_exists($uv_old_file) && 	$wpsg_ignoreuserview != '1') $render_file = $uv_old_file;
             else if (file_exists($file)) $render_file = $file;
             else if (file_exists($theme_file)) $render_file = $theme_file;
@@ -657,5 +657,5 @@
 			$file_key = preg_replace(['/(.*)wpshopgermany-free/', '/\/\//'], ['', '/'], $file);
 			$this->view = \apply_filters('wpsg_render_'.$file_key, $this->view, $file_key);
-			
+
 			// Ticket #572 doppelte Slash stÃ¶ren
 			$file = str_replace('//', '/', $file);
Index: /wpshopgermany.php
===================================================================
--- /wpshopgermany.php	(revision 8123)
+++ /wpshopgermany.php	(revision 8125)
@@ -110,4 +110,5 @@
 	
 	$wp_upload_dir = wp_upload_dir();
+
 	 
 	// Pfade
@@ -118,6 +119,6 @@
 	define('WPSG_PATH_UPLOADS', $wp_upload_dir['basedir'].'/wpsg/');
 	define('WPSG_PATH_VIEW', dirname(__FILE__).'/views/');
-	define('WPSG_PATH_TEMPLATEVIEW', get_template_directory().'/wpsg_views/');
-	define('WPSG_PATH_CHILD_TEMPLATEVIEW', get_stylesheet_directory().'/wpsg_views/');
+	define('WPSG_PATH_TEMPLATEVIEW', get_stylesheet_directory().'/wpsg_views/');
+
 	define('WPSG_PATH_USERVIEW', WPSG_PATH_UPLOADS.'user_views/');
 	define('WPSG_PATH_USERVIEW_OLD', WPSG_PATH.'user_views/');
@@ -128,6 +129,6 @@
 	define('WPSG_PATH_PRODUKTTEMPLATES_UV', WPSG_PATH_USERVIEW.'produkttemplates/');
 	define('WPSG_PATH_PRODUKTTEMPLATES_UV_OLD', WPSG_PATH_USERVIEW_OLD.'produkttemplates/');
-	define('WPSG_PATH_PRODUKTTEMPLATES_TV', WPSG_PATH_TEMPLATEVIEW.'produkttemplates/');
-	define('WPSG_PATH_PRODUKTTEMPLATES_CTV', WPSG_PATH_CHILD_TEMPLATEVIEW.'produkttemplates/');
+	define('WPSG_PATH_PRODUKTTEMPLATES_THEME', WPSG_PATH_TEMPLATEVIEW.'produkttemplates/');
+
 	define('WPSG_URL', plugins_url().'/'.WPSG_FOLDERNAME.'/');
 	define('WPSG_URL_WP', site_url().'/');
