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:
@@ -18,7 +18,8 @@ async def get_cart(session):
|
||||
.where(*filters)
|
||||
.order_by(CartItem.created_at.desc())
|
||||
.options(
|
||||
selectinload(CartItem.product), # <-- important bit
|
||||
selectinload(CartItem.product),
|
||||
selectinload(CartItem.market_place),
|
||||
)
|
||||
)
|
||||
return result.scalars().all()
|
||||
|
||||
Reference in New Issue
Block a user