diff --git a/bp/tickets/routes.py b/bp/tickets/routes.py index 2125126..408eb06 100644 --- a/bp/tickets/routes.py +++ b/bp/tickets/routes.py @@ -286,6 +286,13 @@ def register() -> Blueprint: ticket_type_id=tt.id, ) + # Compute cart count for OOB mini-cart update + from shared.services.registry import services + summary = await services.cart.cart_summary( + g.s, user_id=ident["user_id"], session_id=ident["session_id"], + ) + cart_count = summary.count + summary.calendar_count + summary.ticket_count + html = await render_template( "_types/tickets/_adjust_response.html", entry=entry, @@ -293,6 +300,7 @@ def register() -> Blueprint: ticket_sold_count=ticket_sold_count, user_ticket_count=user_ticket_count, user_ticket_counts_by_type=user_ticket_counts_by_type, + cart_count=cart_count, ) return await make_response(html, 200) diff --git a/templates/_types/tickets/_adjust_response.html b/templates/_types/tickets/_adjust_response.html index 5754575..fdbbe02 100644 --- a/templates/_types/tickets/_adjust_response.html +++ b/templates/_types/tickets/_adjust_response.html @@ -1,2 +1,4 @@ -{# Response for ticket adjust — re-render the buy form #} +{# Response for ticket adjust — buy form + OOB cart-mini update #} +{% from '_types/cart/_mini.html' import mini %} +{{ mini(oob='true') }} {% include '_types/tickets/_buy_form.html' %}