blob: 004b73bbd41db9b30c35e3673041f824b4d32156 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
/**
* Block „Mini-Warenkorb“: Link zum Warenkorb mit Anzahl und Summe
*
* Die Seite enthält den leeren Zustand; den Inhalt von .wpsg-mini-cart__content tauscht der Browser gegen den des
* Besuchers aus (blocks/mini-cart.js). Die Klasse muss deshalb in eigenen Fassungen erhalten bleiben.
* @version 4.6.1
*/
if (!defined('ABSPATH')) exit;
$arBlock = $this->view['wpsg_block'];
?>
<a class="wpsg-mini-cart__link" href="<?php echo esc_url($arBlock['url']); ?>">
<?php if ($arBlock['label'] !== '') { ?>
<span class="wpsg-mini-cart__label"><?php echo esc_html($arBlock['label']); ?></span>
<?php } ?>
<span class="wpsg-mini-cart__content">
<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 } ?>
</span>
</a>
|