From 01b391fc3fc32fd17a8999257e7ce6302eaed843 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Fri, 25 Oct 2019 08:22:44 +0000 Subject: - Feature: Gutscheinprodukte - Preis für den Gutschein kann vom Kunden frei definiert werden - Feature: Gutscheinprodukte - Optionale Mindest- und Maximalschranken für den Flexiblen Preis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7589 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_voucherproduct/product_bottom.phtml | 33 ++++++++++++++++++++++ .../mod_voucherproduct/produkt_edit_sidebar.phtml | 19 +++++++++++++ views/produkttemplates/standard.phtml | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 views/mods/mod_voucherproduct/product_bottom.phtml diff --git a/views/mods/mod_voucherproduct/product_bottom.phtml b/views/mods/mod_voucherproduct/product_bottom.phtml new file mode 100644 index 0000000..2acbec6 --- /dev/null +++ b/views/mods/mod_voucherproduct/product_bottom.phtml @@ -0,0 +1,33 @@ +view['oProduct']; + + $min = wpsg_tf($oProduct->__get('wpsg_mod_voucherproduct_flexprice_min')); + $max = wpsg_tf($oProduct->__get('wpsg_mod_voucherproduct_flexprice_max')); + + if ($min > 0 && $max > 0) $strInterval = __('#1# bis #2# #3#', 'wpsg'); + else if ($min > 0) $strInterval = __('Mindestens #1# #3#', 'wpsg'); + else if ($max > 0) $strInterval = __('Maximal #2# #3#', 'wpsg'); + else throw new \Exception(__('Systemfehler')); + + $strInterval = wpsg_translate($strInterval, wpsg_ff($min), wpsg_ff($max), $this->get_option('wpsg_currency')); + +?> + +
+ +
+ +

diff --git a/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml index 6181b11..65ad306 100644 --- a/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml +++ b/views/mods/mod_voucherproduct/produkt_edit_sidebar.phtml @@ -22,6 +22,25 @@ view['data']['wpsg_mod_voucherproduct_gslaenge'] > 0)?$this->view['data']['wpsg_mod_voucherproduct_gslaenge']:10)); ?> view['data']['wpsg_mod_voucherproduct_available']); ?> view['data']['wpsg_mod_voucherproduct_coupon']); ?> + view['data']['wpsg_mod_voucherproduct_flexprice']); ?> + + + + diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml index 190ac53..af69356 100644 --- a/views/produkttemplates/standard.phtml +++ b/views/produkttemplates/standard.phtml @@ -283,7 +283,7 @@ callMods('product_bottom', array(&$this->view['data']['product_key'], $this->getTemplateIndex())); ?> -
+
view['oProduct']->canOrder()) { ?>
-- cgit v1.2.3