create-cartbase 0.1.11 → 0.1.12
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.
package/package.json
CHANGED
|
@@ -334,7 +334,14 @@ code-first through the error-copy maps, never raw API strings.
|
|
|
334
334
|
- **Mount rules** — wrap the checkout page (or any custom composition).
|
|
335
335
|
Default path template `"/{country}/order/{id}/confirmed"`; single-country
|
|
336
336
|
stores pass `"/order/{id}/confirmed"`.
|
|
337
|
-
- **
|
|
337
|
+
- **A NESTED PROVIDER INHERITS (0.12.0)** — mounting a second one, which is
|
|
338
|
+
what you do when you set `orderConfirmedPath` on a page inside a
|
|
339
|
+
`StorefrontLocaleProvider`, keeps every label from the provider above and
|
|
340
|
+
changes only the keys you name. Before 0.12.0 it merged over the ENGLISH
|
|
341
|
+
defaults, so a provider mounted for the path alone silently reset the
|
|
342
|
+
whole checkout to English on an otherwise translated store. The same now
|
|
343
|
+
holds for `ProductLabelsProvider` and `OrderLabelsProvider`.
|
|
344
|
+
- **Settings** — none (labels come from the store's locale pack).
|
|
338
345
|
|
|
339
346
|
### `useCheckoutOrchestration(options)` — `checkout/use-checkout-orchestration`
|
|
340
347
|
|
|
@@ -34,6 +34,22 @@ export default async function ProductPage({
|
|
|
34
34
|
product={product}
|
|
35
35
|
pricingContext={PRICING_CONTEXT}
|
|
36
36
|
addToCart={addToCartAction}
|
|
37
|
+
// NO `promises` here, deliberately. Until 0.13.0 the library carried
|
|
38
|
+
// delivery, exchange and return promises as label DEFAULTS, so every
|
|
39
|
+
// store scaffolded from this file told shoppers "your package will
|
|
40
|
+
// arrive in 3-5 business days" and "we'll refund your money" without
|
|
41
|
+
// anyone having decided that. Those are YOUR commitments, so you write
|
|
42
|
+
// them:
|
|
43
|
+
//
|
|
44
|
+
// promises={[
|
|
45
|
+
// { icon: "delivery", title: "Fast delivery",
|
|
46
|
+
// body: "Your order arrives in 2 working days." },
|
|
47
|
+
// ]}
|
|
48
|
+
//
|
|
49
|
+
// Pass nothing and the section does not exist, which is the right
|
|
50
|
+
// default for a store that has not decided yet. The physical-facts
|
|
51
|
+
// section appears on its own for products that HAVE facts, and is
|
|
52
|
+
// skipped for those that do not.
|
|
37
53
|
/>
|
|
38
54
|
)
|
|
39
55
|
}
|