@spree/docs 0.1.265 → 0.1.267

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.
@@ -137,7 +137,9 @@ Writes a discount on each fulfillment covering its delivery cost. The row is kep
137
137
 
138
138
  ### Free items (`CreateLineItems`)
139
139
 
140
- Adds specified products to the cart when the promotion is eligible, checking stock first. Items are not removed automatically if eligibility is lost — customers remove them manually.
140
+ Adds specified products to the cart when the promotion is eligible, checking stock first, and discounts them to zero. A customer who already has the gift in their cart gets theirs free rather than a duplicate; any further copies they bought stay paid for. The gift is taken back when the promotion stops applying.
141
+
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.
141
143
 
142
144
  **Use case:** "Free gift with purchase", "Spend $100 get a free sample".
143
145
 
@@ -205,7 +207,7 @@ The available rule and action types — including any custom ones you register
205
207
  Coupon codes track promotion usage and can be single-use or multi-use.
206
208
 
207
209
  - **Single code** — set the `code` attribute on the promotion; `usage_limit` controls how many times it can be redeemed.
208
- - **Multi-code** — bulk-generated codes each track their own state (`unused` / `used`).
210
+ - **Multi-code** — bulk-generated codes each track their own state (`unused` / `used`). A code is used up only when an order is placed with it. Applying it to a cart just holds it there, and a shopper who presents a code held by an abandoned cart takes it over, so an unfinished checkout never burns a code.
209
211
 
210
212
  Customers apply codes on the cart via the Store API:
211
213
 
@@ -375,6 +375,14 @@ A handler receives the workflow (so it can read `order`, `items`, `created_by`,
375
375
  - **Customers are emailed their download links** when the order is placed, from the new `Spree::DigitalAssetMailer` in the optional `spree_emails` gem. Hosts that already send their own download email should either suppress it (`send_consumer_transactional_emails`) or drop their own. The dashboard's order page can re-send it.
376
376
  - **Digital assets are managed through the Admin API and dashboard**, and signed-in customers can list everything they have bought at `GET /api/v3/store/customers/me/digital_links`.
377
377
 
378
+ ## Free-gift promotions price their own gift
379
+
380
+ The `Create line items` promotion action now discounts the items it adds down to zero. It used to add them at their full price and leave the discounting to you.
381
+
382
+ > **WARNING:** **Delete the second action if you paired one with it.** The old guidance was to add a whole-order discount set to the gift's price to pay for the gift. That discount still applies, so a promotion configured the old way now discounts twice — the gift is free *and* the order discount comes off. Open each promotion using `Create line items`, and remove the accompanying `Create whole-order adjustment` that exists only to cancel out the gift.
383
+
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
+
378
386
  ## Dependency injection changes
379
387
 
380
388
  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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.265",
3
+ "version": "0.1.267",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",