summaryrefslogtreecommitdiff
path: root/views/order/view.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/order/view.phtml')
-rw-r--r--views/order/view.phtml62
1 files changed, 62 insertions, 0 deletions
diff --git a/views/order/view.phtml b/views/order/view.phtml
index 9025d12..8df88e7 100644
--- a/views/order/view.phtml
+++ b/views/order/view.phtml
@@ -38,7 +38,25 @@
</div>
<br />
+ <?php if ($this->hasMod('wpsg_mod_gutschein')) { ?>
+ <?php //if (((array_key_exists('gs', $this->view['basket'])) && ($this->view['basket']['gs']['value'] == 0))) { ?>
+ <a href="" id="LinkGutscheinNeu" onclick="return wpsg_addVoucher(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>&nbsp;
+ <?php echo __("Neuer Gutschein.", "wpsg"); ?>
+ </a><br />
+ <?php //} ?>
+ <?php } ?>
+ <?php if ($this->hasMod('wpsg_mod_discount')) { ?>
+ <?php //if (((array_key_exists('preis_rabatt', $this->view['basket']['sum'])) && ($this->view['basket']['sum']['preis_rabatt'] == 0))) { ?>
+ <a href="" id="LinkRabattNeu" onclick="return wpsg_addDiscount(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>&nbsp;
+ <?php echo __("Neuer Rabatt.", "wpsg"); ?>
+ </a><br />
+ <?php //} ?>
+ <?php } ?>
+
+
+ <div id='wpsg_kv_list'>
+ </div>
</div>
<div class="wpsg_admin_content form-horizontal">
@@ -57,6 +75,50 @@
<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Fügt einen neuen Rabatt hinzu (nur wenn keiner da ist)
+ */
+ function wpsg_addDiscount(oid)
+ {
+ jQuery('#wpsg_produkte_table').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-Admin&subaction=discountData&do=add&edit_id=' + oid + '&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_produkte_table').replaceWith(data);
+ jQuery('#LinkRabattNeu').hide();
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addRabatt()
+
+
+ /**
+ * Fügt einen neuen Gutschein hinzu (nur wenn keiner da ist)
+ */
+ function wpsg_addVoucher(oid)
+ {
+ jQuery('#wpsg_produkte_table').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-Admin&subaction=voucherData&do=add&edit_id=' + oid + '&noheader=1',
+ success: function(data) {
+ jQuery('#wpsg_produkte_table').replaceWith(data);
+ jQuery('#LinkGutscheinNeu').hide();
+ //jQuery('#wpsg_kv_list').html(data);
+ //location.href = location.href;
+ //jQuery('#wpsg_kv_list').html('');
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_addVoucher()
+
+
jQuery(document).ready(function() {
jQuery('#wpsg_order_view_tabs a.list-group-item').bind('click', function() {