Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7810)
+++ /controller/wpsg_ShopController.class.php	(revision 7811)
@@ -769,5 +769,5 @@
                 
             }
-
+            
             if (function_exists('register_block_type')) {
             
@@ -783,5 +783,5 @@
                 
             }
-
+            
         } // public function init()
 
@@ -950,7 +950,7 @@
 				
 			}
-
+            
 			$this->callMods('init');
-
+            
 		} // public function initShop()
 
Index: /lib/filter_functions.inc.php
===================================================================
--- /lib/filter_functions.inc.php	(revision 7810)
+++ /lib/filter_functions.inc.php	(revision 7811)
@@ -336,6 +336,5 @@
     } // function wpshopgermany_install()
          
-    function wpsg_info($data, $action = null, $args = null)
-    {
+    function wpsg_info($data, $action = null, $args = null) {
     
         if ($action != 'plugin_information' || empty($args->slug) || $args->slug != 'wpshopgermany-free')
@@ -513,5 +512,5 @@
 
         }
-
+        
         return $wpsg_update_data;
     
Index: /lib/wpsg_db.class.php
===================================================================
--- /lib/wpsg_db.class.php	(revision 7810)
+++ /lib/wpsg_db.class.php	(revision 7811)
@@ -242,5 +242,14 @@
 			foreach ($data as $k => $v) {
 
-			    //if (is_array($v)) var_dump($v);
+			    if (is_array($v)) {
+			        
+			        /*
+			        echo '<pre>'; debug_print_backtrace(); echo '</pre>';
+			        
+			        var_dump($v);
+			        die();
+			        */
+			        
+                }
 
 				if ($v != "NOW()" && $v != "NULL") $v = "'".$v."'";
Index: /model/wpsg_model.class.php
===================================================================
--- /model/wpsg_model.class.php	(revision 7810)
+++ /model/wpsg_model.class.php	(revision 7811)
@@ -206,5 +206,5 @@
          * Gibt einen META Value zurÃŒck
          */
-        public function getMeta($meta_key, $reload = false) {
+        public function getMeta($meta_key, $reload = false, $default = null) {
 
             $class = get_called_class();
@@ -227,5 +227,10 @@
 
             if (array_key_exists($meta_key, $this->arMeta)) return $this->arMeta[$meta_key];
-            else return '';
+            else {
+                
+                if ($default !== null) return $default;
+                else return '';
+                
+            }
 
         } // public function getMeta($meta_key)
Index: /model/wpsg_order_product.class.php
===================================================================
--- /model/wpsg_order_product.class.php	(revision 7810)
+++ /model/wpsg_order_product.class.php	(revision 7811)
@@ -160,26 +160,20 @@
 		} // public function getProductKey()
 		
-		public function getProductId()
-		{
+		public function getProductId() {
 
 			$mod_vp_varkey = $this->mod_vp_varkey;
 			$productkey = $this->productkey;
 
-			if (wpsg_isSizedString($mod_vp_varkey))
-			{
+			if (wpsg_isSizedString($mod_vp_varkey)) {
 				
-				return $this->shop->getProduktID($mod_vp_varkey);
+				return intval($this->shop->getProduktID($mod_vp_varkey));
 				
-			}
-			else if (wpsg_isSizedString($productkey))
-			{
+			} else if (wpsg_isSizedString($productkey)) {
 				
-				return $this->shop->getProduktID($productkey);
+				return intval($this->shop->getProduktID($productkey));
 				
-			}
-			else
-			{
+			} else {
 				
-				return $this->p_id;
+				return intval($this->p_id);
 				
 			}
Index: /mods/mod_abo/wpsg_abo.php
===================================================================
--- /mods/mod_abo/wpsg_abo.php	(revision 7810)
+++ /mods/mod_abo/wpsg_abo.php	(revision 7811)
@@ -48,6 +48,8 @@
             } else {
 
-                $wpsg_mod_abo_autoexpire_informationtime = intval($this->shop->get_option('wpsg_mod_abo_autoexpire_informationtime'));
-
+                $wpsg_mod_abo_autoexpire_informationtime = intval(
+                    wpsg_ShopController::getShop()->callMod('wpsg_mod_abo', 'getSetting', ['wpsg_mod_abo_autoexpire_informationtime', $this->getProductId()])
+                );
+            
                 if ($wpsg_mod_abo_autoexpire_informationtime > 0) {
 
@@ -89,4 +91,13 @@
         }
         
+        public function getProductId() {
+            
+            $oOrderProduct = $this->getOrderProduct();
+            
+            if ($oOrderProduct === false) return false;
+            else return $oOrderProduct->getProductId();
+            
+        }
+        
         public function getOrderProduct() {
             
@@ -126,8 +137,14 @@
 
         public static function getFromOrderAndProduct($order_id, $order_product_id) {
-            
-            $oOrderProduct = wpsg_order_product::getInstance($order_product_id);
-            
-            return self::getFromOrderAndProductKey($order_id, $oOrderProduct->getProductKey());
+
+            $abo_id = intval(
+                wpsg_ShopController::getShop()->db->fetchOne("SELECT `id` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `order_product_id` = '".wpsg_q($order_product_id)."' ")
+            );
+
+            if ($abo_id <= 0) throw new \wpsg\Exception(wpsg_translate(
+                __('Kein Abo zu dieser Bestellung (ID:#1#) und BestellProdukt (ID:#2#) gefunden.', 'wpsg'), $order_id, $order_product_id
+            ));
+
+            return wpsg_abo::getInstance($abo_id);
                         
         }
@@ -163,4 +180,27 @@
             $arAboID = wpsg_ShopController::getShop()->db->fetchAssocField($strQuery, "id", "id");
 
+            if (wpsg_isSizedInt($arFilter['state'])) {
+ 
+                foreach ($arAboID as $k => $abo_id) {
+                    
+                    $oAbo = wpsg_abo::getInstance($abo_id);
+                    
+                    if ($oAbo->getState() !== intval($arFilter['state'])) {
+                        
+                        unset($arAboID[$k]);
+                        
+                        if (!$load) {
+                            
+                            wpsg_abo::clearCache($abo_id);
+                            unset($oAbo);
+                            
+                        }
+                        
+                    }
+                    
+                }
+                
+            }
+            
             if ($load !== true) return $arAboID;
 
@@ -182,24 +222,47 @@
             list($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER) = self::getQueryParts($arFilter);
 
-            $strQuery = "
-				SELECT
-					COUNT(*)
-				FROM
-					(
-						SELECT
-						  	DISTINCT A.`id`
-						FROM
-							`".WPSG_TBL_ABO."` AS A
-							".$strQueryJOIN."
-						WHERE
-							1
-							".$strQueryWHERE." 
-						HAVING
-							1
-							".$strQueryHAVING."											
-					) AS innerSelect
-			";
-            
-            return wpsg_ShopController::getShop()->db->fetchOne($strQuery);
+            if (wpsg_isSizedInt($arFilter['state'])) {
+            
+                $arFilterAll = $arFilter; unset($arFilterAll['state']);
+                
+                $arAbo = self::find($arFilterAll, false);
+
+                foreach ($arAbo as $k => $abo_id) {
+                    
+                    $oAbo = wpsg_abo::getInstance($abo_id);
+
+                    if ($oAbo->getState() !== intval($arFilter['state'])) unset($arAbo[$k]);
+                    
+                    wpsg_abo::clearCache($abo_id); unset($oAbo);
+                    
+                }
+
+                return sizeof($arAbo);
+                
+                
+            } else {
+            
+                $strQuery = "
+                    SELECT
+                        COUNT(*)
+                    FROM
+                        (
+                            SELECT
+                                DISTINCT A.`id`
+                            FROM
+                                `".WPSG_TBL_ABO."` AS A
+                                ".$strQueryJOIN."
+                            WHERE
+                                1
+                                ".$strQueryWHERE." 
+                            HAVING
+                                1
+                                ".$strQueryHAVING."											
+                        ) AS innerSelect
+                ";
+                
+                return wpsg_ShopController::getShop()->db->fetchOne($strQuery);
+                
+            }
 
         } // public static function count($arFilter)
@@ -241,41 +304,5 @@
             if (wpsg_isSizedInt($arFilter['enddate_m'])) $strQueryWHERE .= " AND MONTH(A.`expiration`) = '".wpsg_q($arFilter['enddate_m'])."' ";
             if (wpsg_isSizedInt($arFilter['enddate_y'])) $strQueryWHERE .= " AND YEAR(A.`expiration`) = '".wpsg_q($arFilter['enddate_y'])."' ";
-            
-            if (wpsg_isSizedInt($arFilter['state'])) {
-                
-                $state = intval($arFilter['state']);
-                $wpsg_mod_abo_autoexpire_informationtime = intval(wpsg_ShopController::getShop()->get_option('wpsg_mod_abo_autoexpire_informationtime'));
-                
-                if ($state === self::STATE_RUNNING) {
-                    
-                    if ($wpsg_mod_abo_autoexpire_informationtime <= 0) $strQueryWHERE .= " AND A.`expiration` >= NOW() ";
-                    else {
- 
-                        $strQueryWHERE .= " AND (
-                            NOW() < DATE_SUB(A.`expiration`, INTERVAL ".wpsg_q($wpsg_mod_abo_autoexpire_informationtime)." DAY)                             
-                        ) ";
-                        
-                    }
-                    
-                } else if ($state === self::STATE_EXTEND) {
-                    
-                    $strQueryWHERE .= " AND A.`expiration` < NOW() ";
-                    
-                } else if ($state === self::STATE_INEXTENSION) {
-
-                    if ($wpsg_mod_abo_autoexpire_informationtime <= 0) $strQueryWHERE .= " AND 0 ";
-                    else {
-                    
-                        $strQueryWHERE .= " AND ( 
-                            NOW() > DATE_SUB(A.`expiration`, INTERVAL ".wpsg_q($wpsg_mod_abo_autoexpire_informationtime)." DAY) AND 
-                            NOW() < A.`expiration`    
-                        ) ";
-                        
-                    }
-                                        
-                }
-                
-            }
-
+             
             if ($bJoinOrder) {
                 
Index: /mods/wpsg_mod_abo.class.php
===================================================================
--- /mods/wpsg_mod_abo.class.php	(revision 7810)
+++ /mods/wpsg_mod_abo.class.php	(revision 7811)
@@ -12,4 +12,6 @@
 		var $version = "9.9.9";
 
+		const CONFIG = '-1';
+		
         const EXPIRE_MAIL = '1';
         const EXPIRE_AUTO = '2';
@@ -227,6 +229,5 @@
 		} // public function settings_edit()
 
-		public function settings_save()
-		{
+		public function settings_save() {
 
 			$this->shop->update_option('wpsg_mod_abo_url', $_REQUEST['wpsg_mod_abo_url'], false, false, WPSG_SANITIZE_URL);
@@ -247,6 +248,5 @@
 		} // public function settings_save()
 
-		public function product_addedit_content(&$product_content, &$product_data)
-		{
+		public function product_addedit_content(&$product_content, &$product_data) {
 
 			if (!wpsg_isSizedInt($product_data['id']) || isset($_REQUEST['wpsg_lang'])) return false;
@@ -268,5 +268,16 @@
 
 			$this->shop->view['product'] = $product_data;
-
+			
+		    $oProduct = wpsg_product::getInstance($product_data['id']);
+
+            $this->shop->view['product']['wpsg_mod_abo_expiremode'] = $oProduct->getMeta('wpsg_mod_abo_expiremode', false, wpsg_mod_abo::CONFIG);
+            $this->shop->view['product']['wpsg_mod_abo_wpsgmodaboexpiration'] = $oProduct->getMeta('wpsg_mod_abo_wpsgmodaboexpiration', false, wpsg_mod_abo::CONFIG);
+            $this->shop->view['product']['wpsg_mod_abo_autoexpire_payment'] = $oProduct->getMeta('wpsg_mod_abo_autoexpire_payment', false, wpsg_mod_abo::CONFIG);
+            $this->shop->view['product']['wpsg_mod_abo_autoexpire_customermail'] = $oProduct->getMeta('wpsg_mod_abo_autoexpire_customermail', false, wpsg_mod_abo::CONFIG);
+            $this->shop->view['product']['wpsg_mod_abo_autoexpire_adminmail'] = $oProduct->getMeta('wpsg_mod_abo_autoexpire_adminmail', false, wpsg_mod_abo::CONFIG);
+            $this->shop->view['product']['wpsg_mod_abo_autoexpire_information'] = $oProduct->getMeta('wpsg_mod_abo_autoexpire_information', false, wpsg_mod_abo::CONFIG);
+            $this->shop->view['product']['wpsg_mod_abo_autoexpire_informationtime'] = $oProduct->getMeta('wpsg_mod_abo_autoexpire_informationtime', false, '');
+            $this->shop->view['product']['wpsg_mod_abo_autoexpire_customer'] = $oProduct->getMeta('wpsg_mod_abo_autoexpire_customer', false, wpsg_mod_abo::CONFIG);
+            
 			$product_content['wpsg_mod_abo'] = array(
 					'title' => __('Abo', 'wpsg'),
@@ -312,8 +323,35 @@
 				$product_data['wpsg_mod_abo_activ'] = '0';
 
-			}
+			}			
 
 		} // public function produkt_save(&$produkt_id)
 
+        public function produkt_save(&$product_id) { 
+		    
+		    $oProduct = wpsg_product::getInstance($product_id);
+		    
+		    if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_expiremode'], WPSG_SANITIZE_VALUES, [self::CONFIG, self::EXPIRE_AUTO, self::EXPIRE_MAIL]))
+		        $oProduct->setMeta('wpsg_mod_abo_expiremode', $_REQUEST['wpsg_mod_abo_expiremode']);
+		    
+		    if ($_REQUEST['wpsg_mod_abo_expiremode'] === wpsg_mod_abo::EXPIRE_MAIL) {
+		        
+		        if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_wpsgmodaboexpiration'], WPSG_SANITIZE_VALUES, [self::CONFIG, '0', '1'])) $oProduct->setMeta('wpsg_mod_abo_wpsgmodaboexpiration', $_REQUEST['wpsg_mod_abo_wpsgmodaboexpiration']);
+		        
+            } else if ($_REQUEST['wpsg_mod_abo_expiremode'] === wpsg_mod_abo::EXPIRE_AUTO) {
+
+                if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_autoexpire_payment'], WPSG_SANITIZE_INT)) $oProduct->setMeta('wpsg_mod_abo_autoexpire_payment', $_REQUEST['wpsg_mod_abo_autoexpire_payment']);
+                if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_autoexpire_customermail'], WPSG_SANITIZE_VALUES, [self::CONFIG, '0', '1'])) $oProduct->setMeta('wpsg_mod_abo_autoexpire_customermail', $_REQUEST['wpsg_mod_abo_autoexpire_customermail']);
+                if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_autoexpire_adminmail'], WPSG_SANITIZE_VALUES, [self::CONFIG, '0', '1'])) $oProduct->setMeta('wpsg_mod_abo_autoexpire_adminmail', $_REQUEST['wpsg_mod_abo_autoexpire_adminmail']);
+                if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_autoexpire_information'], WPSG_SANITIZE_VALUES, [self::CONFIG, '0', '1'])) $oProduct->setMeta('wpsg_mod_abo_autoexpire_information', $_REQUEST['wpsg_mod_abo_autoexpire_information']);
+                
+                if ($_REQUEST['wpsg_mod_abo_autoexpire_information'] === '1')
+                    if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_autoexpire_informationtime'], WPSG_SANITIZE_INT, ['allowEmpty' => true])) $oProduct->setMeta('wpsg_mod_abo_autoexpire_informationtime', $_REQUEST['wpsg_mod_abo_autoexpire_informationtime']);
+                
+                if (wpsg_checkInput($_REQUEST['wpsg_mod_abo_autoexpire_customer'], WPSG_SANITIZE_VALUES, [wpsg_mod_abo::CONFIG, wpsg_mod_abo::CUSTOMER_AUTO_NOTHING, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT, wpsg_mod_abo::CUSTOMER_AUTO_MAIL])) $oProduct->setMeta('wpsg_mod_abo_autoexpire_customer', $_REQUEST['wpsg_mod_abo_autoexpire_customer']);
+		        
+            }
+		    
+        }
+        
 		public function setAboStatus($order_id, $status_id, $inform)
 		{
@@ -506,5 +544,7 @@
 				}
 
-                if ($this->shop->get_option('wpsg_mod_abo_expiremode') == self::EXPIRE_AUTO) {
+                $wpsg_mod_abo_expiremode = $this->getSetting('wpsg_mod_abo_expiremode', $product_id);
+				
+                if ($wpsg_mod_abo_expiremode == self::EXPIRE_AUTO) {
                     
                     $this->autoExtendOrder($a['order_id'], $a['product_key']);
@@ -523,32 +563,44 @@
 
 			}
-
-			// Informail vor automatischer VerlÃ€ngerung
-            if ($this->shop->get_option('wpsg_mod_abo_expiremode') === self::EXPIRE_AUTO && $this->shop->get_option('wpsg_mod_abo_autoexpire_information') == '1') {
-
-                $arAboInformation = $this->db->fetchAssoc("
-                    SELECT
-                        A.*
-                    FROM
-                        `".WPSG_TBL_ABO."` AS A
-                    WHERE
-                        DATEDIFF(A.`expiration`, NOW()) = ".wpsg_q($this->shop->get_option('wpsg_mod_abo_autoexpire_informationtime'))." AND
-                        A.`status` = '".wpsg_q(self::STATUS_ACTIVE)."' AND
-                        A.`inform_autorenew` != '1'
-                ");
-                
-                foreach ($arAboExpiration as $a) {
-
-                    $this->sendAboRenewInformation($a['order_id'], $a['product_key']);
-                    
-                    $this->db->UpdateQuery(WPSG_TBL_ABO, array(
-                        'inform_autorenew' => '1'
-                    ), "`id` = '".wpsg_q($a['id'])."'");
-                    
-                }                
-            
-            }
-
-		} // public function cron()
+ 
+            $arAboInformation = $this->db->fetchAssoc("
+                SELECT
+                    A.*
+                FROM
+                    `".WPSG_TBL_ABO."` AS A
+                WHERE
+                    A.`status` = '".wpsg_q(self::STATUS_ACTIVE)."' AND
+                    A.`inform_autorenew` != '1'
+            ");
+			
+			// DATEDIFF(A.`expiration`, NOW()) = ".wpsg_q($this->shop->get_option('wpsg_mod_abo_autoexpire_informationtime'))." AND
+            						
+            foreach ($arAboInformation as $a) {
+                
+                $product_id = $this->shop->getProduktID($a['product_key']);
+                
+                $wpsg_mod_abo_autoexpire_informationtime = intval($this->getSetting('wpsg_mod_abo_autoexpire_informationtime', $product_id));
+                $interval = intval(date_diff(date_create($a['expiration']), date('Y-m-d'))->format('%a'));
+                
+                if ($wpsg_mod_abo_autoexpire_informationtime > 0 && $interval === $wpsg_mod_abo_autoexpire_informationtime) {
+                    
+                    $wpsg_mod_abo_expiremode = $this->getSetting('wpsg_mod_abo_expiremode', $product_id);
+                    $wpsg_mod_abo_autoexpire_information = $this->getSetting('wpsg_mod_abo_autoexpire_information', $product_id);
+                    
+                    if ($wpsg_mod_abo_expiremode === self::EXPIRE_AUTO && $wpsg_mod_abo_autoexpire_information == '1') {
+                    
+                        $this->sendAboRenewInformation($a['order_id'], $a['product_key']);
+                    
+                        $this->db->UpdateQuery(WPSG_TBL_ABO, array(
+                            'inform_autorenew' => '1'
+                        ), "`id` = '".wpsg_q($a['id'])."'");
+                        
+                    }
+                    
+                }
+                
+            }                
+            
+		} 
 
 		public function admin_emailconf_save()
@@ -853,21 +905,20 @@
         } // public function order_view($order_id, &$arSidebarArray)
         
-        public function order_ajax()
-        {
+        public function order_ajax() {
 
 	        $_REQUEST['edit_id'] = wpsg_sinput("key", $_REQUEST['edit_id']);
 	        $_REQUEST['product_key'] = wpsg_sinput("key", $_REQUEST['product_key']);
 
-            if (wpsg_isSizedString($_REQUEST['do'], 'run'))
-            {
-                
-                $abo_status = $this->getAboProductStatus($_REQUEST['edit_id'], $_REQUEST['product_key']);
-                
-                $bNotify = $this->startRenewal($abo_status);
-                
-                if ($this->shop->get_option('wpsg_mod_abo_expiremode') === self::EXPIRE_AUTO) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird wieder automatisch eine Bestellung ausgelÃ¶st.', 'wpsg'));
-                else if ($this->shop->get_option('wpsg_mod_abo_expiremode') === self::EXPIRE_MAIL) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird dem Kunden wieder die MÃ¶glichkeit gegeben mit einer neuen Bestellung das Abo zu verlÃ€ngern.', 'wpsg'));
-
-                if ($bNotify) $this->shop->addBackendMessage(wpsg_translate(__('URL Benachrichtigung an: #1# ausgelÃ¶st. (type=abo_status_started)', 'wpsg'), $url));
+            if (wpsg_isSizedString($_REQUEST['do'], 'run')) {
+                
+                $abo_status = $this->getAboProductStatus($_REQUEST['edit_id'], $_REQUEST['product_key']);                
+                $bNotify = $this->startRenewal($abo_status);                
+                $product_id = $this->shop->getProduktID($_REQUEST['product_key']);                
+                $wpsg_mod_abo_expiremode = $this->getSetting('wpsg_mod_abo_expiremode', $product_id);
+                
+                if ($wpsg_mod_abo_expiremode === self::EXPIRE_AUTO) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird wieder automatisch eine Bestellung ausgelÃ¶st.', 'wpsg'));
+                else if ($wpsg_mod_abo_expiremode === self::EXPIRE_MAIL) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird dem Kunden wieder die MÃ¶glichkeit gegeben mit einer neuen Bestellung das Abo zu verlÃ€ngern.', 'wpsg'));
+
+                if ($bNotify) $this->shop->addBackendMessage(__('URL Benachrichtigung ausgelÃ¶st. (type=abo_status_started)', 'wpsg'));
                 
                 $this->shop->redirect(
@@ -875,16 +926,15 @@
                 );
                 
-            }
-            else if (wpsg_isSizedString($_REQUEST['do'], 'stop'))
-            {
+            } else if (wpsg_isSizedString($_REQUEST['do'], 'stop')) {
 
                 $abo_status = $this->getAboProductStatus($_REQUEST['edit_id'], $_REQUEST['product_key']);
-
                 $bNotify = $this->stopRenewal($abo_status);
-                
-                if ($this->shop->get_option('wpsg_mod_abo_expiremode') === self::EXPIRE_AUTO) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird keine Bestellung mehr ausgelÃ¶st.', 'wpsg'));
-                else if ($this->shop->get_option('wpsg_mod_abo_expiremode') === self::EXPIRE_MAIL) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird dem Kunden keine MÃ¶glichkeit gegeben mit einer neuen Bestellung das Abo zu verlÃ€ngern.', 'wpsg'));
-
-                if ($bNotify) $this->shop->addBackendMessage(wpsg_translate(__('URL Benachrichtigung an: #1# ausgelÃ¶st. (type=abo_status_stopped)', 'wpsg'), $url));
+                $product_id = $this->shop->getProduktID($_REQUEST['product_key']);
+                $wpsg_mod_abo_expiremode = $this->getSetting('wpsg_mod_abo_expiremode', $product_id);
+                
+                if ($wpsg_mod_abo_expiremode === self::EXPIRE_AUTO) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird keine Bestellung mehr ausgelÃ¶st.', 'wpsg'));
+                else if ($wpsg_mod_abo_expiremode === self::EXPIRE_MAIL) $this->shop->addBackendMessage(__('Wenn das Abo auslÃ€uft, wird dem Kunden keine MÃ¶glichkeit gegeben mit einer neuen Bestellung das Abo zu verlÃ€ngern.', 'wpsg'));
+
+                if ($bNotify) $this->shop->addBackendMessage(__('URL Benachrichtigung ausgelÃ¶st. (type=abo_status_stopped)', 'wpsg'));
 
                 $this->shop->redirect(
@@ -1003,4 +1053,20 @@
 		/** Modulfunktionen */
 
+        public function getSetting($key, $product_id = null) {
+            
+            if ($product_id !== null) {
+                
+                $oProduct = wpsg_product::getInstance($product_id);
+                
+                $meta_value = $oProduct->getMeta($key, false, self::CONFIG);
+                
+                if ($meta_value !== self::CONFIG) return $meta_value;
+                
+            }
+            
+            return $this->shop->get_option($key);
+            
+        }
+        
         private function admin_inlineEditAction() {
             
@@ -1098,6 +1164,5 @@
          * Frontend: Anhalten von Abo VerlÃ€ngerungen
          */
-        public function stoprenewalRedirect()
-        {
+        public function stoprenewalRedirect() {
 
 	        $_REQUEST['order_id'] = wpsg_sinput("key", $_REQUEST['order_id']);
@@ -1109,15 +1174,14 @@
             $arOrderProducts = $this->getAboProductsFromOrder($oOrder->id);
             
-            foreach ($arOrderProducts as $oOrderProduct)
-            {
+            foreach ($arOrderProducts as $oOrderProduct) {
 
                 $abo_status = $this->getAboProductStatus($oOrder->id, $oOrderProduct->getProductKey());
  
-                if ($oOrderProduct->getProductKey() === $_REQUEST['product_key'] && wpsg_isSizedInt($abo_status['id']))
-                {
-       
+                if ($oOrderProduct->getProductKey() === $_REQUEST['product_key'] && wpsg_isSizedInt($abo_status['id'])) {
+                           
+                    $wpsg_mod_abo_autoexpire_customer = $this->getSetting('wpsg_mod_abo_autoexpire_customer', $oOrderProduct->getProductId());
+                    
                     // Hier ist alles ok, das Abo kann gestoppt werden
-                    if ($this->shop->get_option('wpsg_mod_abo_autoexpire_customer') === wpsg_mod_abo::CUSTOMER_AUTO_DIRECT)
-                    {
+                    if ($wpsg_mod_abo_autoexpire_customer === wpsg_mod_abo::CUSTOMER_AUTO_DIRECT) {
                         
                         $this->stopRenewal($abo_status);
@@ -1127,5 +1191,5 @@
                         
                     }
-                    else if ($this->shop->get_option('wpsg_mod_abo_autoexpire_customer') === wpsg_mod_abo::CUSTOMER_AUTO_MAIL)
+                    else if ($wpsg_mod_abo_autoexpire_customer === wpsg_mod_abo::CUSTOMER_AUTO_MAIL)
                     {
                         
@@ -1239,6 +1303,5 @@
          * @param $product_key
          */
-		public function autoExtendOrder($order_id, $product_key)
-        {
+		public function autoExtendOrder($order_id, $product_key) {
             
             $this->shop->addShipPay();
@@ -1249,6 +1312,8 @@
             unset($_SESSION['wpsg']['checkout']);
 
+            $product_id = $this->shop->getProduktID($product_key);
+            
             $_SESSION['wpsg']['checkout']['id'] = $oOrder->k_id;
-            $_SESSION['wpsg']['checkout']['payment'] = $this->shop->get_option('wpsg_mod_abo_autoexpire_payment');
+            $_SESSION['wpsg']['checkout']['payment'] = $this->getSetting('wpsg_mod_abo_autoexpire_payment', $product_id);
             $_SESSION['wpsg']['checkout']['shipping'] = $oOrder->type_shipping;
             
@@ -1284,6 +1349,6 @@
             $bAdminMail = false;
             
-            if ($this->shop->get_option('wpsg_mod_abo_autoexpire_customermail')) $bCustomerMail = true;
-            if ($this->shop->get_option('wpsg_mod_abo_autoexpire_adminmail')) $bAdminMail = true;
+            if ($this->getSetting('wpsg_mod_abo_autoexpire_customermail', $product_id) === '1') $bCustomerMail = true;
+            if ($this->getSetting('wpsg_mod_abo_autoexpire_adminmail', $product_id) === '1') $bAdminMail = true;
             
             $oBasket->sendOrderSaveMails($new_o_id, $arBasket, $bCustomerMail, $bAdminMail);
@@ -1481,18 +1546,21 @@
         public function sendAboRenewInformation($order_id, $product_key) {
 
-            if ($this->shop->get_option('wpsg_mod_abo_autoexpire_information') != '1') return;
-
-            $product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product_key));
+            $product_id = $this->shop->getProduktID($product_key);
+            
+            if ($this->getSetting('wpsg_mod_abo_autoexpire_information', $product_id) !== '1') return;
+            
+            $product_data = $this->shop->cache->loadProduct($product_id);
             $order_data = $this->shop->cache->loadOrder($order_id);
             $customer_data = $this->shop->cache->loadKunden($order_data['k_id']);
-
+                        
             $this->shop->view['oProduct'] = $this->shop->cache->loadProductObject($product_data['id']);
             $this->shop->view['product'] = $product_data;
             $this->shop->view['customer'] = $customer_data;
             $this->shop->view['order'] = $order_data;
-
+            $this->shop->view['wpsg_mod_abo_autoexpire_informationtime'] = $this->getSetting('wpsg_mod_abo_autoexpire_informationtime', $product_id);
+            
             if ($this->shop->get_option('wpsg_htmlmail') === '1') $mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_autoinformation_html.phtml', false);
             else $mail_html = false;
-
+            
             $mail_text = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_autoinformation.phtml', false);
 
@@ -1511,5 +1579,8 @@
 		public function sendAboExpirationMail($order_id, $product_key) {
 
-			if ($this->shop->get_option('wpsg_mod_abo_wpsgmodaboexpiration') != '1') return;
+		    $product_id = $this->shop->getProduktID($product_key);
+		    $wpsg_mod_abo_wpsgmodaboexpiration = $this->getSetting('wpsg_mod_abo_wpsgmodaboexpiration', $product_id);
+		    
+			if ($wpsg_mod_abo_wpsgmodaboexpiration != '1') return;
 
 			$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product_key));
@@ -1585,36 +1656,5 @@
 
 		} // public function sendAboRebuyMail($order_id, $product_key)
-
-		/**
-		 * 	Sendet eine Informationsmail im Zeitraum x, bevor die VerlÃ€ngerung ansteht
-		 */
-		public function autoExtenderInformation ()
-		{
-			 
-			if ($this->shop->get_option('wpsg_mod_abo_autoexpire_information') != '0') 
-			{
-			
-				/* TODO: Auslesen der eingetragene Zeit und Berechnung des Sendezeitpunktes */
-				
-				
-				if ($this->shop->get_option('wpsg_htmlmail') === '1')
-				{
-		
-					$mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_autoinformation_html.phtml', false);
-		
-				}
-				else
-				{
-		
-					$mail_html = false;
-		
-				}
-		
-			}
-			 
-			return;
-			 
-		} //public function autoExtenderInformation ()
-		
+ 
 		/**
 		 * Gibt false zurÃŒck wenn das Abo nicht mehr verlÃ€ngert werden kann, ansonsten true oder die Anzahl wenn Anzahl beschrÃ€nkt die noch mÃ¶glich ist
Index: /mods/wpsg_mod_deliverytime.class.php
===================================================================
--- /mods/wpsg_mod_deliverytime.class.php	(revision 7810)
+++ /mods/wpsg_mod_deliverytime.class.php	(revision 7811)
@@ -190,5 +190,5 @@
 			$produkt_data['wpsg_mod_deliverytime_delaytext'] = wpsg_q(wpsg_sinput(WPSG_SANITIZE_FLOAT, wpsg_getStr($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_delaytext'])));
 			$produkt_data['wpsg_mod_deliverytime_delaytime'] = wpsg_tf(wpsg_q(wpsg_sinput(WPSG_SANITIZE_TEXTFIELD, wpsg_getStr($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_delaytime']), WPSG_SANITIZE_FLOAT)));
-
+			
 			$produkt_data['wpsg_mod_deliverytime_holiday'] = wpsg_q(wpsg_sinput(WPSG_SANITIZE_VALUES, ['0, 1, 2'], wpsg_getStr($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_holiday'])));
 
Index: /views/admin/form/select.phtml
===================================================================
--- /views/admin/form/select.phtml	(revision 7810)
+++ /views/admin/form/select.phtml	(revision 7811)
@@ -100,5 +100,9 @@
 			
 		</div>
-	
+
+        <?php if (wpsg_isSizedString($this->view['field_config']['hint'])) { ?>
+			<div class="hint info"><?php echo $this->view['field_config']['hint']; ?></div>
+        <?php } ?>
+		
 	</div>
 	
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 7810)
+++ /views/css/admin.css	(revision 7811)
@@ -58,5 +58,5 @@
 #wpsg-bs .table-body-striped > tbody:nth-of-type(odd) { background-color:#f9f9f9; }
 #wpsg-bs .checkbox input { margin-top:1px; }
-#wpsg-bs .info { font-style:italic; }
+#wpsg-bs .info { font-style:italic; font-size:12px; line-height:16px; margin-top:5px; margin-bottom:5px;  }
 #wpsg-bs .tab-pane { padding-top:15px; }
 #wpsg-bs fieldset > legend { padding-top:2rem; text-align:left; }
Index: /views/css/frontend.css
===================================================================
--- /views/css/frontend.css	(revision 7810)
+++ /views/css/frontend.css	(revision 7811)
@@ -210,4 +210,5 @@
 .wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .value { margin-left:10px; }
 .wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .duration_running { color:green; }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .duration_inextension { color:orange; }
 .wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .duration_expired { color:red; }
 .wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .image { float:left; margin-right:15px; }
Index: /views/mods/mod_abo/mail_autoinformation.phtml
===================================================================
--- /views/mods/mod_abo/mail_autoinformation.phtml	(revision 7810)
+++ /views/mods/mod_abo/mail_autoinformation.phtml	(revision 7811)
@@ -7,5 +7,5 @@
 ?><?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#" wird in #2# Tagen automatisch verlÃ€ngert.', 'wpsg'), $this->view['oProduct']->getProductName(), $this->get_option('wpsg_mod_abo_autoexpire_informationtime')); ?>  
+<?php echo wpsg_translate(__('Ihr Abonnement von Produkt "#1#" wird in #2# Tagen automatisch verlÃ€ngert.', 'wpsg'), $this->view['oProduct']->getProductName(), $this->view['wpsg_mod_abo_autoexpire_informationtime']); ?>  
  
 <?php echo __('Viele GrÃŒÃe', 'wpsg'); ?> 
Index: /views/mods/mod_abo/mail_autoinformation_html.phtml
===================================================================
--- /views/mods/mod_abo/mail_autoinformation_html.phtml	(revision 7810)
+++ /views/mods/mod_abo/mail_autoinformation_html.phtml	(revision 7811)
@@ -7,5 +7,5 @@
 ?><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#" wird in #2# Tagen automatisch verlÃ€ngert.', 'wpsg'), $this->view['oProduct']->getProductName(), $this->get_option('wpsg_mod_abo_autoexpire_informationtime')); ?></p> 
+<p><?php echo wpsg_translate(__('Ihr Abonnement von Produkt "#1#" wird in #2# Tagen automatisch verlÃ€ngert.', 'wpsg'), $this->view['oProduct']->getProductName(), $this->view['wpsg_mod_abo_autoexpire_informationtime']); ?></p> 
  
 <p><?php echo __('Viele GrÃŒÃe', 'wpsg'); ?></p> 
Index: /views/mods/mod_abo/order_view.phtml
===================================================================
--- /views/mods/mod_abo/order_view.phtml	(revision 7810)
+++ /views/mods/mod_abo/order_view.phtml	(revision 7811)
@@ -17,5 +17,9 @@
 		?>
 	
-		<?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
+		<?php echo wpsg_drawForm_AdminboxStart(
+			'<a href="'.wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.$oOrderProduct->getProductId()).'">'.
+			$oOrderProduct->getProduct()->getProductName().
+			'</a>'
+		); ?>
 	
 			<?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); ?>
Index: /views/mods/mod_abo/page_abo.phtml
===================================================================
--- /views/mods/mod_abo/page_abo.phtml	(revision 7810)
+++ /views/mods/mod_abo/page_abo.phtml	(revision 7811)
@@ -16,5 +16,20 @@
 		<?php foreach ($this->view['arOrder'] as $oOrder) { ?>
 		
-			<?php foreach ($this->callMod('wpsg_mod_abo', 'getAboProductsFromOrder', Array($oOrder->id)) as $oOrderProduct) { $aboStatus = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($oOrder->id, $oOrderProduct->getProductKey())); ?>
+			<?php foreach ($this->callMod('wpsg_mod_abo', 'getAboProductsFromOrder', Array($oOrder->id)) as $oOrderProduct) { 
+				
+				$product_id = $oOrderProduct->getProductId();
+				$aboStatus = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($oOrder->id, $oOrderProduct->getProductKey())); 
+				 
+				try {
+				
+					$oAbo = wpsg_abo::getFromOrderAndProduct($oOrder->getId(), $oOrderProduct->getId());
+					
+				} catch (\Exception $e) {
+					
+					continue;
+					
+                }
+				
+				?>
 			
 				<div class="wpsg_mod_abo_order_product">
@@ -52,7 +67,9 @@
 								<?php $exp = $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey())); ?>
 								
-								<?php if (strtotime($exp) > time()) { ?>
+								<?php if ($oAbo->getState() === wpsg_abo::STATE_RUNNING) { ?>
 									<span class="duration_running"><?php echo $exp; ?></span>
-								<?php } else { ?>
+                                <?php } else if ($oAbo->getState() === wpsg_abo::STATE_INEXTENSION) { ?>
+									<span class="duration_inextension"><?php echo $exp; ?></span>
+								<?php } else if ($oAbo->getState() === wpsg_abo::STATE_EXTEND) { ?>
 									<span class="duration_expired"><?php echo $exp; ?></span>
 								<?php }  ?>
@@ -61,5 +78,5 @@
 						</div>					
 						<div class="status">
-							<span class="label"><?php echo __('VerlÃ€ngerung:', 'wpsg'); ?></span>
+							<span class="label"><?php echo __('automatische VerlÃ€ngerung:', 'wpsg'); ?></span>
 							<span class="value">
 													
@@ -74,5 +91,5 @@
 									<?php } else { ?>
 									
-										<?php if (in_array($this->get_option('wpsg_mod_abo_autoexpire_customer'), Array(wpsg_mod_abo::CUSTOMER_AUTO_MAIL, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT))) { ?>
+										<?php if (in_array($this->callMod('wpsg_mod_abo', 'getSetting', ['wpsg_mod_abo_autoexpire_customer', $product_id]), Array(wpsg_mod_abo::CUSTOMER_AUTO_MAIL, wpsg_mod_abo::CUSTOMER_AUTO_DIRECT))) { ?>
 										<span class="link_wrap"><a href="<?php echo $this->getUrl(wpsg_ShopController::URL_ABO, 'wpsg_mod_abo', 'stoprenewal', Array('order_id' => $oOrder->id, 'product_key' => $oOrderProduct->getProductKey())); ?>"><?php echo __('Deaktivieren'); ?></a></span>
 										<?php } ?>
Index: /views/mods/mod_abo/produkt_addedit_content.phtml
===================================================================
--- /views/mods/mod_abo/produkt_addedit_content.phtml	(revision 7810)
+++ /views/mods/mod_abo/produkt_addedit_content.phtml	(revision 7811)
@@ -4,4 +4,7 @@
 	 * Integriert die Abo-Einstellungen in das Produkt
 	 */
+
+    $arPaymentSelect = Array();
+    foreach ($this->arPayment as $p) { $arPaymentSelect[$p['id']] = $p['name']; }
 	
 ?>
@@ -54,5 +57,87 @@
 			<div class="wpsg_clear"></div>
 					
+			<br />
+
+            <?php echo wpsg_drawForm_Select('wpsg_mod_abo_expiremode', __('Nach Ablauf des Abos', 'wpsg'), Array(
+            	wpsg_mod_abo::CONFIG => __('Standard', 'wpsg'),
+                wpsg_mod_abo::EXPIRE_MAIL => __('Mail versenden', 'wpsg'),
+                wpsg_mod_abo::EXPIRE_AUTO => __('Automatisch verlÃ€ngern', 'wpsg')
+            ), $this->view['product']['wpsg_mod_abo_expiremode'], array('help' => 'wpsg_mod_abo_expiremode')); ?>
+
+			<br />
+			
+			<div class="wpsg_mod_abo_expiremode wpsg_mod_abo_expiremode_<?php echo wpsg_mod_abo::EXPIRE_MAIL; ?>" style="display:none;">
+			 
+				<?php echo wpsg_drawForm_Select('wpsg_mod_abo_wpsgmodaboexpiration', __('Mail bei Auslauf eines Abos', 'wpsg'), [
+					wpsg_mod_abo::CONFIG => __('Standard', 'wpsg'),
+					'0' => __('Nein', 'wpsg'),
+					'1' => __('Ja', 'wpsg')
+				], $this->view['product']['wpsg_mod_abo_wpsgmodaboexpiration'], array('hint' => wpsg_translate(__('Mail wird bei Auslauf eines Abos versendet. (mail_expiration.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodaboexpiration'), 'help' => 'wpsg_mod_abo_wpsgmodaboexpiration',)); ?>
+
+			</div>
+			
+			<div class="wpsg_mod_abo_expiremode wpsg_mod_abo_expiremode_<?php echo wpsg_mod_abo::EXPIRE_AUTO; ?>" style="display:none;">
+ 
+                <?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_payment', __('Zahlungsart fÃŒr automatische VerlÃ€ngerung', 'wpsg'), $arPaymentSelect, $this->view['product']['wpsg_mod_abo_autoexpire_payment'], array('help' => 'wpsg_mod_abo_autoexpire_payment')); ?>
+                
+				<?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_customermail', __('Mail an Kunden', 'wpsg'), [
+                    wpsg_mod_abo::CONFIG => __('Standard', 'wpsg'),
+                    '0' => __('Nein', 'wpsg'),
+                    '1' => __('Ja', 'wpsg')
+                ], $this->view['product']['wpsg_mod_abo_autoexpire_customermail'], ['help' => 'wpsg_mod_abo_autoexpire_customermail']); ?>
+
+                <?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_adminmail', __('Mail an Administrator', 'wpsg'), [
+                    wpsg_mod_abo::CONFIG => __('Standard', 'wpsg'),
+                    '0' => __('Nein', 'wpsg'),
+                    '1' => __('Ja', 'wpsg')
+                ], $this->view['product']['wpsg_mod_abo_autoexpire_adminmail'], ['help' => 'wpsg_mod_abo_autoexpire_adminmail']); ?>
+
+                <?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_information', __('Mail vor automatischer VerlÃ€ngerung versenden', 'wpsg'), [
+                    wpsg_mod_abo::CONFIG => __('Standard', 'wpsg'),
+                    '0' => __('Nein', 'wpsg'),
+                    '1' => __('Ja', 'wpsg')
+                ], $this->view['product']['wpsg_mod_abo_autoexpire_information'], [
+                    'help' => 'wpsg_mod_abo_autoexpire_information',
+                    'hint' => wpsg_translate(__('Mail wird X-Tage vor einer automatischen VerlÃ€ngerung versendet. (mail_autoinformation.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabautoinfo')
+                ]); ?>
+				
+				<div class="wpsg_mod_abo_autoexpire_information wpsg_mod_abo_autoexpire_information_1" style="display:none;">
+
+                    <?php echo wpsg_drawForm_Input('wpsg_mod_abo_autoexpire_informationtime', __('Zeitspanne zum Versenden der Informationsmail in Tagen', 'wpsg'), $this->view['product']['wpsg_mod_abo_autoexpire_informationtime'], [
+                    	'help' => 'wpsg_mod_abo_autoexpire_informationtime'
+					]); ?>
+					
+				</div>
+				
+                <?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_customer', __('Kunde kann im Frontend', 'wpsg'), [
+                    wpsg_mod_abo::CONFIG => __('Standard', 'wpsg'),
+                    wpsg_mod_abo::CUSTOMER_AUTO_NOTHING => __('Nichts', 'wpsg'),
+                    wpsg_mod_abo::CUSTOMER_AUTO_DIRECT => __('VerlÃ€ngerung direkt stoppen', 'wpsg'),
+                    wpsg_mod_abo::CUSTOMER_AUTO_MAIL => __('VerlÃ€ngerung ÃŒber Mail an Administrator stoppen', 'wpsg')
+                ], $this->view['product']['wpsg_mod_abo_autoexpire_customer'], array('help' => 'wpsg_mod_abo_autoexpire_customer')); ?>
+				
+			</div>
+			
+			<script>
+				
+				jQuery('#wpsg_mod_abo_expiremode').on('change', function() {
+				    
+				    jQuery('.wpsg_mod_abo_expiremode').hide();
+				    jQuery('.wpsg_mod_abo_expiremode_' + jQuery(this).val()).show();
+				    
+				}).change();
+				
+				jQuery('#wpsg_mod_abo_autoexpire_information').on('change', function() {
+
+                    jQuery('.wpsg_mod_abo_autoexpire_information').hide();
+                    jQuery('.wpsg_mod_abo_autoexpire_information_' + jQuery(this).val()).show();
+				    
+				}).change();
+				
+			</script>
+
 		</div>
+		
+		<br />
 		
 		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration des Abo-Moduls', 'wpsg'); ?></a>
Index: /views/mods/mod_abo/settings_edit.phtml
===================================================================
--- /views/mods/mod_abo/settings_edit.phtml	(revision 7810)
+++ /views/mods/mod_abo/settings_edit.phtml	(revision 7811)
@@ -25,7 +25,12 @@
 ), $this->get_option('wpsg_mod_abo_expiremode'), array('help' => 'wpsg_mod_abo_expiremode')); ?>
 
+<br />
+
 <div class="wpsg_mod_expiremode wpsg_mod_expiremode_<?php echo wpsg_mod_abo::EXPIRE_MAIL; ?>" style="display:<?php echo (($this->get_option('wpsg_mod_abo_expiremode') == wpsg_mod_abo::EXPIRE_MAIL || $this->get_option('wpsg_mod_abo_expiremode') === false)?'block':'none'); ?>;">
 
-	<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_wpsgmodaboexpiration', __('Mail bei Auslauf eines Abos', 'wpsg'), $this->get_option('wpsg_mod_abo_wpsgmodaboexpiration'), array('hint' => wpsg_translate(__('nohspc_Mail wird bei Auslauf eines Abos versendet. (mail_expiration.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodaboexpiration'), 'help' => 'wpsg_mod_abo_wpsgmodaboexpiration',)); ?>
+	<?php echo wpsg_drawForm_Select('wpsg_mod_abo_wpsgmodaboexpiration', __('Mail bei Auslauf eines Abos', 'wpsg'), [
+    	'0' => __('Nein', 'wpsg'),
+		'1' => __('Ja', 'wpsg')
+    ], $this->get_option('wpsg_mod_abo_wpsgmodaboexpiration'), array('hint' => wpsg_translate(__('Mail wird bei Auslauf eines Abos versendet. (mail_expiration.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodaboexpiration'), 'help' => 'wpsg_mod_abo_wpsgmodaboexpiration',)); ?>
 
 </div>
@@ -35,13 +40,30 @@
 	<?php /* TODO: Mehrfachauswahl von Zahlungsarten */ ?>
 	<?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_payment', __('Zahlungsart fÃŒr automatische VerlÃ€ngerung', 'wpsg'), $arPaymentSelect, $this->get_option('wpsg_mod_abo_autoexpire_payment'), array('help' => 'wpsg_mod_abo_autoexpire_payment')); ?>
-<br />		
-	<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_autoexpire_customermail', __('Mail an Kunden', 'wpsg'), $this->get_option('wpsg_mod_abo_autoexpire_customermail'),array('help' => 'wpsg_mod_abo_autoexpire_customermail')); ?>
-	<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_autoexpire_adminmail', __('Mail an Administrator', 'wpsg'), $this->get_option('wpsg_mod_abo_autoexpire_adminmail'), array ('help' => 'wpsg_mod_abo_autoexpire_adminmail')); ?>
-<br />	
-	<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_autoexpire_information', __('Mail vor automatischer VerlÃ€ngerung versenden', 'wpsg'), $this->get_option('wpsg_mod_abo_autoexpire_information'), array('hint' => wpsg_translate(__('Mail wird X-Tage vor einer automatischen VerlÃ€ngerung versendet. (mail_autoinformation.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabautoinfo'), 'help' => 'wpsg_mod_abo_autoexpire_information')); ?>
+
+	<?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_customermail', __('Mail an Kunden', 'wpsg'), [
+        '0' => __('Nein', 'wpsg'),
+        '1' => __('Ja', 'wpsg')
+    ], $this->get_option('wpsg_mod_abo_autoexpire_customermail'), ['help' => 'wpsg_mod_abo_autoexpire_customermail']); ?>
+
+    <?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_adminmail', __('Mail an Administrator', 'wpsg'), [
+        '0' => __('Nein', 'wpsg'),
+        '1' => __('Ja', 'wpsg')
+    ], $this->get_option('wpsg_mod_abo_autoexpire_adminmail'), ['help' => 'wpsg_mod_abo_autoexpire_adminmail']); ?>
+
+    <?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_information', __('Mail vor automatischer VerlÃ€ngerung versenden', 'wpsg'), [
+        '0' => __('Nein', 'wpsg'),
+        '1' => __('Ja', 'wpsg')
+    ], $this->get_option('wpsg_mod_abo_autoexpire_information'), [
+    	'help' => 'wpsg_mod_abo_autoexpire_information', 
+		'hint' => wpsg_translate(__('Mail wird X-Tage vor einer automatischen VerlÃ€ngerung versendet. (mail_autoinformation.phtml) -> <a href="#1#">Konfiguration</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#wpsgmodabautoinfo')
+	]); ?>
+		
 	<div class="wpsg_mod_abo_autoexpire_informationactiv" style="display:none;">	
+		
 		<?php echo wpsg_drawForm_Input('wpsg_mod_abo_autoexpire_informationtime', __('Zeitspanne zum Versenden der Informationsmail in Tagen', 'wpsg'), $this->get_option('wpsg_mod_abo_autoexpire_informationtime'), array('help' => 'wpsg_mod_abo_autoexpire_informationtime')); ?>
+		
 	</div>
-<br />
+	
+	<br />
 
 	<?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_customer', __('Kunde kann im Frontend', 'wpsg'), Array(
@@ -83,5 +105,5 @@
 		jQuery('#wpsg_mod_abo_autoexpire_information').bind('change', function() {
 
-			if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_abo_autoexpire_informationactiv').show();
+			if (jQuery(this).val() === '1') jQuery('.wpsg_mod_abo_autoexpire_informationactiv').show();
 			else jQuery('.wpsg_mod_abo_autoexpire_informationactiv').hide();
 			
