CartOptions
The cart’s settings. Giving cart at all turns the cart on: without it there is no cart, no storage access, no header button, and the buy button draws nothing.
Properties
Section titled “Properties”cartHref?
Section titled “cartHref?”
optionalcartHref?:string
The cart experience’s address, for a host that does not use the storefront holder. The holder’s cart link wins when both are given.
confirmationHref?
Section titled “confirmationHref?”
optionalconfirmationHref?:string
The order confirmation experience’s address, likewise. With none there is nowhere to send the shopper back to, so the pay form says so.
optionalpoll?:object
How the confirmation waits for the provider to confirm the payment. The defaults are a capped back-off of a few minutes; this exists for tests and unusual hosts.
capMs?
Section titled “capMs?”
optionalcapMs?:number
delays?
Section titled “delays?”
optionaldelays?: readonlynumber[]
steadyMs?
Section titled “steadyMs?”
optionalsteadyMs?:number
storage?
Section titled “storage?”
optionalstorage?:StorageAdapter
Where the cart token and the pending order are kept. localStorageAdapter() by default; cookieAdapter() for a host that renders on a server. Read once, when the provider mounts.
storeKey?
Section titled “storeKey?”
optionalstoreKey?:string
The store’s key. Without it (or without currency) the provider asks Commerce for the store once per page, the only request made before a shopper adds anything.