- 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>
The services singleton was used in before_request closures but the
import was removed when refactoring to domain_services_fn.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The glue layer's models (MenuNode, ContainerRelation), services
(navigation, relationships), and event handlers have been absorbed
into shared/. The glue submodule caused duplicate SQLAlchemy table
registration for 'menu_nodes'.
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>
List specific model imports, glue services, internal APIs, and
domain events that cart code actually references.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove stale /adopt endpoint reference, document submodules, all
services, glue integration, checkout flow, and domain events.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shared: migration to drop cross-domain FK constraints
glue: order lifecycle services, cart adoption, login/order handlers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previous runs left self-copies (e.g. cart/cart/) that caused
'Table already defined' errors. Split into two loops: first rm -rf
all sibling dirs, then copy only non-self siblings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each app has its own models/ at the root (imported as bare `models.X`).
The CI copy was also creating {app}/models/ (imported as `{app}.models.X`),
causing SQLAlchemy to see the same table defined twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cp approach failed when sibling repos were mid-update from
their own CI runs. git archive reads directly from git objects,
and git fetch ensures origin/decoupling is available even if the
sibling working tree is on a different branch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phases 1-3 split models by domain ownership, but cross-app imports
still exist (e.g. cart imports market.models.CartItem). In Docker
each app only has its own code. The CI step now copies sibling app
model packages into the build context before docker build.
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>
Posts used as containers aren't necessarily pages. Market and events
apps don't filter on is_page either.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>