A page can have multiple markets — the overview now groups cart items
by market_place_id instead of page. Each card shows the market name
as heading with the page title below it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- POST /delete/<product_id>/ removes the cart item entirely
- POST /quantity/ now clamps at 0 instead of deleting
- cart_delete_url Jinja global registered for template
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds POST /quantity/<product_id>/ to set cart item quantity (or remove at 0),
and registers cart_quantity_url Jinja global so the shared template uses it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
resolve_page_config() now reads entry.calendar_container_id from the
CalendarEntryDTO instead of fetching the Calendar ORM model. Fixes
stale CalendarEntry type hints to CalendarEntryDTO. Updates shared
submodule.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- page_cart.py: use ce.calendar_container_id instead of ce.calendar.container_id
- _cart.html: use entry.calendar_name instead of entry.calendar.name
- Update shared submodule with DTO field additions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace direct Post, Calendar, CalendarEntry model queries and glue
lifecycle imports with typed service calls. Cart registers all 4
services via domain_services_fn with has() guards.
Key changes:
- app.py: use domain_services_fn, Post query → services.blog
- api.py: Calendar/CalendarEntry → services.calendar
- checkout: glue order_lifecycle → services.calendar.claim/confirm
- calendar_cart: CalendarEntry → services.calendar.pending_entries()
- page_cart: Post/Calendar queries → services.blog/calendar
- global_routes: glue imports → service calls
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace all imports from blog.models, market.models, events.models
and bare models.* with shared.models equivalents
- Convert cart/models/order.py and page_config.py to re-export stubs
- Update shared + glue submodule pointers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The orders/index.html template extends auth/index.html which needs
the oob dict for template inheritance. Without it, direct navigation
to /orders/ fails with "'oob' is undefined".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve page_slug and market_slug from the order's page_config so that
product links on the checkout return page include the correct prefix.
Also move the status read after check_sumup_status so the template
reflects the actual payment result.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 1-3 of decoupling:
- path_setup.py adds project root to sys.path
- Cart-owned models in cart/models/ (order, page_config)
- All imports updated: shared.infrastructure, shared.db, shared.browser, etc.
- PageConfig uses container_type/container_id instead of post_id FK
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add resolve_page_config() to determine PageConfig from cart/calendar context
- Set page_config_id on Order during checkout
- Pass page_config to SumUp create_checkout and build_sumup_reference
- check_sumup_status uses order.page_config for per-page credential resolution
- Fix: use session.flush() instead of g.s.flush() in check_sumup_status
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract cart, order, and orders blueprints with their service layer,
templates, Dockerfile (APP_MODULE=app:app, IMAGE=cart), entrypoint,
and Gitea CI workflow from the coop monolith.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>