diff options
| author | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-02 15:22:24 +0200 |
|---|---|---|
| committer | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-02 15:22:24 +0200 |
| commit | c5a34edb267ad7895fdffc18b155ebf10c7cb00a (patch) | |
| tree | e51c72988cd06bd08d43c97b00e39d360c90965e /views | |
| parent | 26c6bae86323dd3dddfacc29a20004e5ee6d69b8 (diff) | |
Mini-Warenkorb: Zahl als eigenes Element
Themes können daraus eine Kurzform wie „(1)“ bilden (Punkt 8.16).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views')
| -rw-r--r-- | views/blocks/mini-cart.phtml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/views/blocks/mini-cart.phtml b/views/blocks/mini-cart.phtml index b75bd5c..3f94518 100644 --- a/views/blocks/mini-cart.phtml +++ b/views/blocks/mini-cart.phtml @@ -20,10 +20,10 @@ <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( + <?php /* Die Zahl als eigenes Element: Themes können daraus eine Kurzform wie „(1)“ bilden */ ?> + <span class="wpsg-mini-cart__count"><?php echo str_replace('%s', '<span class="wpsg-mini-cart__number">'.esc_html(number_format_i18n(intval($arBlock['count']))).'</span>', esc_html( /* translators: %s: Anzahl der Artikel im Warenkorb */ - _n('%s Artikel', '%s Artikel', intval($arBlock['count']), 'wpsg'), - number_format_i18n(intval($arBlock['count'])) + _n('%s Artikel', '%s Artikel', intval($arBlock['count']), 'wpsg') )); ?></span> <?php if ($arBlock['showSum']) { ?> <span class="wpsg-mini-cart__sum"><?php echo wpsg_price_html($arBlock['sum'], 'mini_cart'); ?></span> |
