@spree/docs 0.1.267 → 0.1.269

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.
@@ -41,7 +41,8 @@ On top of that, meaningful business moments get their own events:
41
41
 
42
42
  | Event | Meaning |
43
43
  |---|---|
44
- | `order.placed` | A customer completed checkout |
44
+ | `order.placed` | An order was placed — one per order, so a checkout that split across several sellers publishes one per seller |
45
+ | `order_group.completed` | A checkout that split finished — one event for the whole purchase |
45
46
  | `order.paid` | Payment is settled in full |
46
47
  | `order.canceled` | The order was cancelled |
47
48
  | `order.fulfilled` / `order.delivered` | Everything has shipped / arrived |
@@ -271,6 +271,14 @@ curl -X PATCH https://your-store.com/api/v3/admin/orders/or_UkLWZg9DAJ/complete
271
271
  ```
272
272
 
273
273
 
274
+ ### One confirmation, and it describes the purchase
275
+
276
+ The customer made one purchase, so they get one confirmation email — sent from the group, not from any of its orders. Each child order is placed silently.
277
+
278
+ If you replace the confirmation email, replace it at the group level too: the email a customer receives for a split checkout is `Spree::OrderGroupMailer`, reacting to the `order_group.completed` event, and a re-send from any child order in the admin sends the purchase's email rather than that child's. A checkout that doesn't split is unaffected and still sends the ordinary order confirmation.
279
+
280
+ > **NOTE:** **Orders and deliveries are different counts.** Three seller orders do not mean three parcels. When several sellers' goods ship from one warehouse, the checkout quotes one delivery charge, and the split divides that charge between the orders rather than charging for it again — so one box arrives. Ask the group for `fulfillment_groups` to get the parcels that really ship; each one knows its delivery method, its cost, the goods it carries and who is sending it. Counting child orders instead promises the customer deliveries that will never arrive.
281
+
274
282
  ## Commission
275
283
 
276
284
  Commission is what the marketplace charges for the sale — configured as **rates**, and recorded per sale as immutable **commission lines**.
@@ -399,6 +399,8 @@ Store Credits and Gift Cards work differently at checkout:
399
399
  - **Store Credits** - Require a customer account; applied from the customer's balance
400
400
  - **Gift Cards** - Can be used by anyone (guests included); applied directly to the order via code
401
401
 
402
+ Both are applied before the customer chooses how to pay, and neither appears among the cart's payment methods. An order uses one or the other, never both. A gift card covers as much of the total as its balance allows and keeps up as the total changes. See the [cart & checkout SDK guide](../sdk/store/cart-checkout.md) for the calls.
403
+
402
404
  ### Checkout Flow
403
405
 
404
406
  ```mermaid
@@ -77,6 +77,8 @@ const cart = await client.carts.giftCards.apply(cartId, 'GC-ABCD-1234', options)
77
77
  await client.carts.giftCards.remove(cartId, 'gc_abc123', options);
78
78
  ```
79
79
 
80
+ A gift card pays as much of the total as its balance allows, and its share keeps up when delivery, discounts or tax change the total. A cart can use a gift card or store credit, not both.
81
+
80
82
  ### Fees and Duties
81
83
 
82
84
  A cart may carry charges that are neither a product price nor tax: gift wrapping, a handling charge, a cash-on-delivery surcharge, or an import duty on a cross-border order. Each is a [fee](../../core-concepts/fees.md) on the cart, and the storefront should show every one of them before the customer pays.
@@ -174,6 +176,8 @@ await client.carts.storeCredits.apply(cartId, 25.00, options);
174
176
  await client.carts.storeCredits.remove(cartId, options);
175
177
  ```
176
178
 
179
+ Store credit is a balance, not one of the cart's `payment_methods`: apply it here, then collect whatever `amount_due` is left with a payment method. It can't be combined with a gift card on the same cart.
180
+
177
181
  ### Totals
178
182
 
179
183
  The cart and order responses break the amount the customer pays into these totals. Each has a raw string value and a `display_` twin formatted in the cart's currency.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.267",
3
+ "version": "0.1.269",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",