Index: /mods/wpsg_mod_deliverytime.class.php
===================================================================
--- /mods/wpsg_mod_deliverytime.class.php	(revision 5916)
+++ /mods/wpsg_mod_deliverytime.class.php	(revision 5917)
@@ -39,5 +39,5 @@
 			$sql = "CREATE TABLE ".WPSG_TBL_PRODUCTS." (
 		   		wpsg_mod_deliverytime_deliverytime VARCHAR(255) NOT NULL, 
-				storeproduct VARCHAR (255) NOT NULL
+				wpsg_mod_deliverytime_storeproduct VARCHAR (255) NOT NULL
 		   	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
    	   	 
@@ -59,20 +59,13 @@
 		{
 		
-			if (wpsg_isSizedInt($product_data['id']))
-			{
-					
-				$product_data = wpsg_array_merge($product_data, $this->db->fetchRow("
-						SELECT
-							`wpsg_mod_deliverytime_deliverytime`,`wpsg_mod_deliverytime_storeproduct`
-						FROM
-							`".WPSG_TBL_PRODUCTS."`
-						WHERE
-							`id` = '".wpsg_q($product_data['id'])."'
-					"));
-					
-			}
-		
-			$product_data['arDeliverytime'] = explode(',', $this->shop->get_option('wpsg_mod_deliverytime_deliverytime'));
-			$product_data['arStoreproduct'] = explode(',', $this->shop->get_option('wpsg_mod_deliverytime_storeproduct'));
+			if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == self::MODE_SELECT)
+			{
+				
+				$this->shop->view['wpsg_mod_deliverytime']['arSelection'] = $this->getPossibleSelection();
+				
+			}
+			
+			$this->shop->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime'] = $product_data['wpsg_mod_deliverytime_deliverytime'];
+			$this->shop->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct'] = $product_data['wpsg_mod_deliverytime_storeproduct'];
 				
 			$product_content['general']['content'] .= $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/produkt_addedit_allgemein.phtml', false);
@@ -113,25 +106,10 @@
 			
 		} // public function settings_save()
-		
-		public function produkt_edit_allgemein(&$produkt_data) 
-		{ 
-						
-			if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == self::MODE_SELECT)
-			{
-				
-				$this->shop->view['wpsg_mod_deliverytime']['arSelection'] = $this->getPossibleSelection();
-				
-			}
-			
-			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = wpsg_getStr($produkt_data['wpsg_mod_deliverytime_deliverytime']);
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/produkt_edit_allgemein.phtml');
-			
-		} // public function produkt_edit_allgemein(&$produkt_data)
-		
+		 
 		public function produkt_save_before(&$produkt_data)
 		{
 				
-			$produkt_data['wpsg_mod_deliverytime_deliverytime'] = wpsg_q($_REQUEST['wpsg_mod_deliverytime']['deliverytime']);
+			$produkt_data['wpsg_mod_deliverytime_deliverytime'] = wpsg_q($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime']);
+			$produkt_data['wpsg_mod_deliverytime_storeproduct'] = wpsg_q($_REQUEST['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct']); 
 				
 		} // public function produkt_save_before(&$produkt_data)
@@ -142,6 +120,6 @@
 			if ($this->shop->get_option('wpsg_mod_deliverytime_show_mail') != '1') return;
 			
-			$this->shop->view['wpsg_mod_deliverytime']['i'] = $i;
-			$this->shop->view['wpsg_mod_deliverytime']['p'] = $p;
+			$this->shop->view['wpsg_mod_deliverytime']['i'] = $index;
+			$this->shop->view['wpsg_mod_deliverytime']['p'] = $produkt;
 			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = $this->getProductDeliveryTime($this->shop->getProduktID($produkt['id']));
 			
@@ -179,5 +157,4 @@
 			if ($this->shop->get_option('wpsg_mod_deliverytime_show_overview') != '1') return;
 			
-
 			$this->shop->view['wpsg_mod_deliverytime']['i'] = $i;
 			$this->shop->view['wpsg_mod_deliverytime']['p'] = $p;
@@ -210,4 +187,106 @@
 		
 		/**
+		 * Zeigt einen Text an, der bei LieferverzÃ¶gerungen angezeigt wird
+		 * @param $product_key
+		 */
+		public function displayDelayTime($product_key)
+		{
+			
+			if ($this->shop->get_option('wpsg_mod_deliverytime_delay') != '1') return false;
+			
+			return wpsg_translate(__('Aufgrund von #1# kann es zu VerzÃ¶gerungen von #2# Tage(n) in der Zustellung kommen.', 'wpsg'), $this->shop->get_option('wpsg_mod_deliverytime_delayText'), $this->shop->get_option('wpsg_mod_deliverytime_delayTime'));
+			
+		} // public function displayDelayTime($product_key)
+		
+		/**
+		 * Zeigt die Lieferzeit formatiert an.
+		 * Bsp: Lieferzeit: 4 Tag(e)
+		 */
+		public function displayDeliveryTime($product_key, $valueOnly = false) 
+		{
+			
+			$oProduct = wpsg_product::getInstance($this->shop->getProduktID($product_key));
+			
+			$strValue = "";
+			
+			if ($this->shop->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS) 
+			{
+			
+				if (wpsg_isSizedInt($oProduct->wpsg_mod_deliverytime_deliverytime)) 
+				{ 
+					
+					/* Lieferzeit > 0 im Produkte */
+					$strValue = wpsg_translate(__('#1# Tag(e)', 'wpsg'), $oProduct->wpsg_mod_deliverytime_deliverytime);
+					
+				}
+				else if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_deliverytime_mode_days_default')) && $oProduct->wpsg_mod_deliverytime_deliverytime != '0') 
+				{
+					
+					/* Lieferzeit > 0 Global */
+					$strValue = wpsg_translate(__('#1# Tag(e)', 'wpsg'), $this->shop->get_option('wpsg_mod_deliverytime_mode_days_default'));
+					
+				}
+				else
+				{
+				
+					$strValue = __('Das Produkt ist sofort lieferbar (Lieferzeit: 0 Tage)', 'wpsg');
+				
+				}
+				
+			}
+			else 
+			{
+				
+				$arPossibleDelivery = wpsg_trim(explode(',', $this->shop->get_option('wpsg_mod_deliverytime_mode_select_values')));
+			
+				if (wpsg_isSizedString($oProduct->wpsg_mod_deliverytime_deliverytime) && in_array($oProduct->wpsg_mod_deliverytime_deliverytime, $arPossibleDelivery)) 
+				{
+										
+					$strValue = __($oProduct->wpsg_mod_deliverytime_deliverytime, 'wpsg');
+					
+				}
+				else
+				{
+					
+					if (array_key_exists($this->shop->get_option('wpsg_mod_deliverytime_mode_select_default'), $arPossibleDelivery))
+					{
+					
+						$strValue = __(@$arPossibleDelivery[$this->shop->get_option('wpsg_mod_deliverytime_mode_select_default')], 'wpsg');
+						
+					}
+					else
+					{
+						
+						$strValue = __('UngÃŒltige Lieferzeitkonfiguration', 'wpsg');
+						
+					}
+					 
+				}
+							
+			}
+			
+			if ($valueOnly === true) return $strValue;
+			else return wpsg_translate(__('Lieferzeit: #1#', 'wpsg'), $strValue);
+					
+		} // public function displayDeliveryTime($product_key)
+ 		
+		/**
+		 * Gibt true zurÃŒck, wenn das Produkt ein Offline Produkt ist, und die Option "Offline Produkte verwenden" aktiviert ist
+		 * @param string $product_key
+		 */
+		public function isStoreProduct($product_key)
+		{
+			
+			// Wenn die Option fÃŒr "Offline Produkte" nicht aktiviert ist, so kann es auch kein Offline Produkt sein
+			if ($this->shop->get_option('wpsg_mod_deliverytime_store') != '1') return false;
+			
+			$oProduct = wpsg_product::getInstance($this->shop->getProduktID($product_key));
+						
+			if ($oProduct->wpsg_mod_deliverytime_storeproduct > 0) return true;
+			else return false;
+			
+		} // public function isStoreProduct($product_key)
+		
+		/**
 		 * Gibt die Lieferzeit eines Produktes anhand seiner ID zurÃŒck
 		 * @param unknown $product_id
Index: /views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml
===================================================================
--- /views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml	(revision 5916)
+++ /views/mods/mod_deliverytime/produkt_addedit_allgemein.phtml	(revision 5917)
@@ -7,19 +7,18 @@
 ?>
 
-<div id="wpsg_minquantity" class="panel panel-default"> 
-	<div class="panel-heading clearfix">
-		<h3 class="panel-title">
-			<span><?php echo __('Lieferzeit', 'wpsg'); ?></span>
-		</h3>
-	</div>
-	<div class="panel-body">	
-		<?php if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_SELECT) { ?>
-			<?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['arSelection'], $this->view['wpsg_mod_deliverytime']['deliverytime'], array('noIndex' => true)); ?>
-		<?php } else if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS) { ?>
-			<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['deliverytime'], array('unit' => __('Tage', 'wpsg'))); ?>
-		<?php } ?>
-		<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_deliverytime_store'))) {?>
-			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime[storeproduct]', __('Als Offlineprodukt anzeigen', 'wpsg'), $this->view['data']['storeproduct']);?>
-		<?php } ?>
-	</div>
-</div>
+<?php echo wpsg_drawForm_AdminboxStart(__('Lieferzeit', 'wpsg')); ?>
+
+	<?php if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_SELECT) { ?>
+		<?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[wpsg_mod_deliverytime_deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['arSelection'], $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_deliverytime'], array('noIndex' => true)); ?>
+	<?php } else if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS) { ?>
+		<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[wpsg_mod_deliverytime_deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['deliverytime'], array('unit' => __('Tage', 'wpsg'))); ?>
+	<?php } ?>
+	<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_deliverytime_store'))) {?>
+		<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime[wpsg_mod_deliverytime_storeproduct]', __('Als Offlineprodukt anzeigen', 'wpsg'), $this->view['wpsg_mod_deliverytime']['wpsg_mod_deliverytime_storeproduct']);?>
+	<?php } ?>
+	
+	<br />
+
+	<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverytime"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Lieferzeit', 'wpsg'); ?></a>
+	
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: ews/mods/mod_deliverytime/produkt_edit_allgemein.phtml
===================================================================
--- /views/mods/mod_deliverytime/produkt_edit_allgemein.phtml	(revision 5916)
+++ 	(revision )
@@ -1,15 +1,0 @@
-<?php
-
-	/**
-	 * Template fÃŒr die Eingabe der Lieferzeit im Produkt 
-	 */
-
-?> 
-<?php if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_SELECT) { ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_deliverytime[deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['arSelection'], $this->view['wpsg_mod_deliverytime']['deliverytime'], array('noIndex' => true)); ?>
-<?php } else if ($this->get_option('wpsg_mod_deliverytime_mode') == wpsg_mod_deliverytime::MODE_DAYS) { ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_deliverytime[deliverytime]', __('Lieferzeit', 'wpsg'), $this->view['wpsg_mod_deliverytime']['deliverytime'], array('unit' => __('Tage', 'wpsg'))); ?>
-<?php } ?>
-<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_deliverytime_store'))) {?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_deliverytime[storeproduct]', __('Als Offlineprodukt anzeigen', 'wpsg'), $this->view['data']['storeproduct']);?>
-<?php } ?>
Index: /views/produkt/addedit.phtml
===================================================================
--- /views/produkt/addedit.phtml	(revision 5916)
+++ /views/produkt/addedit.phtml	(revision 5917)
@@ -42,11 +42,11 @@
 				<?php } ?>								
 			</div>
