Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 6833)
+++ /controller/wpsg_ShopController.class.php	(revision 6834)
@@ -2904,4 +2904,14 @@
 		{
 
+		    // Es gibt Mails, die beziehen sich nur auf Kunden 
+            // Wenn aber eine Mail ohne Kunden aber mit Bestellung gesendet werden soll, so kann der Kunde auch aus der Bestellung genommen werden
+		    if ($k_id === false && $o_id !== false)
+            {
+                
+                $oOrder = wpsg_order::getInstance($o_id);
+                $k_id = $oOrder->k_id;
+                
+            }
+		    
 			add_filter('wp_mail_content_type', 'wpsg_mail_content_type', 10, 2);
 
Index: /mods/wpsg_mod_abo.class.php
===================================================================
--- /mods/wpsg_mod_abo.class.php	(revision 6833)
+++ /mods/wpsg_mod_abo.class.php	(revision 6834)
@@ -75,4 +75,5 @@
 				rebuy int(11) DEFAULT '0' NOT NULL,
 				status int(1) DEFAULT '0' NOT NULL,
+				mail_admin_stop DATETIME NOT NULL COMMENT 'Wird auf 1 gesetzt, wenn der Admin das Abo stoppen soll',
 				PRIMARY KEY  (id),
 	  			KEY order_id (order_id),
@@ -282,5 +283,5 @@
 								'cdate' => 'NOW()',
 								'order_id' => wpsg_q($order_id),
-								'product_key' => 'abo_'.$order_id.'_'.wpsg_q($product['productkey']),
+								'product_key' => wpsg_q($product['productkey']),
 								'rebuy' => '0',
 								'expiration' => wpsg_q($abo_expiration),
@@ -391,4 +392,5 @@
 			wpsg_saveEMailConfig("wpsgmodaboexpiration");
 			wpsg_saveEMailConfig("wpsgmodabrebuy");
+            wpsg_saveEMailConfig("wpsgmodaboadminstoprenewal");
 
 		} // public function admin_emailconf_save()
@@ -412,4 +414,9 @@
 				__('Diese Mail bekommt der Kunde wenn er erfolgreich ein Abo verlÃ€ngert hat.', 'wpsg'));
 
+            echo wpsg_drawEMailConfig(
+                'wpsgmodaboadminstoprenewal',
+                __('E-Mail an Admin wenn Abo angehalten werden soll', 'wpsg'),
+                __('Diese Mail wird verschickt, wenn ein Kunde im Frontend ein Abo anhalten will.', 'wpsg'), true);
+             
 		} // public function admin_emailconf()
 
@@ -504,7 +511,7 @@
 			$product_data = $this->shop->cache->loadProduct($product_id);
 
-			$nAboBuyed = $this->db->fetchOne("SELECT `rebuy` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `product_key` = '".wpsg_q($produkt_id)."'");
-
-			if ($nAboBuyed + $stock_neu > $product_data['wpsg_mod_abo_resell'] && $product_data['wpsg_mod_abo_resell'] != '0')
+			$nAboBuyed = $this->db->fetchOne("SELECT `rebuy` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `product_key` = '".wpsg_q($product_id)."'");
+ 
+			if ($nAboBuyed + $stock > $product_data['wpsg_mod_abo_resell'] && $product_data['wpsg_mod_abo_resell'] != '0')
 			{
 
@@ -664,5 +671,5 @@
             
         } // public function order_view($order_id, &$arSidebarArray)
-
+        
         public function order_ajax()
         {
@@ -673,22 +680,10 @@
                 $abo_status = $this->getAboProductStatus($_REQUEST['edit_id'], $_REQUEST['product_key']);
                 
-                $this->db->UpdateQuery(WPSG_TBL_ABO, Array('status' => self::STATUS_ACTIVE), " `id` = '".wpsg_q($abo_status['id'])."' ");
+                $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'));
 
-                $url = $this->getNotifyURL($this->shop->getProduktID($_REQUEST['product_key']));
-
-                if (wpsg_isSizedString($url))
-                {
-
-                    $this->shop->notifyURL($url, $_REQUEST['product_key'], 1, $_REQUEST['edit_id'], 3, array(
-                        'typ' => 'abo_status_started',
-                        'abo_baseOrderID' => $_REQUEST['edit_id']
-                    ));
-
-                    $this->shop->addBackendMessage(wpsg_translate(__('URL Benachrichtigung an: #1# ausgelÃ¶st. (type=abo_status_started)', 'wpsg'), $url));
-
-                }
+                if ($bNotify) $this->shop->addBackendMessage(wpsg_translate(__('URL Benachrichtigung an: #1# ausgelÃ¶st. (type=abo_status_started)', 'wpsg'), $url));
                 
                 $this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$_REQUEST['edit_id']);
