From 63778d9f2036f13d2b1ddc8096afbf10bb085f1c Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 15 Feb 2026 21:40:48 +0000 Subject: [PATCH] Fix cart quantities not showing on product list after page refresh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The context processor loaded cart items but only passed aggregates (cart_count, cart_total) — not the cart list itself. Templates need the full list to display per-product quantities. Co-Authored-By: Claude Opus 4.6 --- app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app.py b/app.py index a0bfba2..342e888 100644 --- a/app.py +++ b/app.py @@ -46,6 +46,7 @@ async def market_context() -> dict: cart_items = cart_result.scalars().all() from bp.cart.services import total + ctx["cart"] = list(cart_items) ctx["cart_count"] = sum(ci.quantity for ci in cart_items) ctx["cart_total"] = total(cart_items) or 0