Files
vmall/openspec/changes/cart-checkout-orders/specs/cart/spec.md
T

15 lines
502 B
Markdown

# Spec delta: cart
## ADDED Requirements
### Requirement: Server-side cart
Authenticated shoppers SHALL have a Redis-backed cart keyed by user id, containing sku_id + qty entries.
#### Scenario: add and update
- **WHEN** a shopper POSTs sku + qty, then PUTs a new qty
- **THEN** GET /api/cart reflects the latest qty with current price/name snapshot
#### Scenario: unpurchasable SKU rejected
- **WHEN** adding a SKU that is inactive or whose product is not published
- **THEN** the API returns 400