@@ -700,23 +695,11 @@
                 $abo_status = $this->getAboProductStatus($_REQUEST['edit_id'], $_REQUEST['product_key']);
 
-                $this->db->UpdateQuery(WPSG_TBL_ABO, Array('status' => self::STATUS_STOPPED), " `id` = '".wpsg_q($abo_status['id'])."' ");
-
+                $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'));
 
-                $url = $this->getNotifyURL($this->shop->getProduktID($_REQUEST['product_key']));
-                
-                if (wpsg_isSizedString($url))
-                {
-                
-                    $this->shop->notifyURL($url, $_REQUEST['product_key'], 1, $_REQUEST['edit_id'], 3, array(
-                        'typ' => 'abo_status_stopp',
-                        'abo_baseOrderID' => $_REQUEST['edit_id']
-                    ));
-                    
-                    $this->shop->addBackendMessage(wpsg_translate(__('URL Benachrichtigung an: #1# ausgelÃ¶st. (type=abo_status_stopped)', 'wpsg'), $url));
-                    
-                }
-                
+                if ($bNotify) $this->shop->addBackendMessage(wpsg_translate(__('URL Benachrichtigung an: #1# ausgelÃ¶st. (type=abo_status_stopped)', 'wpsg'), $url));
+                                                        
                 $this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$_REQUEST['edit_id']);
 
@@ -727,4 +710,170 @@
 		/** Modulfunktionen */
 
