From 651e58ac6d54fafeb616431ed9c1f3fcac9b7ce7 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Sun, 23 Nov 2025 09:23:44 +0100 Subject: [PATCH] fix: refactor cart page to extend base template and fix styling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: - Cart page was standalone HTML without proper styling - Referenced non-existent CSS files (/static/css/shared/base.css, /static/css/vendor/vendor.css) - Missing header, footer, and navigation - Not integrated with shop layout system Changes: - Extend shop/base.html for consistent styling and layout - Remove hardcoded CSS references (now inherited from base) - Add proper breadcrumbs with landing page navigation - Integrate with shopLayoutData() for cart and toast functionality - Use Tailwind classes consistent with other shop pages - Add @error handler for broken product images - Update all URLs to use {{ base_url }} for multi-tenant support - Modernize layout with responsive grid system The cart page now has proper styling, navigation, and integrates seamlessly with the rest of the shop frontend. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/templates/shop/cart.html | 719 +++++++++++++---------------------- 1 file changed, 269 insertions(+), 450 deletions(-) diff --git a/app/templates/shop/cart.html b/app/templates/shop/cart.html index 58d0fd76..1c261914 100644 --- a/app/templates/shop/cart.html +++ b/app/templates/shop/cart.html @@ -1,489 +1,308 @@ - - - - - - Shopping Cart - {{ vendor.name }} - - - - - -
- -
-
-

🛒 Shopping Cart

-
- -
+{# app/templates/shop/cart.html #} +{% extends "shop/base.html" %} -
- -
-
-

Loading your cart...

-
+{% block title %}Shopping Cart{% endblock %} - -
-
🛒
-

Your cart is empty

-

Add some products to get started!

- Browse Products -
+{# Alpine.js component #} +{% block alpine_data %}shoppingCart(){% endblock %} - -
- -
- +
+ + {# Cart Summary #} +
+
+

+ Order Summary +

+ +
+
+ Subtotal ( items): + +
+ +
+ Shipping: + +
+ +
+ Total: + +
+
+ + + + + Continue Shopping + + +

+ Free shipping on orders over €50 +

+
+{% endblock %} +{% block extra_scripts %} - - - - \ No newline at end of file +{% endblock %}