diff --git a/bp/product/routes.py b/bp/product/routes.py index 4ea209a..ce17917 100644 --- a/bp/product/routes.py +++ b/bp/product/routes.py @@ -254,6 +254,10 @@ def register(): # htmx response: OOB-swap mini cart + product buttons if request.headers.get("HX-Request") == "true": + # Commit so the cart app sees the updated data when we fetch the fragment + await g.tx.commit() + g.tx = await g.s.begin() + from shared.infrastructure.fragments import fetch_fragment from shared.infrastructure.cart_identity import current_cart_identity as _ci frag_ident = _ci()