Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7713)
+++ /controller/wpsg_ShopController.class.php	(revision 7714)
@@ -688,6 +688,5 @@
 		 * Checkt den Request und entfernt mÃ¶glicherweise escapte Variablen
 		 */
-		public function checkEscape()
-		{
+		public function checkEscape() {
 
 			if (strlen($_GET['wpsg_quotecheck']) > 7 || get_magic_quotes_gpc()) {
@@ -3211,8 +3210,9 @@
 		 * Im Prinzip wie wp_loaded nur das get_permalink schon funktioniert
 		 */
-		public function template_redirect()
-		{
-
-			$this->checkEscape();
+		public function template_redirect() {
+
+		    global $wp_customize;
+
+            if (!isset($wp_customize)) $this->checkEscape();
 
 			// Das Land muss vor addShipping gesetzt werden
@@ -3220,10 +3220,9 @@
 			if (isset($_REQUEST['wpsg']['checkout']['land'])) $_SESSION['wpsg']['checkout']['land'] = $_REQUEST['wpsg']['checkout']['land'];
 
-			if (!is_admin())
-			{
-
-			$this->basket->initFromSession();
-
-			$this->addShipPay();
+			if (!is_admin()) {
+
+
+			    $this->basket->initFromSession();
+			    $this->addShipPay();
 
 			}
Index: /lib/filter_functions.inc.php
===================================================================
--- /lib/filter_functions.inc.php	(revision 7713)
+++ /lib/filter_functions.inc.php	(revision 7714)
@@ -505,5 +505,5 @@
     
     function wpsg_admin_footer() {
-    	
+
         if (is_admin() && preg_match('/wpsg/', wpsg_getStr($_REQUEST['page']))) {
 
@@ -560,6 +560,5 @@
     }
     
-    function wpsg_admin_init()
-    {
+    function wpsg_admin_init() {
 
         if (isset($_REQUEST['wpsg_insertlicence_submit']))
@@ -653,7 +652,6 @@
      * Diese Funktion ermÃ¶glicht es, Ausgaben im Head eines Themes unterzubringen
      */
-    function wpsg_head()
-    {
-    
+    function wpsg_head() {
+
         $GLOBALS['wpsg_sc']->wp_head();
     
@@ -802,3 +800,2 @@
     } // function wpsg_post_install()
 
-?>
Index: /lib/install.php
===================================================================
--- /lib/install.php	(revision 7713)
+++ /lib/install.php	(revision 7714)
@@ -191,4 +191,5 @@
    		tax_mode INT(1) COMMENT 'Art der Besteuerung Kleinunternehmer/1, Endkunden/2, Firmenkunden/3',
    		secret VARCHAR(255) COMMENT 'Zufallszahl',
+   		ext_payed INT(1) COMMENT '1 wenn die Bestellung ÃŒber einen Zahlungsprovider als gezahlt gemeldet wurde',
    		KEY adress_id (adress_id),
    		KEY shipping_adress_id (shipping_adress_id),
Index: /lib/wpsg_cache.class.php
===================================================================
--- /lib/wpsg_cache.class.php	(revision 7713)
+++ /lib/wpsg_cache.class.php	(revision 7714)
@@ -155,9 +155,7 @@
 		 * Besser loadProduktArray aus Shop verwenden da dies Ãbersetzung etc. berÃŒcksichtigt
 		 */
-		public function loadProduct($product_id)
-		{
-			
-			if (!array_key_exists($product_id, $this->_arProducts))
-			{
+		public function loadProduct($product_id) {
+			
+			if (!array_key_exists($product_id, $this->_arProducts)) {
 					
 				$this->_arProducts[$product_id] = $this->_db->fetchRow("
@@ -169,5 +167,10 @@
 						`id` = '".wpsg_q($product_id)."'
 				");
-				
+
+				if (intval($this->_arProducts[$product_id]['id']) !== $product_id) throw new \wpsg\Exception(wpsg_translate(
+				    __('Produkt #1# konnte nicht geladen werden', 'wpsg'),
+                    $product_id
+                ));
+
 				$this->_arProducts[$product_id]['product_key'] = $product_id;
 				
Index: /mods/wpsg_mod_produktartikel.class.php
===================================================================
--- /mods/wpsg_mod_produktartikel.class.php	(revision 7713)
+++ /mods/wpsg_mod_produktartikel.class.php	(revision 7714)
@@ -236,7 +236,6 @@
         } // public function the_excerpt(&$content)
     
-        public function content_filter(&$content)
-        {
-    
+        public function content_filter(&$content) {
+
             global $post;
     
@@ -254,7 +253,6 @@
         } // public function content_filter()
     
-        public function pre_get_posts(&$query)
-        {
-    
+        public function pre_get_posts(&$query) {
+
             if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_produktartikel_onlyMainQuery')) && !$query->is_main_query()) return;
     
Index: /wpshopgermany.php
===================================================================
--- /wpshopgermany.php	(revision 7713)
+++ /wpshopgermany.php	(revision 7714)
@@ -224,5 +224,5 @@
     register_activation_hook(__FILE__, 'wpsg_install');
 	register_deactivation_hook(__FILE__, 'wpsg_uninstall');
-	
+
 	add_action('admin_menu', 'wpsg_add_pages');	
 	add_action('phpmailer_init', 'wpsg_phpmailer_init');
@@ -234,7 +234,5 @@
 	add_filter('upgrader_post_install', 'wpsg_post_install', 10, 2);
 
-
-	if (is_admin())
-	{
+	if (is_admin()) {
 
 		add_filter('plugins_api', 'wpsg_info', 10, 3);
@@ -247,8 +245,6 @@
         add_action('admin_notices', 'wpsg_admin_notices');
 
-	} 
-	else
-	{
-		
+	} else {
+
 		add_shortcode('wpshopgermany', array($shop, 'shortcode'));
 		add_shortcode('wpshopgermany_link', array($shop, 'shortcode_basket'));
@@ -258,5 +254,5 @@
 		add_filter('the_excerpt', array($shop, 'the_excerpt'));	 
 		add_filter('pre_get_posts', array($shop, 'pre_get_posts'));
-				
+
 		add_action('wp_enqueue_scripts', array($shop, 'wp_enqueue'));
 		add_action('wp_head', array($shop, 'wp_head'));
@@ -265,6 +261,6 @@
 					
 		if ($shop->get_option('wpsg_removeWpTrimExcerpt') == '1') remove_filter('get_the_excerpt', 'wp_trim_excerpt');
-		if ($shop->get_option('wpsg_removeWpAutoOp') == '1') remove_filter('the_content', 'wpautop');
-		
+    	if ($shop->get_option('wpsg_removeWpAutoOp') == '1') remove_filter('the_content', 'wpautop');
+
 	}
 
