@wocart/storefront / index / CartValidation
Interface: CartValidation
The catalog's truth about a basket, right now. Read-only — nothing is written.
Properties
coupon
coupon:
CouponOutcome
What the code the quote was asked with did; null without one.
delivery?
optionaldelivery?:CartDeliveryQuote
Present when validate was given a destination: what the order would
charge there, from the same quote the order itself uses (shipping
profiles, commune overrides, the free-delivery threshold and offers).
available: false — fee and total null — means the store does not
deliver there, and an order to it is refused.
freeDelivery
freeDelivery:
object
Subtotal-based, so answerable before the shopper types an address.
by
by:
"offer"|"coupon"|"threshold"
Why delivery is free: an offer, the coupon or the store's amount; null when it is not.
fromOffer
fromOffer:
boolean
qualified
qualified:
boolean
remaining
remaining:
number
threshold
threshold:
number
lines
lines:
CartValidationLine[]
rewards
rewards:
CartReward[]
subtotal
subtotal:
number