Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 7492)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 7493)
@@ -1880,5 +1880,7 @@
 			$this->shop->view['pflicht'] = $this->shop->loadPflichtFeldDaten();
 			$this->shop->view['arTitles'] = explode('|', $this->shop->view['pflicht']['anrede_auswahl']);
-			$this->shop->view['data'] = array();
+			$this->shop->view['data'] = array(
+				'status' => '1'
+			);
 			$this->shop->view['arLand'] = $this->db->fetchAssocField("
 				SELECT L.`id`, L.`name` FROM `".WPSG_TBL_LAND."` AS L ORDER BY `name` ASC
Index: /mods/wpsg_mod_paypalapi.class.php
===================================================================
--- /mods/wpsg_mod_paypalapi.class.php	(revision 7492)
+++ /mods/wpsg_mod_paypalapi.class.php	(revision 7493)
@@ -1365,5 +1365,5 @@
 			 
 			$json_data = $this->api_call('v1/payments/payment', $post_data, $access_token);
-			
+			 
 			if (wpsg_isSizedString($json_data['id'])) $oOrder->setMeta('wpsg_mod_paypalapi_paymentId', $json_data['id']);
 			 
Index: /mods/wpsg_mod_voucherproduct.class.php
===================================================================
--- /mods/wpsg_mod_voucherproduct.class.php	(revision 7492)
+++ /mods/wpsg_mod_voucherproduct.class.php	(revision 7493)
@@ -32,5 +32,6 @@
 			  	wpsg_mod_voucherproduct_gs INT(11) NOT NULL,			  	
 			  	wpsg_mod_voucherproduct_gslaenge INT(11) NOT NULL,
-			  	wpsg_mod_voucherproduct_available INT(11) NOT NULL
+			  	wpsg_mod_voucherproduct_available INT(11) NOT NULL,
+			  	wpsg_mod_voucherproduct_coupon INT(1) NOT NULL COMMENT 'Wenn 1, dann wird ein Wertgutschein generiert.'
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
 			
@@ -150,10 +151,10 @@
 		} // public function settings_save()
 		
-		public function produkt_save_before(&$produkt_data) 
-		{ 
-			
-		    $produkt_data['wpsg_mod_voucherproduct_gs'] = wpsg_q(wpsg_sinput("key", wpsg_getStr($_REQUEST['wpsg_mod_voucherproduct_gs'], false, false, WPSG_SANITIZE_CHECKBOX)));
-			$produkt_data['wpsg_mod_voucherproduct_gslaenge'] = intval(wpsg_sinput("key", wpsg_getStr($_REQUEST['wpsg_mod_voucherproduct_gslaenge'], false, false, WPSG_SANITIZE_TEXTFIELD)));
-			$produkt_data['wpsg_mod_voucherproduct_available'] = intval(wpsg_sinput("key", wpsg_getStr($_REQUEST['wpsg_mod_voucherproduct_available'], false, false, WPSG_SANITIZE_TEXTFIELD)));
+		public function produkt_save_before(&$produkt_data) { 
+			
+			if (wpsg_checkInput($_REQUEST['wpsg_mod_voucherproduct_gs'], WPSG_SANITIZE_CHECKBOX)) $produkt_data['wpsg_mod_voucherproduct_gs'] = wpsg_q($_REQUEST['wpsg_mod_voucherproduct_gs']);
+			if (wpsg_checkInput($_REQUEST['wpsg_mod_voucherproduct_gslaenge'], WPSG_SANITIZE_INT)) $produkt_data['wpsg_mod_voucherproduct_gslaenge'] = wpsg_q($_REQUEST['wpsg_mod_voucherproduct_gslaenge']);
+			if (wpsg_checkInput($_REQUEST['wpsg_mod_voucherproduct_available'], WPSG_SANITIZE_INT)) $produkt_data['wpsg_mod_voucherproduct_available'] = wpsg_q($_REQUEST['wpsg_mod_voucherproduct_available']);			
+			if (wpsg_checkInput($_REQUEST['wpsg_mod_voucherproduct_coupon'], WPSG_SANITIZE_CHECKBOX)) $produkt_data['wpsg_mod_voucherproduct_coupon'] = wpsg_q($_REQUEST['wpsg_mod_voucherproduct_coupon']);
 			
 		} // public function produkt_save_before(&$produkt_data)
@@ -212,7 +213,13 @@
 								$order_id,
 								$p['id'],
-								$p['order_product_id']
+								$p['order_product_id'],
+								[], // $arProductGroups
+								[], // $productgroups
+								[], // $products
+								false, // $minValue
+								false. // $code
+								wpsg_isSizedInt($p['wpsg_mod_voucherproduct_coupon'])
 							));
