@spree/docs 0.1.270 → 0.1.272
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.
|
@@ -312,8 +312,8 @@ To regenerate manually (useful when iterating on serializers before committing):
|
|
|
312
312
|
```bash
|
|
313
313
|
cd server
|
|
314
314
|
pnpm exec spree rake typelizer:generate # regenerate TS types
|
|
315
|
-
cd
|
|
316
|
-
pnpm generate:zod # regenerate Zod schemas
|
|
315
|
+
cd ..
|
|
316
|
+
pnpm generate:zod # regenerate Zod schemas for every SDK
|
|
317
317
|
```
|
|
318
318
|
|
|
319
319
|
If you'd rather avoid the Docker round-trip and have Ruby on your host, the native equivalent works too:
|
|
@@ -94,7 +94,7 @@ Rules decide when a promotion is eligible. You can combine multiple rules and co
|
|
|
94
94
|
| Rule | Applies when |
|
|
95
95
|
|---|---|
|
|
96
96
|
| **FirstOrder** | It's the customer's first order (checked by account and email) |
|
|
97
|
-
| **ItemTotal** | The order subtotal is within configured minimum/maximum thresholds |
|
|
97
|
+
| **ItemTotal** | The order subtotal, not counting free gifts, is within configured minimum/maximum thresholds |
|
|
98
98
|
| **Product** | Specific products are in the order (`any` / `all` / `none` match policy) |
|
|
99
99
|
| **Category** | Products from specific categories are in the order — child categories count |
|
|
100
100
|
| **OptionValue** | Products with specific option values (size, color) are in the order |
|
|
@@ -141,6 +141,8 @@ Adds specified products to the cart when the promotion is eligible, checking sto
|
|
|
141
141
|
|
|
142
142
|
No second action is needed to make the gift free — pairing this with an order discount set to the gift's price discounts it twice.
|
|
143
143
|
|
|
144
|
+
A gift the promotion gives away does not count toward what other promotions measure: it cannot lift an order over an `ItemTotal` threshold, and an order discount's percentage is taken from the paid goods only. Nor does it count toward its own promotion's threshold, so in "Spend \$100 get a free sample" the sample is taken back once the paid goods drop to \$100 or less. A copy of the gift the customer pays for counts toward other promotions like any other item, but not toward its own promotion's threshold.
|
|
145
|
+
|
|
144
146
|
**Use case:** "Free gift with purchase", "Spend $100 get a free sample".
|
|
145
147
|
|
|
146
148
|
## Managing Promotions
|
|
@@ -383,6 +383,8 @@ The `Create line items` promotion action now discounts the items it adds down to
|
|
|
383
383
|
|
|
384
384
|
Two further changes come with it. A customer who already has the gift variant in their cart now gets theirs free rather than a second copy being added, and the promotion applies where it previously did nothing at all. And a gift is only taken back out of the cart for promotions actually applied to that order, so a customer who bought the gift variant themselves without qualifying keeps it.
|
|
385
385
|
|
|
386
|
+
A gift also no longer counts toward spend thresholds or toward the amount a percentage-off order discount is taken from. That includes the gift promotion's own threshold, so a "spend over a set amount, get a gift" promotion now takes the gift back once the paid items fall below the threshold.
|
|
387
|
+
|
|
386
388
|
## Dependency injection changes
|
|
387
389
|
|
|
388
390
|
6.0 introduces `*_workflow` keys for the flows that graduated to the workflow tier. The old `*_service` keys **stay settable and readable one release so applications don't crash at boot — but a legacy write is stashed, not applied**: a class written against the old service contract is not interchangeable with the workflow the new call sites consume. Reads return your stashed class (legacy code calling its own override keeps working), falling back to the workflow. Removed in 6.1.
|