@spree/docs 0.1.280 → 0.1.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -151,7 +151,8 @@ Seven checks run on every cart read:
|
|
|
151
151
|
> **WARNING:** **An empty `requirements` array does not guarantee completion will succeed.** What a
|
|
152
152
|
> cart reports is the *advisory* set. Completing one additionally checks stock
|
|
153
153
|
> (`out_of_stock`, `discontinued`), negotiated quantity rules
|
|
154
|
-
> (`quantity_rule_violated`)
|
|
154
|
+
> (`quantity_rule_violated`), whether each product is still in the buyer's
|
|
155
|
+
> [catalogs](catalogs.md) (`not_orderable`) and the guest-checkout policy
|
|
155
156
|
> (`guest_checkout_not_allowed`) — each of which has to load line items, so they are
|
|
156
157
|
> held back to keep reading a cart cheap. Treat a failed completion as a normal path,
|
|
157
158
|
> not an exception.
|
|
@@ -224,6 +225,8 @@ To add your own step or requirement, see
|
|
|
224
225
|
|
|
225
226
|
Each [fulfillment](fulfillments.md) offers delivery rates. Pick one per fulfillment.
|
|
226
227
|
|
|
228
|
+
A cart has no fulfillments until it has a shipping address or a pickup location, unless none of its items ships to an address (a digital-only cart has them straight away). Saving a different address replaces the fulfillments, under new ids, with the cheapest shipping rate selected, so show the customer the new options before taking payment.
|
|
229
|
+
|
|
227
230
|
```typescript Store SDK
|
|
228
231
|
const cart = await client.carts.get(cartId)
|
|
229
232
|
await client.carts.fulfillments.update(cartId, cart.fulfillments[0].id, {
|
|
@@ -169,6 +169,8 @@ If one applicable catalog is a pricing overlay, the restriction is off and the s
|
|
|
169
169
|
|
|
170
170
|
Gated storefront access is checked before any of this — a shopper who has to sign in never reaches catalog resolution.
|
|
171
171
|
|
|
172
|
+
What a shopper can see is also what they can buy. Adding a product outside their catalogs, or one not published on the cart's channel, answers `404` — the same as reading that product. A cart can still come to hold one without an add: a guest cart claimed after signing in, a cart switched to another company, or a catalog edited while the cart was open. Completing checkout checks every line again and refuses such a cart with a `not_orderable` [requirement](carts.md) naming the product, until the shopper removes it. Free items a promotion adds are no exception, so keep gift products inside the catalogs of the buyers the promotion targets. Staff keying in a draft order are not restricted.
|
|
173
|
+
|
|
172
174
|
> **WARNING:** **A company buyer never picks up their customer group's catalogs.** As soon as any catalog is assigned to their company or one above it, that is their agreement, and group assignments are not consulted for them.
|
|
173
175
|
>
|
|
174
176
|
> So don't express trade tiers as customer groups over a company tree — the tier catalogs would be unreachable for exactly the buyers they were meant for. Model tiers as company assignments: the group-wide range on the root, and each tier's catalog on the member companies or divisions in that tier. One tier catalog can carry as many company assignments as the tier has members, and nearest-first pricing means a buyer's own node beats anything inherited.
|