feat: per-page carts with overview, page-scoped checkout, and split blueprints (Phase 4)
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 21s
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 21s
Splits the monolithic cart blueprint into three: cart_overview (GET /), page_cart (/<page_slug>/), and cart_global (webhook, return, add). - New page_cart.py service: get_cart_for_page(), get_calendar_entries_for_page(), get_cart_grouped_by_page() - clear_cart_for_order() and create_order_from_cart() accept page_post_id for scoping - Cart app hydrates page_slug via url_value_preprocessor/url_defaults/hydrate_page - Context processor provides page-scoped cart data when g.page_post exists - Internal API /internal/cart/summary accepts ?page_slug= for page-scoped counts - Overview template shows page cards with item counts and totals - Page cart template reuses show_cart() macro with page-specific header Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,12 +72,12 @@ def register() -> Blueprint:
|
||||
return redirect(order.sumup_hosted_url)
|
||||
|
||||
# Otherwise, create a fresh checkout for this order
|
||||
redirect_url = url_for("cart.checkout_return", order_id=order.id, _external=True)
|
||||
redirect_url = url_for("cart_global.checkout_return", order_id=order.id, _external=True)
|
||||
|
||||
sumup_cfg = config().get("sumup", {}) or {}
|
||||
webhook_secret = sumup_cfg.get("webhook_secret")
|
||||
|
||||
webhook_url = url_for("cart.checkout_webhook", order_id=order.id, _external=True)
|
||||
webhook_url = url_for("cart_global.checkout_webhook", order_id=order.id, _external=True)
|
||||
if webhook_secret:
|
||||
from urllib.parse import urlencode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user