Index: /lib/wpsg_imagehandler.class.php
===================================================================
--- /lib/wpsg_imagehandler.class.php	(revision 7850)
+++ /lib/wpsg_imagehandler.class.php	(revision 7851)
@@ -222,5 +222,4 @@
 								$arAttachmentIDs, $variation_data['images_global']
 							)));
-
 						}
 
@@ -243,9 +242,8 @@
          * @param $product_id
          */
-        public function getProductListBackend($product_id, $size = 'thumbnail')
-        {
-            
-            $this->shop->view['productImages'] = $this->getAttachmentIDs($product_id);
-            
+        public function getProductListBackend($product_id, $size = 'thumbnail') {
+            
+            $this->shop->view['productImages'] = $this->getAttachmentIDs($product_id, false, false, true);
+
 			return $this->shop->render(WPSG_PATH_VIEW.'/produkt/images_list.phtml', false);
             
Index: /model/wpsg_order_product.class.php
===================================================================
--- /model/wpsg_order_product.class.php	(revision 7850)
+++ /model/wpsg_order_product.class.php	(revision 7851)
@@ -13,6 +13,5 @@
 		 * LÃ€dt die Daten des bestellten Produkts
 		 */
-		public function load($order_product_id)
-		{
+		public function load($order_product_id) {
 		
 			parent::load($order_product_id);
Index: /mods/wpsg_mod_abo.class.php
===================================================================
--- /mods/wpsg_mod_abo.class.php	(revision 7850)
+++ /mods/wpsg_mod_abo.class.php	(revision 7851)
@@ -437,5 +437,5 @@
 						if ($inform == true) {
 
-							// Mail bei Erstkauf
+							// Mail bei VerlÃ€ngerung
 							$this->sendAboRebuyMail($this->getOrderIDFromKey($product['productkey']), $order_product_id);
 
@@ -533,7 +533,9 @@
 
                 $wpsg_mod_abo_autoexpire_informationtime = intval($this->getSetting('wpsg_mod_abo_autoexpire_informationtime', $product_id)); // Benachrichtigung
-                $interval = intval(date_diff(date_create($a['expiration']), date_create(date('Y-m-d')))->format('%a')); // Tage bis zum auslaufen
-
-                if ($wpsg_mod_abo_autoexpire_informationtime > 0 && $interval <= $wpsg_mod_abo_autoexpire_informationtime) {
+                $interval = intval(date_diff(date_create($a['expiration']), date_create(date('Y-m-d')))->format('%r%a')); // Tage bis zum auslaufen
+
+	            // Positiv NOW() > Auslauf
+
+                if ($wpsg_mod_abo_autoexpire_informationtime > 0 && $interval <= $wpsg_mod_abo_autoexpire_informationtime && $interval < 0) {
 
                     $wpsg_mod_abo_expiremode = $this->getSetting('wpsg_mod_abo_premode', $product_id);
@@ -571,5 +573,5 @@
 					A.`inform_expiration` != '1' 					
 			");
-  
+
 			foreach ($arAboExpiration as $a) {
 
@@ -626,6 +628,5 @@
 		} // public function admin_emailconf_save()
 
-		public function admin_emailconf()
-		{
+		public function admin_emailconf() {
 
 			echo wpsg_drawEMailConfig(
@@ -1328,5 +1329,20 @@
 		    $oOrderProduct = wpsg_order_product::getInstance($order_product_id);
             $product_id = $oOrderProduct->getProductId();
-		    
+
+            $order_extend_exist = intval($this->db->fetchOne("
+				SELECT
+					O.`id`
+				FROM
+					`".WPSG_TBL_ORDERPRODUCT."` AS OP
+						LEFT JOIN `".WPSG_TBL_ORDER."` AS O ON (O.`id` = OP.`o_id`)
+				WHERE
+					OP.`p_id` = '".wpsg_q($product_id)."' AND
+					OP.`productkey` = '".wpsg_q('abo_'.$order_id.'_'.$order_product_id)."' AND
+					O.`payed_date` = '0000-00-00 00:00:00' AND
+					O.`status` != '".wpsg_ShopController::STATUS_STORNIERT."' 					
+			"));
+
+            if ($order_extend_exist > 0) return;
+
 		    if (!is_numeric($product_id)) throw new \Exception(__('Nicht vorgesehen!', 'wpsg'));
 		    
@@ -1661,5 +1677,5 @@
 			if ($this->shop->get_option('wpsg_htmlmail') === '1') {
 
-				$mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_expiration_html.phtml');
+				$mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_expiration_html.phtml', false);
 
 			} else {
Index: /views/mods/mod_abo/produkt_addedit_content.phtml
===================================================================
--- /views/mods/mod_abo/produkt_addedit_content.phtml	(revision 7850)
+++ /views/mods/mod_abo/produkt_addedit_content.phtml	(revision 7851)
@@ -6,4 +6,5 @@
 
     $arPaymentSelect = [
+        '-1' => __('Standard', 'wpsg'),
         'origin' => __('Wie ursprÃŒngliche Zahlungsart', 'wpsg')
 	];
@@ -56,5 +57,5 @@
 			<?php echo wpsg_drawForm_Input('wpsg_mod_abo_price', wpsg_translate(__('Abo Preis (#1#)', 'wpsg'), (($this->get_option('wpsg_preisangaben') == WPSG_NETTO)?__('Netto', 'wpsg'):__('Brutto', 'wpsg'))), wpsg_ff($this->view['product']['wpsg_mod_abo_price']), array('unit' => $this->get_option('wpsg_currency'), 'help' => 'wpsg_mod_abo_price')); ?>		
 			<?php echo wpsg_drawForm_Input('wpsg_mod_abo_durration', __('Abo Dauer (Tage)', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration'], array('help' => 'wpsg_mod_abo_durration')); ?>
-			<?php echo wpsg_drawForm_Input('wpsg_mod_abo_url', __('URL Benachrichtigung', 'wpsg'), $this->view['product']['wpsg_mod_abo_url'], array('hint' => wpsg_translate(__('nohspc_Wird hier nichts angegeben, so wird die URL aus der <a href="#1#">Modulkonfiguration</a> bei Ablauf/VerlÃ€ngerung benachrichtigt.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo'), 'help' => 'wpsg_mod_abo_url')); ?>			 
+			<?php echo wpsg_drawForm_Input('wpsg_mod_abo_url', __('URL Benachrichtigung', 'wpsg'), $this->view['product']['wpsg_mod_abo_url'], array('hint' => wpsg_translate(__('Wird hier nichts angegeben, so wird die URL aus der <a href="#1#">Modulkonfiguration</a> bei Ablauf/VerlÃ€ngerung benachrichtigt.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo'), 'help' => 'wpsg_mod_abo_url')); ?>
 			
 			<div class="wpsg_clear"></div>
@@ -118,5 +119,5 @@
 			<br />
 
-			<div class="wpsg_mod_abo_expiremode wpsg_mod_abo_expiremode_<?php echo wpsg_mod_abo::EXPIRE_AUTO; ?>" style="display:none;">
+			<div id="wpsg_mod_abo_expiremode_auto_layer" 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')); ?>
@@ -134,12 +135,32 @@
                 ], $this->view['product']['wpsg_mod_abo_autoexpire_adminmail'], ['help' => 'wpsg_mod_abo_autoexpire_adminmail']); ?>
 
-                <?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>
+
+                let wpsg_mod_abo_expiremode_auto_layer = document.getElementById('wpsg_mod_abo_expiremode_auto_layer');
+                let wpsg_mod_abo_expiremode = document.getElementById('wpsg_mod_abo_expiremode');
+                let wpsg_mod_abo_premode = document.getElementById('wpsg_mod_abo_premode');
+
+                function displayAutoRenewOptions() {
+
+                    if (wpsg_mod_abo_expiremode.value === '<?php echo wpsg_mod_abo::EXPIRE_AUTO; ?>' || wpsg_mod_abo_premode.value === '<?php echo wpsg_mod_abo::EXPIRE_AUTO; ?>') {
+
+                        wpsg_mod_abo_expiremode_auto_layer.style.display = 'block';
+
+                    } else {
+
+                        wpsg_mod_abo_expiremode_auto_layer.style.display = 'none';
+
+                    }
+
+                }
+
+                wpsg_mod_abo_expiremode.addEventListener('change', displayAutoRenewOptions);
+                wpsg_mod_abo_premode.addEventListener('change', displayAutoRenewOptions);
+
+                displayAutoRenewOptions();
+
+            </script>
 			
 			<script>
Index: /views/mods/mod_abo/settings_edit.phtml
===================================================================
--- /views/mods/mod_abo/settings_edit.phtml	(revision 7850)
+++ /views/mods/mod_abo/settings_edit.phtml	(revision 7851)
@@ -70,5 +70,5 @@
 <br />
 
-<div class="wpsg_mod_expiremode wpsg_mod_expiremode_<?php echo wpsg_mod_abo::EXPIRE_AUTO; ?>" style="display:<?php echo (($this->get_option('wpsg_mod_abo_expiremode') == wpsg_mod_abo::EXPIRE_AUTO)?'block':'none'); ?>;">
+<div id="wpsg_mod_abo_expiremode_auto_layer" style="display:none;">
 	
 	<?php /* TODO: Mehrfachauswahl von Zahlungsarten */ ?>
@@ -87,11 +87,38 @@
 	<br />
 
-	<?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_customer', __('Kunde kann im Frontend', 'wpsg'), Array(
-		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->get_option('wpsg_mod_abo_autoexpire_customer'), array('help' => 'wpsg_mod_abo_autoexpire_customer')); ?>
+</div>
 
-</div>
+<script>
+
+    let wpsg_mod_abo_expiremode_auto_layer = document.getElementById('wpsg_mod_abo_expiremode_auto_layer');
+    let wpsg_mod_abo_expiremode = document.getElementById('wpsg_mod_abo_expiremode');
+    let wpsg_mod_abo_premode = document.getElementById('wpsg_mod_abo_premode');
+
+    function displayAutoRenewOptions() {
+
+    	if (wpsg_mod_abo_expiremode.value === '<?php echo wpsg_mod_abo::EXPIRE_AUTO; ?>' || wpsg_mod_abo_premode.value === '<?php echo wpsg_mod_abo::EXPIRE_AUTO; ?>') {
+
+    		wpsg_mod_abo_expiremode_auto_layer.style.display = 'block';
+
+        } else {
+
+    		wpsg_mod_abo_expiremode_auto_layer.style.display = 'none';
+
+        }
+
+    }
+
+    wpsg_mod_abo_expiremode.addEventListener('change', displayAutoRenewOptions);
+    wpsg_mod_abo_premode.addEventListener('change', displayAutoRenewOptions);
+
+    displayAutoRenewOptions();
+
+</script>
+
+<?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_customer', __('Kunde kann im Frontend', 'wpsg'), Array(
+    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->get_option('wpsg_mod_abo_autoexpire_customer'), array('help' => 'wpsg_mod_abo_autoexpire_customer')); ?>
 
 <?php echo wpsg_drawForm_Input(false, __('CRON URL', 'wpsg'), site_url().'/?wpsg_cron=1', ['readonly' => true]); ?>
@@ -100,5 +127,5 @@
 <br /> 
 
-<script type="text/javascript">/* <![CDATA[ */
+<script>
 
     jQuery(document).ready(function() {
@@ -113,3 +140,3 @@
 	} );
 
-/* ]]> */</script>
+</script>
Index: /views/mods/mod_productvariants/admin_edit.phtml
===================================================================
--- /views/mods/mod_productvariants/admin_edit.phtml	(revision 7850)
+++ /views/mods/mod_productvariants/admin_edit.phtml	(revision 7851)
@@ -200,9 +200,18 @@
     		<tr class="wpsg_mod_productvariants_productimage_row">
     			<td class="col_active">&nbsp;</td>
-   				<?php 
+   				<?php
+
+                    $has_global_images = false;
 
                     if (wpsg_isSizedInt($this->view['product_id'])) {
 
-                        $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['product_id'], $vari['id'], true);
+                        $global_images = wpsg_explode(',', $this->db->fetchOne("SELECT `images` FROM `".WPSG_TBL_VARIANTS_VARI."` WHERE `id` = '".wpsg_q($vari['id'])."' "));
+
+                        if (wpsg_isSizedArray($global_images)) {
+
+                            $arAttachmentIDs = $global_images;
+                            $has_global_images = true;
+
+                        } else $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['product_id'], $vari['id'], true, false);
 
                     } else {
@@ -211,5 +220,5 @@
 
                     }
-					
+
 				?>
 				<td class="ui-sortable" colspan="<?php echo $colspan; ?>"  id="wpsg_images_productimage_<?php echo $this->view['variant']['id']; ?>_<?php echo $vari['id']; ?>" >
@@ -222,7 +231,15 @@
                                 <?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
 
-                                    <a href="#" class="<?php echo ((in_array($attachment_id, explode(",", $vari['images_set'])))?'mark':''); ?> pic" id="<?php echo $attachment_id; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $this->view['variant']['id']; ?>, <?php echo $vari['id'] ?>, '<?php echo $attachment_id; ?>', <?php echo $this->view['product_id']; ?>);">
+                                    <?php if ($has_global_images) { ?>
+
                                         <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
-                                    </a>
+
+                                    <?php } else { ?>
+
+                                        <a href="#" class="<?php echo ((in_array($attachment_id, explode(",", $vari['images_set'])) && !$has_global_images)?'mark':''); ?> pic" id="<?php echo $attachment_id; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $this->view['variant']['id']; ?>, <?php echo $vari['id'] ?>, '<?php echo $attachment_id; ?>', <?php echo $this->view['product_id']; ?>);">
+                                            <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
+                                        </a>
+
+                                    <?php } ?>
 
                                 <?php } else { ?>
Index: /views/produkt/images.phtml
===================================================================
--- /views/produkt/images.phtml	(revision 7850)
+++ /views/produkt/images.phtml	(revision 7851)
@@ -72,5 +72,5 @@
 
 					jQuery('#produktbilder_target_MT').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-					
+
 					jQuery.ajax( {
 						url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&cmd=removeImage&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
Index: /views/produkt/images_list.phtml
===================================================================
--- /views/produkt/images_list.phtml	(revision 7850)
+++ /views/produkt/images_list.phtml	(revision 7851)
@@ -14,5 +14,5 @@
 
 			<a id="produktbild_<?php echo $attachment_id; ?>" onclick="return wpsg_remove_bild_MT('<?php echo $attachment_id; ?>');" href="#" title="<?php echo __('Dieses Bild lÃ¶schen.', 'wpsg'); ?>">
-				
+
 				<div class="box_img_wrap wpsg_be_imagelist_image">
 												
