Problem
The storefront checkout never sends a shipping method, shipping zone or coupon code, so every order is quoted with zero shipping and zero tax, and there is no way to enter a coupon.
- The domain already accepts all three:
packages/domain/src/orders/create-order-from-cart.ts:60-64 (shippingZoneId, shippingMethodId, couponCode), passed into the quote at :255-257.
packages/plugin/src/storefront/checkout-routes.ts never sets any of them, and the summary hard-codes shippingSelected: false (:208).
sites/staging/src/pages/checkout/index.astro has only name, email, phone and address fields: no coupon input and no shipping choice. The live page tells the buyer "shipping or tax — this store hasn't set them up yet", even when the merchant has configured zones, methods and rates on the Shipping/Tax admin pages.
- Separately: tax takes its zone from the request rather than the shipping address (
packages/domain/src/pricing/quote.ts:75-84). With no zone sent, tax is 0. An unknown tax class also silently becomes 0 (packages/domain/src/pricing/compute-totals.ts:44).
So the merchant's Shipping, Tax and Coupons configuration has no effect on storefront orders.
Needs a decision
How is a zone chosen: from the shipping address's country/region, or picked by the buyer? Should tax follow the shipping zone automatically?
Proposed scope
- The checkout route accepts and passes through
shippingMethodId, shippingZoneId and couponCode.
- The storefront adds a shipping method picker and a coupon field, and shows validation errors from the quote.
- Tax zone derived from the address, per the decision above.
Prerequisite
#286: the in-process checkout contract cases should run first.
Validation
- Contract tests for a quote with a zone, a shipping method and a valid, invalid or expired coupon.
- A storefront Playwright test: with a zone, rate and coupon configured, the checkout summary and the created order's totals match.
Found in a read-only audit of main @ 3264354.
Problem
The storefront checkout never sends a shipping method, shipping zone or coupon code, so every order is quoted with zero shipping and zero tax, and there is no way to enter a coupon.
packages/domain/src/orders/create-order-from-cart.ts:60-64(shippingZoneId,shippingMethodId,couponCode), passed into the quote at:255-257.packages/plugin/src/storefront/checkout-routes.tsnever sets any of them, and the summary hard-codesshippingSelected: false(:208).sites/staging/src/pages/checkout/index.astrohas only name, email, phone and address fields: no coupon input and no shipping choice. The live page tells the buyer "shipping or tax — this store hasn't set them up yet", even when the merchant has configured zones, methods and rates on the Shipping/Tax admin pages.packages/domain/src/pricing/quote.ts:75-84). With no zone sent, tax is 0. An unknown tax class also silently becomes 0 (packages/domain/src/pricing/compute-totals.ts:44).So the merchant's Shipping, Tax and Coupons configuration has no effect on storefront orders.
Needs a decision
How is a zone chosen: from the shipping address's country/region, or picked by the buyer? Should tax follow the shipping zone automatically?
Proposed scope
shippingMethodId,shippingZoneIdandcouponCode.Prerequisite
#286: the in-process checkout contract cases should run first.
Validation
Found in a read-only audit of
main@ 3264354.