Add i18n support and cart total to Shopify integration

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>
This commit is contained in:
isUnknown 2026-01-14 12:02:55 +01:00
parent 28501fec7c
commit b3940bba08
12 changed files with 586 additions and 451 deletions

View file

@ -1,32 +1,4 @@
<!-- Cart Drawer -->
<div id="cart-drawer" class="cart-drawer">
<div class="cart-drawer__overlay" data-cart-close></div>
<div class="cart-drawer__panel">
<div class="cart-drawer__header">
<h3>Panier</h3>
<button class="cart-drawer__close" data-cart-close aria-label="Fermer le panier">
<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>Votre panier est vide</p>
</div>
<div class="cart-drawer__items" data-cart-items></div>
</div>
<div class="cart-drawer__footer">
<button class="cart-drawer__checkout-btn" data-cart-checkout>
Passer commande
</button>
</div>
</div>
</div>
<?php snippet('cart-drawer') ?>
<footer id="site-footer">
<div class="site-footer__container">