Index: /mods/wpsg_mod_gutschein.class.php
===================================================================
--- /mods/wpsg_mod_gutschein.class.php	(revision 8505)
+++ /mods/wpsg_mod_gutschein.class.php	(revision 8506)
@@ -264,4 +264,5 @@
 			else if (wpsg_isSizedString($_REQUEST['subaction'], 'save')) $this->be_ajax_save();
 			else if (wpsg_isSizedString($_REQUEST['subaction'], 'delete')) $this->be_ajax_delete();
+			else if (wpsg_isSizedString($_REQUEST['subaction'], 'duplicate')) $this->be_ajax_duplicate();
 			
 			exit;
@@ -435,4 +436,42 @@
 		}
 		
+		public function be_ajax_duplicate() {
+
+			$oVoucher = wpsg_voucher::getInstance(intval($_REQUEST['voucher_id']));
+
+			$productgroups = array();
+			$products = array();
+
+			$pgStr = $oVoucher->__get('productgroups');
+			$prStr = $oVoucher->__get('products');
+			if (wpsg_isSizedString($pgStr)) {
+				foreach (explode(',', $pgStr) as $id) { if (wpsg_isSizedInt($id)) $productgroups[] = intval($id); }
+			}
+			if (wpsg_isSizedString($prStr)) {
+				foreach (explode(',', $prStr) as $id) { if (wpsg_isSizedInt($id)) $products[] = intval($id); }
+			}
+
+			$code = $this->genGS(
+				$oVoucher->__get('value'),
+				$oVoucher->__get('calc_typ'),
+				strtotime($oVoucher->__get('start_date')),
+				strtotime($oVoucher->__get('end_date')),
+				$oVoucher->__get('multi'),
+				$this->shop->get_option('wpsg_mod_gutschein_size'),
+				$oVoucher->__get('comment'),
+				$oVoucher->__get('autocreate_order'),
+				$oVoucher->__get('autocreate_product'),
+				$oVoucher->__get('autocreate_order_product'),
+				$productgroups,
+				$products,
+				$oVoucher->__get('minvalue'),
+				false,
+				($oVoucher->__get('coupon') == '1')
+			);
+
+			$this->shop->addBackendMessage(wpsg_translate(__('Gutschein erfolgreich dupliziert. Neuer Code: #1#', 'wpsg'), $code)); echo '1';
+
+		}
+		
 		/**
 		 * CSV Import von Gutscheinen
Index: /views/mods/mod_gutschein/index.phtml
===================================================================
--- /views/mods/mod_gutschein/index.phtml	(revision 8505)
+++ /views/mods/mod_gutschein/index.phtml	(revision 8506)
@@ -105,4 +105,6 @@
 									|
 									<span><a title="<?php echo __('Bestellungen anzeigen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter[status]=-1&filter[voucher_id]=<?php echo $oVoucher->getId(); ?>"><?php echo __('Bestellungen suchen', 'wpsg'); ?></a></span>
+									|
+									<span class="duplicate"><a title="<?php echo __("Diesen Gutschein mit anderem Code duplizieren", "wpsg"); ?>" href="#" class="wpsg_voucher_duplicate" onclick="return false;" data-voucher_id="<?php echo $oVoucher->getId(); ?>"><?php echo __("Duplizieren", "wpsg"); ?></a></span>
 								</div>
                                                         
@@ -333,3 +335,23 @@
     } );
 
+
+	jQuery('.wpsg_voucher_duplicate').on('click', function() {
+		if (!confirm('<?php echo __('Diesen Gutschein duplizieren?', 'wpsg'); ?>')) return false;
+		var id = jQuery(this).data('voucher_id');
+		wpsg_loading('body');
+		jQuery.ajax({
+			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_gutschein&subaction=duplicate&noheader=1&voucher_id=' + id,
+			success: function(data) {
+				wpsg_loading_done('body');
+				if (data !== '1') { alert(data); }
+				else { location.reload(); }
+			},
+			error: function() {
+				wpsg_loading_done('body');
+				alert('<?php echo __('Unbekannter Fehler beim Duplizieren.', 'wpsg'); ?>');
+			}
+		});
+		return false;
+	}).attr('onclick', null);
+
 /* ]]> */</script>