-							
+							 
 							$arGSFiles[] = array(
 								'file' => $this->genGSDokument($code, $order_id, $p['id'], false, $p['product_index']),
Index: /views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml
===================================================================
--- /views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml	(revision 7492)
+++ /views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml	(revision 7493)
@@ -13,14 +13,42 @@
 	</div>
 	<div class="panel-body">
-		<?php if (isset($this->view['data']['wpsg_mod_voucherproduct_gs']))
-				echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_gs', __('Gutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_gs']); ?>		
-		<?php if (isset($this->view['data']['wpsg_mod_voucherproduct_gslaenge']))
-				echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_gslaenge', __('LÃ€nge des Gutscheincodes', 'wpsg'), (($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] > 0)?$this->view['data']['wpsg_mod_voucherproduct_gslaenge']:10)); ?>
-		<?php if (isset($this->view['data']['wpsg_mod_voucherproduct_available']))
-				echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_available', __('GÃŒltigkeit (Tage)', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_available']); ?>
+		
+		<?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_gs', __('Gutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_gs']); ?>
+		
+		<div class="wpsg_mod_voucherproduct_gs wpsg_mod_voucherproduct_gs_1" style="display:none;">
+
+			<br />
+			
+			<?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_gslaenge', __('LÃ€nge des Gutscheincodes', 'wpsg'), (($this->view['data']['wpsg_mod_voucherproduct_gslaenge'] > 0)?$this->view['data']['wpsg_mod_voucherproduct_gslaenge']:10)); ?>
+			<?php echo wpsg_drawForm_Input('wpsg_mod_voucherproduct_available', __('GÃŒltigkeit (Tage)', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_available']); ?>
+			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_voucherproduct_coupon', __('Gutschein als Wertgutschein generieren', 'wpsg'), $this->view['data']['wpsg_mod_voucherproduct_coupon']); ?>
+			
+		</div>
+		
+		<script>
+			
+			jQuery(document).ready(function() {
+				
+				jQuery('#wpsg_mod_voucherproduct_gs').on('change', function() {
+					
+					if (jQuery(this).prop('checked')) {
+						
+						jQuery('.wpsg_mod_voucherproduct_gs_1').show();
+						
+					} else {
+
+						jQuery('.wpsg_mod_voucherproduct_gs_1').hide();
+						
+					}
+					
+				}).trigger('change');
+				
+			});
+			
+		</script>
+			
+		<br /><br />
 	
-	<br /><br />
-	
-	<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_voucherproduct"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration des Gutscheinproduktes', 'wpsg'); ?></a>
+		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_voucherproduct"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration des Gutscheinproduktes', 'wpsg'); ?></a>
 		
 	</div>
Index: /views/warenkorb/basket.phtml
===================================================================
--- /views/warenkorb/basket.phtml	(revision 7492)
+++ /views/warenkorb/basket.phtml	(revision 7493)
@@ -145,6 +145,4 @@
 
 			<?php $bLine = false; ?>
-			
-			
 			
 			<?php if (wpsg_isSizedArray($this->view['basket']['arCalculation']['voucher'])) { $bLine = true; ?>