+        /**
+         * VerlÃ€ngerung anhalten
+         */
+		private function stopRenewal($abo_status)
+        {
+
+            $this->db->UpdateQuery(WPSG_TBL_ABO, Array('status' => self::STATUS_STOPPED), " `id` = '".wpsg_q($abo_status['id'])."' ");
+            
+            $url = $this->getNotifyURL($this->shop->getProduktID($abo_status['product_key']));
+                
+            if (wpsg_isSizedString($url))
+            {
+
+                $this->shop->notifyURL($url, $abo_status['product_key'], 1, $abo_status['order_id'], 3, array(
+                    'typ' => 'abo_status_stopp',
+                    'abo_baseOrderID' => $abo_status['order_id']
+                ));
+                
+                return true;
+   
+            }
+            
+            $oProduct = wpsg_product::getInstance($this->shop->getProduktID($abo_status['product_key']));
+            
+            // Protokoll
+            $oOrder = wpsg_order::getInstance($abo_status['order_id']);
+            $oOrder->log(wpsg_translate(__('Abo fÃŒr Produkt #1# wure angehalten.', 'wpsg'), $oProduct->getProductName()), '');
+            
+            return false;
+            
+        } // private function stopRenewal()
+
+        /**
+         * VerlÃ€ngerung wieder aktivieren
+         */
+        private function startRenewal($abo_status)
+        {
+
+            $this->db->UpdateQuery(WPSG_TBL_ABO, Array(
+                'status' => self::STATUS_ACTIVE,
+                'inform_expiration' => '0'
+            ), " `id` = '".wpsg_q($abo_status['id'])."' ");
+
+            $url = $this->getNotifyURL($this->shop->getProduktID($abo_status['product_key']));
+
+            if (wpsg_isSizedString($url))
+            {
+
+                $this->shop->notifyURL($url, $abo_status['product_key'], 1, $abo_status['order_id'], 3, array(
+                    'typ' => 'abo_status_started',
+                    'abo_baseOrderID' => $abo_status['order_id']
+                ));
+
+                return true;
+                
+            }
+
+            $oProduct = wpsg_product::getInstance($this->shop->getProduktID($abo_status['product_key']));
+
+            // Protokoll
+            $oOrder = wpsg_order::getInstance($abo_status['order_id']);
+            $oOrder->log(wpsg_translate(__('Abo fÃŒr Produkt #1# wurde fortgesetzt.', 'wpsg'), $oProduct->getProductName()), '');
+            
+            return false;
+
+        } // private function startRenewal($abo_status)
+        
+        /**
+         * Frontend: Anhalten von Abo VerlÃ€ngerungen
+         */
+        public function stoprenewalRedirect()
+        {
+            
+            $oOrder = wpsg_order::getInstance($_REQUEST['order_id']);
+            
+            // SicherheitsÃŒberprÃŒfung
+            if (!wpsg_isSizedInt($_SESSION['wpsg']['checkout']['id']) || $oOrder->k_id != $_SESSION['wpsg']['checkout']['id']) throw new \wpsg\Exception(__('Nicht angemeldet oder kein Zugriff auf diese Bestellung.', 'wpsg'));
+
+            $arOrderProducts = $this->getAboProductsFromOrder($oOrder->id);
+            
+            foreach ($arOrderProducts as $oOrderProduct)
+            {
+
+                $abo_status = $this->getAboProductStatus($oOrder->id, $oOrderProduct->getProductKey());
+ 
+                if ($oOrderProduct->getProductKey() === $_REQUEST['product_key'] && wpsg_isSizedInt($abo_status['id']))
+                {
+       
+                    // 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)
+                    {
+                        
+                        $this->stopRenewal($abo_status);
+
+                        $this->shop->addFrontendMessage(__('Die VerlÃ€ngerung ihres Abos wurde angehalten.', 'wpsg'));
+                        $this->shop->redirect($this->shop->getURL(wpsg_ShopController::URL_ABO));
+                        
+                    }
+                    else if ($this->shop->get_option('wpsg_mod_abo_autoexpire_customer') === wpsg_mod_abo::CUSTOMER_AUTO_MAIL)
+                    {
+                        
+                        try
+                        {
+                        
+                            $this->sendAdminMailStopRenewal($abo_status);
+                        
+                            $this->shop->addFrontendMessage(__('Der Administrator wurde informiert und wird die VerlÃ€ngerung ihres Abos veranlassen.', 'wpsg'));
+                            
+                        } 
+                        catch (\wpsg\Exception $ex)
+                        {
+                        
+                            $this->shop->addFrontendMessage($ex->getMessage());
+                            
+                        }
+
+                        $this->shop->redirect($this->shop->getURL(wpsg_ShopController::URL_ABO));
+                        
+                    }
+                    else throw new \wpsg\Exception(__('Funktion ist deaktiviert.', 'wpsg'));
+                    
+                }
+                
+            }
+            
+            throw new \wpsg\Exception(__('Produkt nicht in Bestellung gefunden.', 'wpsg'));
+
+        } // public function stoprenewalRedirect()
+                
+        /**
+         * Sendet eine Mail an den Admin, wenn ein Kunde ein Abo anhalten mÃ¶chte
+         * 
+         * @param $abo_status
+         */
+        private function sendAdminMailStopRenewal($abo_status)
+        {
+            
+            if (strtotime($abo_status['mail_admin_stop']) > 0) throw new \wpsg\Exception(wpsg_translate(__('Admin wurde bereits am #1# benachrichtigt das Abo zu stoppen.'), wpsg_formatTimestamp($abo_status['mail_admin_stop'], false)));
+            
+            $this->db->UpdateQuery(WPSG_TBL_ABO, Array(
+                'mail_admin_stop' => 'NOW()'
+            ), " `id` = '".wpsg_q($abo_status['id'])."' ");
+            
+            // Mail senden
+            $this->shop->view['oOrder'] = wpsg_order::getInstance($abo_status['order_id']);
+            $this->shop->view['oCustomer'] = $this->shop->view['oOrder']->getCustomer();
+            $this->shop->view['oProduct'] = wpsg_product::getInstance($abo_status['product_key']);
+            $this->shop->view['product_key'] = $abo_status['product_key'];
+            
+            if ($this->shop->get_option('wpsg_htmlmail') === '1') $mail_html = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_admin_stoprenewal_html.phtml', false);
+            else $mail_html = false;
+
+            $mail_text = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/mail_admin_stoprenewal.phtml', false);
+ 
+            $to = $this->shop->get_option('wpsg_wpsgmodaboadminstoprenewal_empfaenger');
+
+            $oProduct = wpsg_product::getInstance($this->shop->getProduktID($abo_status['product_key']));
+
+            // Protokoll
+            $oOrder = wpsg_order::getInstance($abo_status['order_id']);
+            $oOrder->log(wpsg_translate(__('Mail an Administrator (Abo anhalten)', 'wpsg'), $oProduct->getProductName()), $mail_text);
+            
+            $this->shop->sendMail($mail_text, $to, 'wpsgmodaboadminstoprenewal', array(), $abo_status['order_id'], false, $mail_html);
+            
+        } // private function sendAdminMailStopRenewal($abo_status)
+        
         /**
          * Erstellt automatisch eine Bestellung wenn ein Abo ausgelaufen ist
@@ -822,5 +971,5 @@
         {
             
-            $abo_product = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `product_key` = '".wpsg_q('abo_'.$order_id.'_'.$product_key)."' ");
+            $abo_product = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' AND `product_key` = '".wpsg_q($product_key)."' ");
             
             return $abo_product;
@@ -850,14 +999,12 @@
 		{
 
+            // Folgebestellung testen
+            $nFolgeBestellung = $this->db->fetchOne("SELECT COUNT(*) FROM `".WPSG_TBL_ORDERPRODUCT."` WHERE `o_id` = '".wpsg_q($order_id)."' AND `productkey` REGEXP '^abo_[0-9]+_[0-9]+' ");
+            if ($nFolgeBestellung > 0) return 2;
+            
 			// Bei Originalbestellungen gibt es einen eintrag in der Tabelle
 			$nAboBestellung = $this->db->fetchOne("SELECT COUNT(*) FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."'");
-
 			if ($nAboBestellung > 0) return 1;
-
-			// Jetzt auf Folgebestellung testen
-			$nFolgeBestellung = $this->db->fetchOne("SELECT COUNT(*) FROM `".WPSG_TBL_ORDERPRODUCT."` WHERE `o_id` = '".wpsg_q($order_id)."' AND `productkey` REGEXP '^abo_[0-9]+_[0-9]+' ");
-
-			if ($nFolgeBestellung > 0) return 2;
-
+            
 			return false;
 
@@ -894,11 +1041,21 @@
 		/**
 		 * Gibt das Auslaufdatum einer Abobestellung zurÃŒck
+         * 
 		 * @param unknown_type $order_id
 		 */
