summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomas <noreply@maennchen1.de>2018-10-10 12:22:16 +0000
committerthomas <noreply@maennchen1.de>2018-10-10 12:22:16 +0000
commit52657844ea9d029264b862c07b6574401d903539 (patch)
tree8271c5ec981f51dabf075aa6ab18cbcb585073e9
parentee8bd65791849b515bf85c593cb4661f30085974 (diff)
- Gutschein vs. Rabatt
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7181 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/mods/mod_discount/settings_edit.phtml4
-rw-r--r--views/mods/mod_gutschein/basket_row_end.phtml27
2 files changed, 21 insertions, 10 deletions
diff --git a/views/mods/mod_discount/settings_edit.phtml b/views/mods/mod_discount/settings_edit.phtml
index 002926f..ed4ad5f 100644
--- a/views/mods/mod_discount/settings_edit.phtml
+++ b/views/mods/mod_discount/settings_edit.phtml
@@ -56,8 +56,10 @@
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_stopRabatt', __('Nur ersten Rabatt berücksichtigen', 'wpsg'), $this->get_option('wpsg_mod_discount_stopRabatt'), array('label' => __('Optionen', 'wpsg'))); ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_showBasket', __('Nächste Staffelung im Warenkorb anpreisen', 'wpsg'), $this->get_option('wpsg_mod_discount_showBasket')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_showBasket', __('Nächste Staffelung im Warenkorb anpreisen', 'wpsg'), $this->get_option('wpsg_mod_discount_showBasket'), array('help' => 'wpsg_mod_discount_showBasket')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_voucher', __('Gutscheine bei aktivem Rabatt nicht zulassen', 'wpsg'), $this->get_option('wpsg_mod_discount_voucher'), array('help' => 'wpsg_mod_discount_voucher')); ?>
+
</div>
<div role="tabpanel" class="tab-pane" id="tab2">
diff --git a/views/mods/mod_gutschein/basket_row_end.phtml b/views/mods/mod_gutschein/basket_row_end.phtml
index 2d9b3ec..03e9d86 100644
--- a/views/mods/mod_gutschein/basket_row_end.phtml
+++ b/views/mods/mod_gutschein/basket_row_end.phtml
@@ -7,13 +7,22 @@
?>
<br />
<div class="basket_sum_row">
- <div class="codegs">
- <label class="codegsf" for="wpsg_gutschein_input"><?php echo __('Gutscheincode:', 'wpsg'); ?></label>
- </div>
- <div class="codegsl">
- <input id="wpsg_gutschein_input" class="wpsg_gutschein_input <?php echo ((in_array("gutschein", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg[gutschein]" value="" />
- </div>
- <div class="codegsr">
- <input class="wpsg_button wpsg_gutschein_add" type="submit" name="wpsg_gutschein_add" value="<?php echo '&nbsp;'.__('Einlösen', 'wpsg').'&nbsp;'; ?>" />
- </div>
+ <?php /* TODO: Kunden bereits über das Widget eingeloggt (Kundengruppenrabatt)? */ ?>
+ <?php if ($this->hasMod('wpsg_mod_discount') && ($this->get_option('wpsg_mod_discount_voucher') == 1)) { ?>
+
+ <?php echo __('Aufgrund einer Rabattaktion ist das Hinzufügen eines Gutscheines nicht möglich', 'wpsg'); ?>
+
+ <?php } else {?>
+
+ <div class="codegs">
+ <label class="codegsf" for="wpsg_gutschein_input"><?php echo __('Gutscheincode:', 'wpsg'); ?></label>
+ </div>
+ <div class="codegsl">
+ <input id="wpsg_gutschein_input" class="wpsg_gutschein_input <?php echo ((in_array("gutschein", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg[gutschein]" value="" />
+ </div>
+ <div class="codegsr">
+ <input class="wpsg_button wpsg_gutschein_add" type="submit" name="wpsg_gutschein_add" value="<?php echo '&nbsp;'.__('Einlösen', 'wpsg').'&nbsp;'; ?>" />
+ </div>
+
+ <?php }?>
</div> \ No newline at end of file