Sync the shop-coupons capability plus the order, frontend-mall, and frontend-shop-admin requirements into the main specs, and write the capability Purpose the archive leaves as a placeholder. Renaming the coupon scenario in the flash-sales and group-buying order deltas to the exact name now in the main order spec keeps those changes archivable, since a MODIFIED requirement replaces the whole block.
1.1 KiB
1.1 KiB
ADDED Requirements
Requirement: Live shop coupon surfaces
The mall SHALL load a product's currently claimable shop coupons and the signed-in customer's coupon list through the shared API client, replacing direct coupon fixtures. Checkout SHALL present eligible owned coupons separately for each shop order and show the server-returned discount after submission. Payment and order-detail views SHALL show the persisted discount_minor and post-discount total from the order payload.
Scenario: claim from a product page
- WHEN a signed-in shopper claims an active coupon with remaining stock from a product page
- THEN it appears in the shopper's coupon list without a fixture import
Scenario: select coupon by shop
- WHEN a cart spans two shops and the shopper selects a coupon for one shop
- THEN checkout submits the choice only for that shop and the other shop remains undiscounted
Scenario: order shows realized discount
- WHEN checkout succeeds with a coupon on one shop order
- THEN that order's payment and detail views show the server discount and reduced total without a client-calculated amount