@spree/docs 0.1.274 → 0.1.276
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.
|
@@ -209,7 +209,7 @@ The available rule and action types — including any custom ones you register
|
|
|
209
209
|
Coupon codes track promotion usage and can be single-use or multi-use.
|
|
210
210
|
|
|
211
211
|
- **Single code** — set the `code` attribute on the promotion; `usage_limit` controls how many times it can be redeemed.
|
|
212
|
-
- **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.
|
|
212
|
+
- **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, even before the cart qualifies, and only the cart holding a code gets its discount. A shopper who presents a code held by an abandoned cart takes it over, so an unfinished checkout never burns a code. The cart that lost it drops the code and gets a `coupon_code_unavailable` warning on its next Store API request that reads or changes the cart, and placing an order with a code that has been taken is refused rather than charged more than the shopper was shown.
|
|
213
213
|
|
|
214
214
|
Customers apply codes on the cart via the Store API:
|
|
215
215
|
|
|
@@ -694,13 +694,15 @@ If you subclassed `Spree::Report` in your own application, that class no longer
|
|
|
694
694
|
|
|
695
695
|
Every rename keeps the legacy name working for one release with a deprecation warning. The notable ones:
|
|
696
696
|
|
|
697
|
+
Before 6.0 a cart was an incomplete order, so extensions written for 5.x (payment gateways in particular) call these names on carts. The rows marked *Order and Cart* are answered by `Spree::Cart` as well as `Spree::Order`, with the same warning.
|
|
698
|
+
|
|
697
699
|
| Deprecated | Use instead |
|
|
698
700
|
|---|---|
|
|
699
701
|
| `Order#finalize!` | `Spree.order_complete_workflow` |
|
|
700
702
|
| `Order#updater`, `Spree::OrderUpdater`, `Spree::CartUpdater` | `#recalculate_totals!` / `#update_statuses!` |
|
|
701
|
-
| `Order#shipping_discount` | `#fulfillment_discount` |
|
|
702
|
-
| `Order#special_instructions` | `#customer_note` (column renamed) |
|
|
703
|
-
| `Order#promo_total`, `#item_count`, `#ship_total` | `#discount_total`, `#total_quantity`, `#delivery_total` (columns renamed) |
|
|
703
|
+
| `Order#shipping_discount` (Order and Cart) | `#fulfillment_discount` |
|
|
704
|
+
| `Order#special_instructions` (Order and Cart) | `#customer_note` (column renamed) |
|
|
705
|
+
| `Order#promo_total`, `#item_count`, `#ship_total`, `#shipment_total` (Order and Cart) | `#discount_total`, `#total_quantity`, `#delivery_total` (columns renamed) |
|
|
704
706
|
| `LineItem#promo_total`, `Fulfillment#promo_total` | `#discount_total` (columns renamed) |
|
|
705
707
|
| `Address#firstname`, `#lastname`, `#zipcode` | `#first_name`, `#last_name`, `#postal_code` (columns renamed) |
|
|
706
708
|
| `Address.normalize_zipcode`, `#normalized_zipcode` | `.normalize_postal_code`, `#normalized_postal_code` |
|
|
@@ -714,10 +716,15 @@ Every rename keeps the legacy name working for one release with a deprecation wa
|
|
|
714
716
|
| `Fulfillment#ship`, `#ship!` | `Spree.fulfillment_fulfill_workflow.call(fulfillment:)` (`Spree::Fulfillments::Fulfill`) |
|
|
715
717
|
| `Fulfillment#shipped?`, `#can_ship?`, `#shipping_method`, `#add_shipping_method` | `#fulfilled?`, `#can_fulfill?`, `#delivery_method`, `#add_delivery_method` |
|
|
716
718
|
| `LineItem#target_shipment` | `#target_fulfillment` |
|
|
717
|
-
| `Order#create_proposed_shipments` / `#create_proposed_fulfillments` | `#rebuild_fulfillments!`
|
|
719
|
+
| `Order#create_proposed_shipments` / `#create_proposed_fulfillments` (Order and Cart) | `#rebuild_fulfillments!` |
|
|
720
|
+
| `#user`, `#user=`, `#user_id`, `#associate_user!` (Order and Cart) | `#customer`, `#customer=`, `#customer_id`, `#associate_customer!` |
|
|
721
|
+
| `#shipments`, `#set_shipments_cost`, `#ensure_updated_shipments`, `#display_shipment_total` (Order and Cart) | `#fulfillments`, `#set_fulfillments_cost`, `#ensure_updated_fulfillments`, `#display_delivery_total` |
|
|
722
|
+
| `#update_with_updater!` (Order and Cart) | `#recalculate_totals!` |
|
|
723
|
+
| `#available_payment_methods`, `#collect_payment_methods`, `#collect_frontend_payment_methods` (Order and Cart) | `#payment_methods` |
|
|
724
|
+
| `#all_line_items` (Order and Cart) | `#line_items` |
|
|
718
725
|
| `Order#remove_out_of_stock_items!` | cart-side only (`Spree::Carts::RemoveOutOfStockItems`) |
|
|
719
|
-
| `Order#delivery_required?` | `#delivery_step_required?` — digital and pickup are deliveries too; this asks whether the customer must choose a delivery option |
|
|
720
|
-
| `Order#requires_ship_address?` | `#shipping_address_required?` — decided by the selected delivery methods (`DeliveryMethod#requires_address?`); digital, pickup, and pickup-point deliveries need no customer address |
|
|
726
|
+
| `Order#delivery_required?` (Order and Cart) | `#delivery_step_required?` — digital and pickup are deliveries too; this asks whether the customer must choose a delivery option |
|
|
727
|
+
| `Order#requires_ship_address?` (Order and Cart) | `#shipping_address_required?` — decided by the selected delivery methods (`DeliveryMethod#requires_address?`); digital, pickup, and pickup-point deliveries need no customer address |
|
|
721
728
|
| `requirements[].field` / `.code` `shipping_method` (Store API) | `delivery_method` / `delivery_method_required` — no bridge; clients keying off the delivery requirement must switch both tokens |
|
|
722
729
|
| `Cart#number` (Store API field) | `id` — carts have no order-style number; the field mirrors the prefixed ID for one release |
|
|
723
730
|
| `order.completed` event | `order.placed` |
|