summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2021-03-05 06:32:24 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2021-03-05 06:32:24 +0000
commit7225e6695a39aac697bbbfe889a5a3bd912f1b5f (patch)
tree15bece001c53208b86f99bc9d5ee1d04dfc3e289 /views/mods
parent91287a599a3d34f3ddae17dac05c0ecf6a5f4d71 (diff)
- Feature: Gutscheine/Coupons werden optional nur noch auf ausgewählte Produkte/Produktgruppen angerechnet
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7865 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods')
-rw-r--r--views/mods/mod_gutschein/add.phtml2
-rw-r--r--views/mods/mod_gutschein/basket_row_end_coupon.phtml15
2 files changed, 13 insertions, 4 deletions
diff --git a/views/mods/mod_gutschein/add.phtml b/views/mods/mod_gutschein/add.phtml
index cc0752a..af992f7 100644
--- a/views/mods/mod_gutschein/add.phtml
+++ b/views/mods/mod_gutschein/add.phtml
@@ -64,7 +64,7 @@
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_multi', __('Mehrfach verwendbar', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['multi'], '0')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_gutschein_comment', __('Kommentar', 'wpsg'), @$this->view['mod_gutschein']['comment']); ?>
<?php if ($this->hasMod('wpsg_mod_productgroups') && wpsg_isSizedArray($this->view['wpsg_mod_gutschein']['arProductGroups'])) { ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_productgroups', __('Beschränkung auf Produktgruppen', 'wpsg'), $this->view['wpsg_mod_gutschein']['arProductGroups'], $this->view['mod_gutschein']['productgroups'], array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProductGroups']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProductGroups'])), 'help' => 'wpsg_mod_gutschein_productgroups')); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_productgroups', __('Beschränkung auf Produktgruppen', 'wpsg'), $this->view['wpsg_mod_gutschein']['arProductGroups'], wpsg_getArray($this->view['mod_gutschein']['productgroups']), array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProductGroups']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProductGroups'])), 'help' => 'wpsg_mod_gutschein_productgroups')); ?>
<?php } ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_products', __('Beschränkung auf Produkte', 'wpsg'), @$this->view['wpsg_mod_gutschein']['arProducts'], @$this->view['mod_gutschein']['products'], array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProducts']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProducts'])), 'help' => 'wpsg_mod_gutschein_products')); ?>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/mods/mod_gutschein/basket_row_end_coupon.phtml b/views/mods/mod_gutschein/basket_row_end_coupon.phtml
index f418f3c..53d8483 100644
--- a/views/mods/mod_gutschein/basket_row_end_coupon.phtml
+++ b/views/mods/mod_gutschein/basket_row_end_coupon.phtml
@@ -15,10 +15,19 @@
<?php foreach ($arCalculation['coupon'] as $gs) { ?>
- <div class="basket_sum_row">
+ <div class="basket_sum_row basket_sum_coupon">
<div class="title">
<a class="wpsg_basket_removelink" href="<?php echo str_replace('&', '&amp;', $this->getRemoveLinkURL('voucher_'.$gs['id'])); ?>" title="<?php echo __('Wertgutschein aus dem Warenkorb entfernen', 'wpsg'); ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass sie den Wertgutschein aus dem Warenkorb entfernen möchten?', 'wpsg'); ?>');"><img src="<?php echo WPSG_URL; ?>views/gfx/bin_x.png" alt="<?php echo __('Löschen', 'wpsg'); ?>" /></a>
- <?php echo __('Wertgutschein', 'wpsg'); ?> <?php echo ((wpsg_isSizedString($gs['code']))?'('.$gs['code'].')':''); ?>
+ <?php echo __('Wertgutschein', 'wpsg'); ?> <?php
+
+ $arInfo = [];
+
+ if (wpsg_isSizedString($gs['code'])) $arInfo[] = $gs['code'];
+ if (wpsg_isTrue($gs['partial'])) $arInfo[] = __('teilweise angerechnet', 'wpsg');
+
+ if (wpsg_isSizedArray($arInfo)) echo '('.implode(' / ', $arInfo).')';
+
+ ?>
</div>
<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
<div class="colgsr"><?php echo __('anteilig', 'wpsg'); ?></div>
@@ -28,7 +37,7 @@
echo wpsg_ff($gs[$display_brutto_netto], $this->get_option('wpsg_currency'));
if (strpos($gs['set'], '%') !== false) {
-
+
echo '<span class="procent_payship">('.wpsg_ff(wpsg_tf($gs['set']), '%').')</span>';
}