-			
-			<br />
-			
+									
 			<?php if (wpsg_getStr($_REQUEST['action'], 'add')) { ?>
 				<div class="info"><?php echo __('Nach dem erstmaligen Speichern kÃ¶nnen weitere Einstellungen vorgenommen werden.', 'wpsg'); ?></div>
 				<br />
 			<?php } ?>
+			
+			<br />
 			
 			<?php if (wpsg_isSizedString($_REQUEST['edit_id'])) { ?>
Index: /views/produkt/addedit_general.phtml
===================================================================
--- /views/produkt/addedit_general.phtml	(revision 5916)
+++ /views/produkt/addedit_general.phtml	(revision 5917)
@@ -56,9 +56,6 @@
 	<?php echo wpsg_drawForm_Select('rating', __('Bewertungspunkte', 'wpsg'), array('0', '1', '2', '3', '4', '5'), wpsg_getInt($this->view['data']['rating'])); ?>
 
-	<?php //$this->callMods('produkt_edit_allgemein', array(&$this->view['data'])); ?>	
+	<?php $this->callMods('produkt_edit_allgemein', array(&$this->view['data'])); ?>	
 	
-	<?php /* Anfrageprodukt */ ?>
-	<?php $this->callMod('wpsg_mod_request', 'produkt_edit_allgemein', array(&$this->view['data']));?>
-
 <?php echo wpsg_drawForm_AdminboxEnd(); ?>
 
Index: /views/produkttemplates/standard.phtml
===================================================================
--- /views/produkttemplates/standard.phtml	(revision 5916)
+++ /views/produkttemplates/standard.phtml	(revision 5917)
@@ -132,5 +132,5 @@
 				
 				<?php /* Produkt nur im Store, nicht im Onlineshop vorhanden */ ?>
-				<?php if ($this->view['data']['storeproduct'] >= '1') {?>
+				<?php if ($this->view['data']['wpsg_mod_deliverytime_storeproduct'] >= '1') {?>
 					
 					<span class="wpsg_product_only_store"><?php echo wpsg_translate($this->get_option('wpsg_mod_deliverytime_storetext')); ?></span>
@@ -246,5 +246,5 @@
 			
 			<?php /* Produkt nur im Store, nicht im Onlineshop vorhanden */ ?>
-				<?php if (wpsg_isSizedInt($this->view['data']['storeproduct'])) {?>
+				<?php if (wpsg_isSizedInt($this->view['data']['wpsg_mod_deliverytime_storeproduct'])) {?>
 					
 					<span class="wpsg_product_only_store"><?php  echo wpsg_translate($this->get_option('wpsg_mod_deliverytime_storetext')); ?></span><br />