-		public function getOrderAboExpiration($order_id)
+		public function getOrderAboExpiration($order_id, $product_key)
 		{
 
 			$data = null;
-			$data = wpsg_fromDate($this->db->fetchOne("SELECT `expiration` FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."'"), false);
+            
+			$data = wpsg_fromDate($this->db->fetchOne("
+                SELECT 
+                    `expiration` 
+                FROM 
+                    `".WPSG_TBL_ABO."` 
+                WHERE 
+                    `order_id` = '".wpsg_q($order_id)."' AND
+                    `product_key` = '".wpsg_q($product_key)."'
+            "), false);
 
 			return $data;
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 6833)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 6834)
@@ -1045,5 +1045,5 @@
 			
 			if (wpsg_get_the_id() <= 0) return;
-
+            
 			if (wpsg_get_the_id() == $this->shop->get_option('wpsg_page_mod_kundenverwaltung_profil'))
 			{
@@ -1093,8 +1093,41 @@
 			}
 			
-			else if (wpsg_get_the_id() == $this->shop->get_option('wpsg_page_mod_kundenverwaktung_abo'))
-			{
-
-				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_kundenverwaltung/abo.phtml');
+			else if (wpsg_get_the_id() == $this->shop->get_option('wpsg_page_mod_kundenverwaltung_abo') && $this->shop->hasMod('wpsg_mod_abo'))
+			{
+
+                // Eingelogt
+                if ($this->isLoggedIn() > 0)
+                {
+			    
+                    $this->shop->view['arOrder'] = wpsg_order::find(Array(
+                        'k_id' => $_SESSION['wpsg']['checkout']['id'],
+                        'NOTstatus' => wpsg_ShopController::STATUS_UNVOLLSTAENDIG
+                    ));
+                    
+                    // Jetzt noch normale Bestellungen rausfiltern
+                    foreach ($this->shop->view['arOrder'] as $k => $oOrder)
+                    {
+                        
+                        if ($this->shop->callMod('wpsg_mod_abo', 'isAboOrder', Array($oOrder->id)) !== 1)
+                        {
+                            
+                            unset($this->shop->view['arOrder'][$k]);
+                            
+                        }
+                        
+                    }
+                    
+				    $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_abo/page_abo.phtml');
+
+                }
+                else
+                {
+
+                    $this->shop->view['error'] = $_SESSION['wpsg']['errorFields'];
+                    $content = $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_kundenverwaltung/login.phtml', false);
+
+                }
+
+                return -2;
 			
 			}	
Index: /views/css/frontend.css
===================================================================
--- /views/css/frontend.css	(revision 6833)
+++ /views/css/frontend.css	(revision 6834)
@@ -183,4 +183,17 @@
 .invalid { padding-left:22px; line-height:24px; color:#ec3f41; }
 .valid { padding-left:22px; line-height:24px; color:#3a7d34; }
+
+/* Modul "Abo Produkte" */
+.wpsg_mod_abo_order_product_wrap { }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product { border-bottom:1px solid #EEEEEE; padding-bottom:15px; margin-bottom:15px; }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .link_wrap { display:inline-block; margin-left:10px; }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .link_wrap:before { content:'['; margin-right:5px; display:inline-block; }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .link_wrap:after { content:']'; margin-left:5px; display:inline-block; }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .status_activ { color:green; }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .status_inactiv { color:red; }
+.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_expired { color:red; }
+.wpsg_mod_abo_order_product_wrap .wpsg_mod_abo_order_product .image { float:left; margin-right:15px; }
 
 /* Produktattribute */
Index: /views/mods/mod_abo/mail_admin_stoprenewal.phtml
===================================================================
--- /views/mods/mod_abo/mail_admin_stoprenewal.phtml	(revision 6834)
+++ /views/mods/mod_abo/mail_admin_stoprenewal.phtml	(revision 6834)
@@ -0,0 +1,14 @@
+<?php
+
+    /**
+     * Template fÃŒr die Mail, die der Admin bekommt wenn ein Kunde ein Abo im Frontend anhalten mÃ¶chte (Text)
+     */
+    
+?><?php echo __('Hallo Administrator,', 'wpsg'); ?> 
+
+<?php echo wpsg_translate(__('Der Kunde "#1#" mÃ¶chte sein Abo fÃŒr Produkte "#2#" anhalten.'), trim($this->view['oCustomer']->getFirstname().$this->view['oCustomer']->getName()), $this->view['oProduct']->getProductName()); ?> 
+
+<?php echo wpsg_translate(__('Link zur Ausgangsbestellung: <a href="#1#">#1#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$this->view['oOrder']->id); ?> 
+<?php echo wpsg_translate(__('Direkt stoppen und zur Bestellung: <a href="#1#">#1#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id='.$this->view['oOrder']->id.'&product_key='.$this->view['product_key'].'&do=stop&noheader=1'); ?> 
+
+<?php echo __('Dies ist eine automatisch generierte Mail.', 'wpsg'); ?> 
Index: /views/mods/mod_abo/mail_admin_stoprenewal_html.phtml
===================================================================
--- /views/mods/mod_abo/mail_admin_stoprenewal_html.phtml	(revision 6834)
+++ /views/mods/mod_abo/mail_admin_stoprenewal_html.phtml	(revision 6834)
@@ -0,0 +1,16 @@
+<?php
+
+    /**
+     * Template fÃŒr die Mail, die der Admin bekommt wenn ein Kunde ein Abo im Frontend anhalten mÃ¶chte (HTML)
+     */
+    
+?>
+
+<?php echo __('Hallo Administrator,', 'wpsg'); ?><br />
+<br />
+<?php echo wpsg_translate(__('Der Kunde "#1#" mÃ¶chte sein Abo fÃŒr Produkte "#2#" anhalten.'), trim($this->view['oCustomer']->getFirstname().$this->view['oCustomer']->getName()), $this->view['oProduct']->getProductName()); ?><br />
+<br />
+<?php echo wpsg_translate(__('Link zur Ausgangsbestellung: <a href="#1#">#1#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$this->view['oOrder']->id); ?><br />
+<?php echo wpsg_translate(__('Direkt stoppen und zur Bestellung: <a href="#1#">#1#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id='.$this->view['oOrder']->id.'&product_key='.$this->view['product_key'].'&do=stop&noheader=1'); ?><br />
+<br />
+<?php echo __('Dies ist eine automatisch generierte Mail.', 'wpsg'); ?>
Index: /views/mods/mod_abo/order_view.phtml
===================================================================
--- /views/mods/mod_abo/order_view.phtml	(revision 6833)
+++ /views/mods/mod_abo/order_view.phtml	(revision 6834)
@@ -11,7 +11,11 @@
 
     <?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
-         
+
+        <?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), false, Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?>
+
+        <?php echo wpsg_drawForm_Text(wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?>
+    
         <?php echo wpsg_drawForm_TextStart(); ?>
-            
+        
             <?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?>
     
@@ -19,25 +23,17 @@
         
                 <?php echo __('Aktiv', 'wpsg'); ?>
-
-                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=stop&noheader=1"><?php echo __('Anhalten'); ?></a>&nbsp;]
+        
+                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=stop&noheader=1"><?php echo __('Deaktivieren'); ?></a>&nbsp;]
         
             <?php } else if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
         
-                <?php echo __('Angehalten', 'wpsg'); ?>
+                <?php echo __('Inaktiv', 'wpsg'); ?>
 
-                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=run&noheader=1"><?php echo __('Fortsetzen'); ?></a>&nbsp;]
+                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=run&noheader=1"><?php echo __('Aktivieren'); ?></a>&nbsp;]
         
             <?php } ?>
     
         <?php echo wpsg_drawForm_TextEnd(__('VerlÃ€ngerung')); ?>
-    
-        <?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id']))); echo wpsg_drawForm_Text(__('Abo lÃ€uft bis'), wpsg_formatTimestamp($tExpire), false, Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?>
-     
-        <?php /* echo wpsg_drawForm_TextStart(); ?>
-
-            <?php echo wpsg_translate(_('Erstkauf am #1#', 'wpsg'), $this->view['data']['cdate']); ?>
-    
-        <?php echo wpsg_drawForm_TextEnd(__('Verlauf', 'wpsg')); */ ?>
-    
+          
     <?php echo wpsg_drawForm_AdminboxEnd(); ?>
     
Index: /views/mods/mod_abo/page_abo.phtml
===================================================================
--- /views/mods/mod_abo/page_abo.phtml	(revision 6834)
+++ /views/mods/mod_abo/page_abo.phtml	(revision 6834)
@@ -0,0 +1,104 @@
+<?php
+
+	/**
+	 * Template fÃŒr die Ãbersichtsseite der Abonnements im Frontend
+	 */
+ 
+?>
+
+<div class="wpsg_mod_kundenverwaltung_abo wpsg">
+
+	<?php echo $this->writeFrontendMessage(); ?>
+	
+	<?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
+		
+		<div class="wpsg_mod_abo_order_product_wrap">
+		<?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())); ?>
+			
+				<div class="wpsg_mod_abo_order_product">
+
+					<h1 class="entry-title title">
+						<?php echo wpsg_translate(__('Abo "#1#" aus Bestellung #2#', 'wpsg'), $oOrderProduct->getProduct()->getProductName(), $oOrder->getNr()); ?>
+					</h1>
+					
+					<?php $nAttachmentID = $this->imagehandler->getAttachmentID($oOrderProduct->getProductKey()); ?>
+					
+					<?php if (wpsg_isSizedInt($nAttachmentID)) { ?>
+						<div class="image">
+							<?php echo wp_get_attachment_image($nAttachmentID, array(100, 100), false, array()); ?>
+						</div>
+					<?php } ?>
+			
+					<div class="content">
+					
+						<div class="start">
+							<span class="label"><?php echo __('Erstkauf:', 'wpsg'); ?></span>
+							<span class="value">
+								
+								<?php echo wpsg_formatTimestamp(strtotime($oOrder->cdate)); ?>
+								
+							</span>
+						</div>
+						<div class="price">
+							<span class="label"><?php echo wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration); ?></span>
+							<span class="value"><?php echo wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency')); ?></span>
+						</div>
+						<div class="duration">
+							<span class="label"><?php echo __('Laufzeit:', 'wpsg'); ?></span>
+							<span class="value">
+								
+								<?php $exp = $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey())); ?>
+								
+								<?php if (strtotime($exp) > time()) { ?>
+									<span class="duration_running"><?php echo $exp; ?></span>
+								<?php } else { ?>
+									<span class="duration_expired"><?php echo $exp; ?></span>
+								<?php }  ?>
+								
+							</span>
+						</div>					
+						<div class="status">
+							<span class="label"><?php echo __('VerlÃ€ngerung:', 'wpsg'); ?></span>
+							<span class="value">
+													
+								<?php if ($aboStatus['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
+									
+									<span class="status_activ"><?php echo __('Aktiv'); ?></span>
+									
+									<?php if (strtotime($aboStatus['mail_admin_stop'])) { ?>
+	
+										<?php echo __('KÃŒndigung ausstehend', 'wpsg'); ?>
+										
+									<?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))) { ?>
+										<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 } ?>
+							
+									<?php } ?>
+									
+								<?php } else if ($aboStatus['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
+									<span class="status_inactiv"><?php echo __('Inaktiv') ?></span>
+								<?php } ?> 
+								
+							</span>
+						</div>
+					</div>
+					
+					<div class="wpsg_clear"></div>
+					
+				</div>
+				
+			<?php } // foreach OrderProducts ?>
+							
+		<?php } // foreach Order ?>
+		</div>
+		
+	<?php } else {Â ?>
+	
+		<p><?php echo __('Bisher kein(e) Abonnement(s) vorhanden.', 'wpsg'); ?></p>
+		
+	<?php } ?>
+</div>
Index: /views/mods/mod_abo/settings_edit.phtml
===================================================================
--- /views/mods/mod_abo/settings_edit.phtml	(revision 6833)
+++ /views/mods/mod_abo/settings_edit.phtml	(revision 6834)
@@ -17,6 +17,6 @@
  
 <?php echo wpsg_drawForm_Select('wpsg_mod_abo_expiremode', __('Nach Ablauf des Abos', 'wpsg'), Array(
-	wpsg_mod_abo::EXPIRE_MAIL => _('Mail versenden', 'wpsg'),
-	wpsg_mod_abo::EXPIRE_AUTO => _('Automatisch verlÃ€ngern', 'wpsg')
+	wpsg_mod_abo::EXPIRE_MAIL => __('Mail versenden', 'wpsg'),
+	wpsg_mod_abo::EXPIRE_AUTO => __('Automatisch verlÃ€ngern', 'wpsg')
 ), $this->get_option('wpsg_mod_abo_expiremode'), array('help' => 'wpsg_mod_abo_expiremode')); ?>
 
@@ -33,7 +33,7 @@
 	<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_autoexpire_adminmail', __('Mail an Administrator'), $this->get_option('wpsg_mod_abo_autoexpire_adminmail')); ?>
 	<?php echo wpsg_drawForm_Select('wpsg_mod_abo_autoexpire_customer', __('Kunde kann im Frontend'), 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')
+		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()); ?>	
 	
Index: ews/mods/mod_kundenverwaltung/abo.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/abo.phtml	(revision 6833)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<?php
-
-	/**
-	 * Template fÃŒr die Ãbersichtsseite der Abonnements im Frontend
-	 */
-
-	//wpsg_debug($this->view['arOrder']);
-
-?>
-
-<div class="wpsg_mod_kundenverwaltung_abo wpsg">
-
-	<?php echo $this->writeFrontendMessage(); ?>
-	
-	<?php if (wpsg_isSizedArray($this->view['arOrder'])) { ?>
-		<?php foreach ($this->view['arOrder'] as $order) { ?>
-		
-		<div class="wpsg_box">
-			
-			<div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
-			
-			<?php /* Abo-Name */ ?>
-			<?php echo ($oOrderProduct->getProduct()->getProductName()); ?>
-			
-			<?php /* Abo-Preis */ ?>
-			
-			<?php /* Anhalten des Abos */ ?>
-			<?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?>
-    
-            <?php if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
-        
-                <?php echo __('Aktiv', 'wpsg'); ?>
-
-                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=stop&noheader=1"><?php echo __('Anhalten'); ?></a>&nbsp;]
-        
-            <?php } else if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
-        
-                <?php echo __('Angehalten', 'wpsg'); ?>
-
-                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=run&noheader=1"><?php echo __('Fortsetzen'); ?></a>&nbsp;]
-        
-            <?php } ?>
-    
-        	<?php echo wpsg_drawForm_TextEnd(__('VerlÃ€ngerung')); ?>
-			
-			<?php /* Ablaufzeitpunkt */ ?>		
-			<?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id']))); echo wpsg_drawForm_Text(__('Abo lÃ€uft bis'), wpsg_formatTimestamp($tExpire), false, Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?>				
-				
-			</div>
-		
-		</div>
-				
-		<?php } ?>
-	<?php } else {Â ?>
-	<p><?php echo __('Bisher kein(e) Abonnement(s) vorhanden.', 'wpsg'); ?></p>
-	<?php } ?>
-</div>
Index: /views/order/index.phtml
===================================================================
--- /views/order/index.phtml	(revision 6833)
+++ /views/order/index.phtml	(revision 6834)
@@ -172,20 +172,8 @@
 
                             <?php if ($this->hasMod('wpsg_mod_abo')) { ?>
-                            
-                                <?php if (in_array(strval($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?>
-                                    
-                                    <?php $abo_expiration = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id))); ?>
-
-                                    <?php echo __('Abo:', 'wpsg'); ?>
-                                    
-                                    <?php if ($abo_expiration > time()) { ?>
-                                        <span class="wpsg_mod_abo_future_expire"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
-                                    <?php } else { ?>
-                                        <span class="wpsg_mod_abo_expired"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>    
-                                    <?php } ?>
-                                    
-                                <?php } ?>
-                                
-                                <?php if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 2) { ?>
+
+                                <?php if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 1) { ?>
+                                    <?php echo __('Abo Bestellung', 'wpsg'); ?>
+                                <?php } else if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id)) === 2) { ?>
                                     
                                     <?php
@@ -246,12 +234,35 @@
                         <td class="col_products">
 
-                            <?php $oOrderProducts = $oOrder->getOrderProducts();
-                            foreach ($oOrderProducts as $oOrderProduct) { ?>
-                            <?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> fÃŒr je #4#', 'wpsg'),
-                                $oOrderProduct->getCount(),
-                                WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(),
-                                $oOrderProduct->getProductName(),
-                                wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
-                            ); ?><br />
+                            <?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
+                            
+                            <?php foreach ($oOrderProducts as $oOrderProduct) { ?>
+                            
+                                <?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> fÃŒr je #4#', 'wpsg'),
+                                    $oOrderProduct->getCount(),
+                                    WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(),
+                                    $oOrderProduct->getProductName(),
+                                    wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
+                                ); ?><br />
+                                
+                                <?php if ($this->hasMod('wpsg_mod_abo')) { ?>
+
+                                    <?php if (in_array(strval($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?>
+
+                                        <?php $abo_expiration = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey()))); ?>
+
+                                        <?php echo __('Abo Laufzeit:', 'wpsg'); ?>
+
+                                        <?php if ($abo_expiration > time()) { ?>
+                                            <span class="wpsg_mod_abo_future_expire"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
+                                        <?php } else { ?>
+                                            <span class="wpsg_mod_abo_expired"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
+                                        <?php } ?>
+
+                                        <br />
+                                        
+                                    <?php } ?>
+                                    
+                                <?php } ?>
+                            
                             <?php } ?>
 
