WEB-03 — Reseller web — cart & checkout
Cart shared with the mobile app, checkout with address/payment/note and confirmation.
| Field | Details |
|---|---|
| Task code | WEB-03 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Tue 1 Dec 2026 |
| Due | Tue 1 Dec 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 0.5 person-day(s) planned · 3 from scratch · size XS |
| Area · app | Reseller web · web |
| Depends on | WEB-02 |
| Unblocks | WEB-04 |
| Milestones | — |
Summary
Cart shared with the mobile app, checkout with address/payment/note and confirmation.
Description
Resellers on the web order with the same server-side cart as the mobile app (ORD-01…ORD-03, FIN-02, FIN-05, RWA-02). This task delivers the cart (RW-06) — lines with the reseller's customer-type price and applied promotions, line issues returned by the server (PRODUCT_UNAVAILABLE, STOCK_INSUFFICIENT without quantities, QUANTITY_NOT_ALLOWED, PROMOTION_CAP_REACHED), progress to the minimum amount, HT/VAT/TTC totals and delivery-fee estimate — and checkout with confirmation (RW-07): address choice or creation, enabled payment methods, available credit for the credit method, note, summary and an idempotent submit. The confirmation tells the reseller that HOCO will confirm the order (status Envoyée), since no order is confirmed automatically (ORD-14). Out of scope: order tracking (WEB-04).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | Cart page with line editing (quantity rules, remove), promotions shown per line, server issues per line with fix actions | Anis |
| 2 | Minimum-amount progress bar from orders.minAmount and totals block (HT, TVA, TTC, delivery fee estimate) | Anis |
| 3 | Cart badge kept in sync across tabs and with the mobile app (refetch on focus) | Anis |
| 4 | Checkout step « Adresse »: select default/other address or add one (addresses.create) | Anis |
| 5 | Checkout step « Paiement »: methods from cart.checkoutOptions, available credit display for CREDIT, CREDIT_LIMIT_EXCEEDED message | Anis |
| 6 | Submit with an Idempotency-Key per attempt, double-submit guard, 409 CART_CHANGED handling showing what changed | Anis |
| 7 | Confirmation page: CMD number, status Envoyée, « En attente de confirmation par HOCO », links to order detail | Anis |
| 8 | Design QA of RW-06 and RW-07 | Akram |
Deliverables
- apps/web/src/app/[locale]/(account)/{cart/page.tsx,checkout/page.tsx,checkout/confirmation/[orderId]/page.tsx}
- apps/web/src/features/cart/ (line item, totals, issues, checkout steps)
Acceptance criteria
- Items added in the mobile app appear in the web cart for the same reseller (ORD-01, RWA-02)
- Below the minimum amount the checkout button is disabled with the missing amount shown (ORD-02)
- A double click on « Valider la commande » creates a single order (idempotency)
- A price change during checkout shows the CART_CHANGED review instead of creating an order (PRC-05)
- After submission the order shows status Envoyée and appears in the back-office confirmation queue (ORD-03, ORD-14)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| ORD-01 | Server-side cart shared across the reseller's devices (mobile and web) | V1 |
| ORD-02 | Cart rules: minimum amount, minimum quantities and steps, maximum per order, stock and credit checks | V1 |
| ORD-03 | Checkout: address, note, payment method; a unique order number; immediately visible in the back-office | V1 |
| FIN-02 | Payment methods: cash on delivery, bank transfer, CCP, BaridiMob, credit | V1 |
| FIN-05 | Basic credit control: ceiling, used and available credit checked at checkout | V1 |
Screens
API surface
| Endpoint group | Operations |
|---|---|
| Cart & checkout | 8 |
| Reseller profile, addresses & documents | 9 |
Test measures
- Playwright e2e: add from catalog → cart issues → checkout with each payment method
- Playwright test simulating CART_CHANGED by changing a price between steps
KPI
- Delivered by Tue 1 Dec 2026 within 0.5 person-day(s).
- Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
- Zero open critical defects, permission gaps or data-integrity regressions at sign-off.
Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.
WEB-02 — Reseller web — home, catalog, product, favorites
Home with banners, catalog with advanced sidebar filters (facets with counts), search, product detail, favorites — guest browsing without prices.
WEB-04 — Reseller web — orders & finance
Orders list and detail with live tracking (SSE), assisted-order confirmation, returns, documents; invoices, payments, declarations and credit.