From 474ee7351d2527be3f848fa99ff16758c404e061 Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 22 May 2019 11:03:08 +0000 Subject: - Sanitize-Funktion im Rabattmodul - optionaler rabattierte Preisanzeige in der Produktübersicht - Bugfix: Rabattdarstellung - Originalpreis als "alter Preis" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7435 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/css/frontend.css | 4 ++++ views/mods/mod_discount/settings_edit.phtml | 4 ++++ views/mods/mod_productindex/layouts/grid.phtml | 18 +++++++++++++++--- views/mods/mod_productindex/layouts/list.phtml | 26 +++++++++++++++++++++----- 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/views/css/frontend.css b/views/css/frontend.css index 66b5d7f..7922bb2 100644 --- a/views/css/frontend.css +++ b/views/css/frontend.css @@ -443,6 +443,10 @@ input.wpsg_error { border-color:red !important; } .wpsg_mod_productview-order-layer a.selected, .wpsg_mod_productview-order-layer a:hover { text-decoration:none; color:#FFFFFF; background-color:#29556E; } +/* Produktübersicht */ +.wpsg_mod_productview_oldprice { font-size:0.9em; color:#ff0000; text-decoration:line-through; } +.wpsg_mod_productview_newprice { font-size:1em; font-weight:bold; } + /* Dialog für Meldungen wenn nicht auf einer Shop Seite / Warenkorbmeldung BEGIN */ #wpsg_ajax_layer { position:fixed; z-index:1000; left:0px; top:0px; width:100%; height:100%; background-color:rgba(0, 0, 0, 0.75); display:flex; justify-content:center; align-items:center; } #wpsg_ajax_layer .wpsg_ajax_message_content { background-color:#FFFFFF; padding:1.5rem; text-align:center; } diff --git a/views/mods/mod_discount/settings_edit.phtml b/views/mods/mod_discount/settings_edit.phtml index dbb67e5..33e6d02 100644 --- a/views/mods/mod_discount/settings_edit.phtml +++ b/views/mods/mod_discount/settings_edit.phtml @@ -88,6 +88,10 @@ get_option('wpsg_mod_discount_showBasket'), array('help' => 'wpsg_mod_discount_showBasket')); ?> get_option('wpsg_mod_discount_voucher'), array('help' => 'wpsg_mod_discount_voucher')); ?> + hasMod('wpsg_mod_productindex') == '1') { ?> + get_option('wpsg_mod_discount_productindex')); ?> + + diff --git a/views/mods/mod_productindex/layouts/grid.phtml b/views/mods/mod_productindex/layouts/grid.phtml index 30b675d..0b8c8d1 100644 --- a/views/mods/mod_productindex/layouts/grid.phtml +++ b/views/mods/mod_productindex/layouts/grid.phtml @@ -81,7 +81,7 @@ view['arProducts'])) { ?> - view['arProducts'] as $p) { $i ++; ?> + view['arProducts'] as $p); $oProduct = wpsg_product::getInstance($p['product_key']); { $i ++; ?>
@@ -135,6 +135,18 @@ callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?> + hasMod('wpsg_mod_discount') && $this->get_option('wpsg_mod_discount_productindex') == '1') { ?> + + getOldPrice(); ?> + + getPrice($this->view['data']['product_key'])) { ?> + getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?>
+ get_option('wpsg_currency')); ?> + + getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?> + + +
get_option('wpsg_currency')); ?> @@ -142,6 +154,7 @@ get_option('wpsg_currency'))); ?>
+ get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'', 'Endpreis'); ?> @@ -168,8 +181,7 @@ -
- +
diff --git a/views/mods/mod_productindex/layouts/list.phtml b/views/mods/mod_productindex/layouts/list.phtml index 5351afa..1853edb 100644 --- a/views/mods/mod_productindex/layouts/list.phtml +++ b/views/mods/mod_productindex/layouts/list.phtml @@ -78,7 +78,7 @@ view['arProducts'])) { ?> - view['arProducts'] as $p) { $i ++; ?> + view['arProducts'] as $p); $oProduct = wpsg_product::getInstance($p['product_key']); { $i ++; ?>
@@ -130,10 +130,26 @@ callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>
- - get_option('wpsg_currency')); ?> - - get_option('wpsg_currency'))); ?> + + + hasMod('wpsg_mod_discount') && $this->get_option('wpsg_mod_discount_productindex') == '1') { ?> + + getOldPrice(); ?> + + getPrice($this->view['data']['product_key'])) { ?> + getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?>
+ get_option('wpsg_currency')); ?> + + getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?> + + + + + + get_option('wpsg_currency')); ?> + + get_option('wpsg_currency'))); ?> +
get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?> -- cgit v1.2.3