Fix cart quantities not showing on product list after page refresh
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s

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 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-15 21:40:48 +00:00
parent 28938e38b5
commit 63778d9f20

1
app.py
View File

@@ -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