Implement multilingual support for shop interface and add total calculation to cart drawer: - Add FR/EN translations for all shop-related texts (cart, checkout, stock status) - Update templates and JavaScript to use translation system - Add cart total calculation with formatted currency display - Refactor cart drawer styles to SASS with improved button styling (black borders on +/-) - Fix English product content (replace JSON with proper HTML) - Extract cart drawer to separate snippet for better organization Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
32 lines
No EOL
1.3 KiB
PHP
32 lines
No EOL
1.3 KiB
PHP
<div id="cart-drawer" class="cart-drawer" data-text-remove="<?= t('remove') ?>">
|
|
<div class="cart-drawer__overlay" data-cart-close></div>
|
|
<div class="cart-drawer__panel">
|
|
<div class="cart-drawer__header">
|
|
<h3><?= t('cart') ?></h3>
|
|
<button class="cart-drawer__close" data-cart-close aria-label="<?= t('closeCart') ?>">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="cart-drawer__content">
|
|
<div class="cart-drawer__empty" data-cart-empty>
|
|
<p><?= t('cartEmpty') ?></p>
|
|
</div>
|
|
|
|
<div class="cart-drawer__items" data-cart-items></div>
|
|
</div>
|
|
|
|
<div class="cart-drawer__footer">
|
|
<div class="cart-drawer__total">
|
|
<span class="cart-drawer__total-label"><?= t('total') ?></span>
|
|
<span class="cart-drawer__total-amount" data-cart-total>0,00 €</span>
|
|
</div>
|
|
<button class="cart-drawer__checkout-btn" data-cart-checkout>
|
|
<?= t('checkout') ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|