Add shopping cart and related models

This commit is contained in:
2025-11-11 12:08:06 +01:00
parent b3166811e5
commit f4618f4d05
8 changed files with 148 additions and 41 deletions

View File

@@ -40,6 +40,21 @@
</a>
</li>
</ul>
<!-- Shopping Cart at Bottom -->
<div class="mt-auto pt-3 border-top">
<a href="/cart" class="btn btn-primary w-100 position-relative">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-cart3 me-2" viewBox="0 0 16 16">
<path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .49.598l-1 5a.5.5 0 0 1-.465.401l-9.397.472L4.415 11H13a.5.5 0 0 1 0 1H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5M3.102 4l.84 4.479 9.144-.459L13.89 4zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4m7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2m7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2"/>
</svg>
Warenkorb
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
{{ request.state.user.shopping_cart.items|length }}
<span class="visually-hidden">Artikel im Warenkorb</span>
</span>
</a>
</div>
</div>
</div>