summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Rehnelt <noreply@maennchen1.de>2026-10-01 20:04:59 +0200
committerRoger Rehnelt <noreply@maennchen1.de>2026-10-01 20:04:59 +0200
commit5b9eb8d486b5c25205413cfc0f817462f07f9b37 (patch)
treeaef65ed885bce006eab9f3b70697cab78b402e21
parent54c1cd1867963549c3d1fd52de0780452e00407a (diff)
Mini-Warenkorb: leerer Zustand ohne Zahl
Die Anzeige springt beim Nachladen nicht mehr von „0 Artikel“ auf die Zahl des Besuchers; die Summe läuft über wpsg_price_html. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--views/blocks/mini-cart.phtml7
1 files changed, 5 insertions, 2 deletions
diff --git a/views/blocks/mini-cart.phtml b/views/blocks/mini-cart.phtml
index 004b73b..b75bd5c 100644
--- a/views/blocks/mini-cart.phtml
+++ b/views/blocks/mini-cart.phtml
@@ -18,13 +18,16 @@
<span class="wpsg-mini-cart__label"><?php echo esc_html($arBlock['label']); ?></span>
<?php } ?>
<span class="wpsg-mini-cart__content">
+ <?php /* Leer ohne Zahl: Die Seite springt sonst beim Nachladen von „0 Artikel“ auf die richtige Zahl */ ?>
+ <?php if ($arBlock['count'] > 0) { ?>
<span class="wpsg-mini-cart__count"><?php echo esc_html(sprintf(
/* translators: %s: Anzahl der Artikel im Warenkorb */
_n('%s Artikel', '%s Artikel', intval($arBlock['count']), 'wpsg'),
number_format_i18n(intval($arBlock['count']))
)); ?></span>
- <?php if ($arBlock['showSum'] && $arBlock['count'] > 0) { ?>
- <span class="wpsg-mini-cart__sum"><?php echo esc_html(wpsg_ff($arBlock['sum'], $this->get_option('wpsg_currency'))); ?></span>
+ <?php if ($arBlock['showSum']) { ?>
+ <span class="wpsg-mini-cart__sum"><?php echo wpsg_price_html($arBlock['sum'], 'mini_cart'); ?></span>
+ <?php } ?>
<?php } ?>
</span>
</a>