summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Rehnelt <noreply@maennchen1.de>2026-10-01 19:38:58 +0200
committerRoger Rehnelt <noreply@maennchen1.de>2026-10-01 19:38:58 +0200
commit7f6ed6404949aadf2a422494ea22188754e4e09c (patch)
tree532f5fe3355d72a497692ee5e534eb2c39a36f32
parente48e3fc448c19d85e65c7267b230232addf156aa (diff)
Blöcke: Korrekturen aus der Prüfung
Die Liste zeigt bei Gutscheinen mit freiem Betrag und Mindestmenge „Zum Produkt“ und den Steuersatz wie die Produktseite; der Mini-Warenkorb rechnet Rabatte mit; „Cachen verhindern“ erkennt die neuen Blöcke und Shortcodes (K44). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--views/blocks/product-list.phtml11
-rw-r--r--views/js/index.js1
-rw-r--r--views/js/smartcheckout.js3
-rw-r--r--views/mods/mod_productview/productview.phtml11
-rw-r--r--views/produkt/addedit_general.phtml2
5 files changed, 6 insertions, 22 deletions
diff --git a/views/blocks/product-list.phtml b/views/blocks/product-list.phtml
index f2e83c6..1f7e0a1 100644
--- a/views/blocks/product-list.phtml
+++ b/views/blocks/product-list.phtml
@@ -40,16 +40,7 @@
<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
<div class="wpsg-product-list__baseprice"><?php echo $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', [$price, $oProduct->__get('fmenge'), $product_id]); ?></div>
<?php } ?>
- <div class="wpsg-product-list__taxnote wpsg_produkt_preishinweis">
- <?php $shipping = '<a href="'.esc_url($this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN)).'">'.esc_html__('Versandkosten', 'wpsg').'</a>'; ?>
- <?php if ($this->get_option('wpsg_kleinunternehmer')) { ?>
- <?php echo wpsg_translate(esc_html__('Endpreis zzgl. #1#', 'wpsg'), $shipping); ?>
- <?php } else if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
- <?php echo wpsg_translate(esc_html__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), esc_html(wpsg_ff($oProduct->getFrontendTaxValue())), $shipping); ?>
- <?php } else { ?>
- <?php echo wpsg_translate(esc_html__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), esc_html(wpsg_ff($oProduct->getFrontendTaxValue())), $shipping); ?>
- <?php } ?>
- </div>
+ <div class="wpsg-product-list__taxnote wpsg_produkt_preishinweis"><?php echo \wpsg\Blocks::priceNote($oProduct); ?></div>
<?php } else { ?>
<div class="wpsg-product-list__price"><?php echo esc_html__('Preise nur für eingeloggte Benutzer', 'wpsg'); ?></div>
<?php } ?>
diff --git a/views/js/index.js b/views/js/index.js
deleted file mode 100644
index 7124bd0..0000000
--- a/views/js/index.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){var t={};function r(l){if(t[l])return t[l].exports;var n=t[l]={i:l,l:!1,exports:{}};return e[l].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(l,n,function(t){return e[t]}.bind(null,n));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,r){"use strict";r.r(t);var l=r(0),n=r(1);(0,wp.blocks.registerBlockType)("wpsg/product",{title:"Produkt(e)",attributes:{product:{type:"string",default:"0"},template:{type:"string",default:"standard.phtml"},hide_title:{type:"string",default:"0"}},icon:Object(l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",x:"0",y:"0",version:"1.1",viewBox:"0 0 200 200",xmlSpace:"preserve"},Object(l.createElement)("path",{fill:"#C4D00C",d:"M105.023 9.465c-50.1 0-90.71 40.613-90.71 90.706 0 50.096 40.61 90.708 90.71 90.708 50.101 0 90.703-40.612 90.703-90.708.001-50.093-40.602-90.706-90.703-90.706zm-.07 157.155c-36.734 0-66.518-29.778-66.518-66.512s29.783-66.521 66.518-66.521c36.733 0 66.516 29.786 66.516 66.521 0 36.734-29.782 66.512-66.516 66.512z"}),Object(l.createElement)("path",{fill:"#153C67",d:"M102.003 142.499c0 8.349-6.771 15.122-15.122 15.122-8.349 0-15.117-6.773-15.117-15.122 0-8.346 6.769-15.114 15.117-15.114 8.35 0 15.122 6.768 15.122 15.114zM138.28 142.499c0 8.349-6.767 15.122-15.115 15.122-8.352 0-15.12-6.773-15.12-15.122 0-8.346 6.769-15.114 15.12-15.114 8.349 0 15.115 6.768 15.115 15.114zM141.306 57.846H98.975c-8.349 0-15.115 6.767-15.115 15.114 0 8.354 6.767 15.122 15.115 15.122h21.352l-2.011 6.046h-32.52l-3.953-5.864-.005-.012c-.006-.001-.009-.008-.011-.014l-8.436-12.499c-.005-.004-.005-.013-.014-.017 0-.007-.004-.01-.01-.019l-8.431-12.5c-.006-.007-.01-.011-.013-.018-.004 0-.004-.006-.012-.01l-8.432-12.498c0-.008-.009-.01-.011-.018-.003-.006-.007-.012-.01-.012L48.02 38.144c-.005-.01-.005-.015-.011-.023a15.112 15.112 0 00-12.533-6.659H20.361c-8.35 0-15.118 6.768-15.118 15.116 0 8.351 6.769 15.118 15.118 15.118h7.085l3.961 5.874 8.455 12.532 8.456 12.528v.009l8.452 12.52v.006h.002l8.46 12.532.027-.021c2.718 4.03 7.324 6.683 12.551 6.683h51.399c6.807 0 12.558-4.495 14.451-10.686l11.821-35.466c.608-1.635.938-3.403.938-5.25.001-8.345-6.766-15.111-15.113-15.111z"})),category:"layout",edit:function(e){var t=e.attributes,r=e.setAttributes,o=e.className,c=t.product,u=t.template,i=t.hide_title;return Object(l.createElement)("div",{className:o},Object(l.createElement)(n.SelectControl,{value:c,label:wpsg_block_product.label.product,onChange:function(e){r({product:e})},options:wpsg_block_product.arProductSelect}),Object(l.createElement)(n.SelectControl,{value:u,label:wpsg_block_product.label.template,onChange:function(e){r({template:e})},options:wpsg_block_product.arTemplateSelect}),Object(l.createElement)(n.SelectControl,{value:i,label:wpsg_block_product.label.hide_title,onChange:function(e){r({hide_title:e})},options:wpsg_block_product.arHideTitleSelect}))},save:function(e){return null}})}]); \ No newline at end of file
diff --git a/views/js/smartcheckout.js b/views/js/smartcheckout.js
index 69099dd..20674f8 100644
--- a/views/js/smartcheckout.js
+++ b/views/js/smartcheckout.js
@@ -338,6 +338,9 @@
self.voucherError = (result.voucherError === true);
+ // Mini-Warenkorb (Block) aktualisieren
+ document.dispatchEvent(new Event('wpsg_basket_changed'));
+
if (result.ok === true && action === 'voucherAdd') self.voucher = '';
if (result.state) {
diff --git a/views/mods/mod_productview/productview.phtml b/views/mods/mod_productview/productview.phtml
index ae66c39..c3fbc57 100644
--- a/views/mods/mod_productview/productview.phtml
+++ b/views/mods/mod_productview/productview.phtml
@@ -97,16 +97,7 @@
<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
<div class="wpsg-pv__baseprice"><?php echo $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', [$price, $oProduct->fmenge, $product_id]); ?></div>
<?php } ?>
- <p class="wpsg-pv__taxnote wpsg_produkt_preishinweis">
- <?php $shipping = '<a href="'.esc_url($this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN)).'">'.esc_html__('Versandkosten', 'wpsg').'</a>'; ?>
- <?php if ($this->get_option('wpsg_kleinunternehmer')) { ?>
- <?php echo wpsg_translate(esc_html__('Endpreis zzgl. #1#', 'wpsg'), $shipping); ?>
- <?php } else if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
- <?php echo wpsg_translate(esc_html__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), esc_html(wpsg_ff($oProduct->getFrontendTaxValue())), $shipping); ?>
- <?php } else { ?>
- <?php echo wpsg_translate(esc_html__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), esc_html(wpsg_ff($oProduct->getFrontendTaxValue())), $shipping); ?>
- <?php } ?>
- </p>
+ <p class="wpsg-pv__taxnote wpsg_produkt_preishinweis"><?php echo \wpsg\Blocks::priceNote($oProduct); ?></p>
<?php } else { ?>
<p class="wpsg-pv__price"><?php echo esc_html__('Preise werden nur für angemeldete Benutzer angezeigt.', 'wpsg'); ?></p>
<?php } ?>
diff --git a/views/produkt/addedit_general.phtml b/views/produkt/addedit_general.phtml
index cb32068..b114eb0 100644
--- a/views/produkt/addedit_general.phtml
+++ b/views/produkt/addedit_general.phtml
@@ -64,7 +64,7 @@
'1' => __('Mehrfach mit beliebiger Menge', 'wpsg'),
'2' => __('Mehrfach mit Menge 1', 'wpsg')
), wpsg_getStr($this->view['data']['basket_multiple']), array('help' => 'basket_multiple')); ?>
- <?php echo wpsg_drawForm_Checkbox('detail_only', __('Kauf nur über die Detailseite', 'wpsg'), intval($this->view['data']['detail_only']??0) === 1, ['help' => 'detail_only']); ?>
+ <?php if (\wpsg\Blocks::hasDetailOnlyColumn()) echo wpsg_drawForm_Checkbox('detail_only', __('Kauf nur über die Detailseite', 'wpsg'), intval($this->view['data']['detail_only']??0) === 1, ['help' => 'detail_only']); ?>
<?php } ?>
<br />