@spree/docs 0.1.0 → 0.1.2
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/dist/api-reference/store-api/errors.md +2 -2
- package/dist/api-reference/store-api/idempotency.md +1 -1
- package/dist/api-reference/store-api/localization.md +4 -4
- package/dist/api-reference/store-api/metadata.md +2 -2
- package/dist/api-reference/store.yaml +10599 -0
- package/dist/api-reference/storefront/authentication.md +2 -2
- package/dist/api-reference/tutorials/adyen-integration-guide-for-android.md +2 -2
- package/dist/api-reference/tutorials/adyen-integration-guide-for-ios.md +2 -2
- package/dist/api-reference/tutorials/quick-checkout-with-stripe.md +8 -8
- package/dist/api-reference/v2/introduction.md +2 -2
- package/dist/api-reference/webhooks-events.md +2 -2
- package/dist/developer/admin/admin.md +18 -18
- package/dist/developer/admin/components.md +1 -1
- package/dist/developer/admin/extending-ui.md +26 -26
- package/dist/developer/admin/helper-methods.md +2 -2
- package/dist/developer/admin/navigation.md +5 -5
- package/dist/developer/admin/tables.md +4 -4
- package/dist/developer/cli/quickstart.md +2 -2
- package/dist/developer/contributing/creating-an-extension.md +12 -12
- package/dist/developer/contributing/quickstart.md +1 -1
- package/dist/developer/core-concepts/addresses.md +11 -11
- package/dist/developer/core-concepts/adjustments.md +8 -8
- package/dist/developer/core-concepts/architecture.md +21 -21
- package/dist/developer/core-concepts/calculators.md +4 -4
- package/dist/developer/core-concepts/customers.md +9 -9
- package/dist/developer/core-concepts/events.md +5 -5
- package/dist/developer/core-concepts/inventory.md +5 -5
- package/dist/developer/core-concepts/markets.md +10 -10
- package/dist/developer/core-concepts/media.md +3 -3
- package/dist/developer/core-concepts/metafields.md +6 -6
- package/dist/developer/core-concepts/orders.md +14 -14
- package/dist/developer/core-concepts/payments.md +9 -9
- package/dist/developer/core-concepts/pricing.md +10 -10
- package/dist/developer/core-concepts/products.md +10 -10
- package/dist/developer/core-concepts/promotions.md +5 -5
- package/dist/developer/core-concepts/reports.md +2 -2
- package/dist/developer/core-concepts/search-filtering.md +7 -7
- package/dist/developer/core-concepts/shipments.md +13 -13
- package/dist/developer/core-concepts/slugs.md +3 -3
- package/dist/developer/core-concepts/staff-roles.md +7 -7
- package/dist/developer/core-concepts/store-credits-gift-cards.md +4 -4
- package/dist/developer/core-concepts/stores.md +15 -15
- package/dist/developer/core-concepts/taxes.md +11 -11
- package/dist/developer/core-concepts/translations.md +6 -6
- package/dist/developer/core-concepts/users.md +12 -12
- package/dist/developer/core-concepts/webhooks.md +8 -8
- package/dist/developer/create-spree-app/quickstart.md +5 -5
- package/dist/developer/customization/api.md +2 -2
- package/dist/developer/customization/authentication.md +2 -2
- package/dist/developer/customization/checkout.md +7 -7
- package/dist/developer/customization/decorators.md +24 -24
- package/dist/developer/customization/dependencies.md +1 -1
- package/dist/developer/customization/metadata.md +3 -3
- package/dist/developer/customization/permissions.md +1 -1
- package/dist/developer/customization/quickstart.md +9 -9
- package/dist/developer/customization/v4/checkout.md +3 -3
- package/dist/developer/customization/v4/deface.md +1 -1
- package/dist/developer/deployment/assets.md +1 -1
- package/dist/developer/deployment/aws.md +5 -5
- package/dist/developer/deployment/docker.md +2 -2
- package/dist/developer/deployment/environment_variables.md +1 -1
- package/dist/developer/deployment/render.md +5 -5
- package/dist/developer/getting-started/quickstart.md +2 -2
- package/dist/developer/how-to/custom-payment-method.md +6 -6
- package/dist/developer/how-to/custom-promotion.md +7 -7
- package/dist/developer/how-to/custom-report.md +3 -3
- package/dist/developer/how-to/custom-search-provider.md +7 -7
- package/dist/developer/multi-store/quickstart.md +1 -1
- package/dist/developer/multi-tenant/quickstart.md +1 -1
- package/dist/developer/sdk/authentication.md +1 -1
- package/dist/developer/sdk/configuration.md +1 -1
- package/dist/developer/sdk/store/markets.md +3 -3
- package/dist/developer/storefront/nextjs/customization.md +1 -1
- package/dist/developer/storefront/nextjs/quickstart.md +2 -2
- package/dist/developer/tutorial/admin.md +2 -2
- package/dist/developer/tutorial/extending-models.md +15 -15
- package/dist/developer/tutorial/file-uploads.md +1 -1
- package/dist/developer/tutorial/introduction.md +7 -7
- package/dist/developer/tutorial/rich-text.md +1 -1
- package/dist/developer/tutorial/testing.md +5 -61
- package/dist/developer/upgrades/3.7-to-4.0.md +1 -1
- package/dist/developer/upgrades/4.0-to-4.1.md +1 -1
- package/dist/developer/upgrades/4.10-to-5.0.md +1 -1
- package/dist/developer/upgrades/4.5-to-4.6.md +4 -4
- package/dist/developer/upgrades/4.8-to-4.9.md +1 -1
- package/dist/developer/upgrades/4.9-to-4.10.md +1 -1
- package/dist/developer/upgrades/5.0-to-5.1.md +1 -1
- package/dist/developer/upgrades/5.1-to-5.2.md +2 -2
- package/dist/developer/upgrades/5.2-to-5.3.md +2 -2
- package/dist/developer/upgrades/5.3-to-5.4.md +5 -5
- package/dist/developer/upgrades/quickstart.md +1 -1
- package/dist/integrations/integrations.md +10 -10
- package/dist/integrations/payments/adyen.md +1 -1
- package/dist/integrations/search/meilisearch.md +2 -2
- package/package.json +7 -2
- package/dist/developer/storefront/blocks.md +0 -285
- package/dist/developer/storefront/custom-css.md +0 -260
- package/dist/developer/storefront/custom-javascript.md +0 -166
- package/dist/developer/storefront/helper-methods.md +0 -1288
- package/dist/developer/storefront/links.md +0 -298
- package/dist/developer/storefront/pages.md +0 -163
- package/dist/developer/storefront/sections.md +0 -569
- package/dist/developer/storefront/storefront.md +0 -56
- package/dist/developer/storefront/themes.md +0 -161
- package/dist/developer/tutorial/page-builder.md +0 -487
- package/dist/developer/tutorial/seo.md +0 -332
- package/dist/developer/tutorial/storefront.md +0 -352
|
@@ -9,7 +9,7 @@ A product represents something you sell. Each product has one or more **variants
|
|
|
9
9
|
|
|
10
10
|
Products are organized into **categories** — a flexible hierarchy for grouping products. Categories can be filtered, sorted, and searched via the Store API.
|
|
11
11
|
|
|
12
|
-
> **INFO:** Product names, descriptions, slugs, and SEO fields are [translatable](
|
|
12
|
+
> **INFO:** Product names, descriptions, slugs, and SEO fields are [translatable](translations.md#resource-translations).
|
|
13
13
|
|
|
14
14
|
```mermaid
|
|
15
15
|
erDiagram
|
|
@@ -117,7 +117,7 @@ curl 'https://api.mystore.com/api/v3/store/products?q[search]=tote+bag' \
|
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
|
|
120
|
-
See [Querying](
|
|
120
|
+
See [Querying](../../api-reference/store-api/querying.md) for the full list of filtering, sorting, and pagination options.
|
|
121
121
|
|
|
122
122
|
## Getting a Product
|
|
123
123
|
|
|
@@ -297,7 +297,7 @@ curl 'https://api.mystore.com/api/v3/store/products/spree-tote?expand=media,vari
|
|
|
297
297
|
|
|
298
298
|
## Prices
|
|
299
299
|
|
|
300
|
-
Each variant can have multiple prices — one per currency, plus additional prices from [Price Lists](
|
|
300
|
+
Each variant can have multiple prices — one per currency, plus additional prices from [Price Lists](pricing.md) that apply conditionally based on market, geography, customer segment, or quantity.
|
|
301
301
|
|
|
302
302
|
The API automatically returns the correct price based on the current currency and market context:
|
|
303
303
|
|
|
@@ -306,7 +306,7 @@ The API automatically returns the correct price based on the current currency an
|
|
|
306
306
|
| `price` | Current selling price |
|
|
307
307
|
| `original_price` | Compare-at price (for showing strikethrough discounts) |
|
|
308
308
|
|
|
309
|
-
See the [Pricing](
|
|
309
|
+
See the [Pricing](pricing.md) guide for details on Price Lists, Price Rules, and market-specific pricing.
|
|
310
310
|
|
|
311
311
|
## Categories
|
|
312
312
|
|
|
@@ -352,9 +352,9 @@ curl 'https://api.mystore.com/api/v3/store/categories/clothing/shirts/products?l
|
|
|
352
352
|
|
|
353
353
|
## Related Documentation
|
|
354
354
|
|
|
355
|
-
- [Pricing](
|
|
356
|
-
- [Inventory](
|
|
357
|
-
- [Media](
|
|
358
|
-
- [Translations](
|
|
359
|
-
- [Search & Filtering](
|
|
360
|
-
- [Querying](
|
|
355
|
+
- [Pricing](pricing.md) — Price Lists, Price Rules, and market-specific pricing
|
|
356
|
+
- [Inventory](inventory.md) — Stock management and backorders
|
|
357
|
+
- [Media](media.md) — Image management
|
|
358
|
+
- [Translations](translations.md) — Translating product content
|
|
359
|
+
- [Search & Filtering](search-filtering.md) — Full-text search and Ransack filtering
|
|
360
|
+
- [Querying](../../api-reference/store-api/querying.md) — API filtering, sorting, and pagination
|
|
@@ -70,7 +70,7 @@ erDiagram
|
|
|
70
70
|
- **Promotion Rules** determine eligibility conditions (FirstOrder, ItemTotal, Taxon, etc.)
|
|
71
71
|
- **Promotion Actions** define what happens when applied (discount, free shipping, free items)
|
|
72
72
|
- **Coupon Codes** track usage for code-based promotions
|
|
73
|
-
- **[Adjustments](
|
|
73
|
+
- **[Adjustments](adjustments.md)** are created on orders/line items to apply discounts
|
|
74
74
|
|
|
75
75
|
Promotions can be activated in two ways:
|
|
76
76
|
|
|
@@ -316,7 +316,7 @@ How promotions are evaluated and applied:
|
|
|
316
316
|
|
|
317
317
|
## Related Documentation
|
|
318
318
|
|
|
319
|
-
- [Build Custom Promotion Rules & Actions](
|
|
320
|
-
- [Calculators](
|
|
321
|
-
- [Orders](
|
|
322
|
-
- [Customization Quickstart](
|
|
319
|
+
- [Build Custom Promotion Rules & Actions](../how-to/custom-promotion.md) - Step-by-step guide to creating custom rules and actions
|
|
320
|
+
- [Calculators](calculators.md) - Learn about promotion calculators
|
|
321
|
+
- [Orders](orders.md) - Understanding order processing
|
|
322
|
+
- [Customization Quickstart](../customization/quickstart.md) - Overview of customization options
|
|
@@ -202,5 +202,5 @@ can :manage, Spree::Report
|
|
|
202
202
|
|
|
203
203
|
## Related Documentation
|
|
204
204
|
|
|
205
|
-
- [Build a Custom Report](
|
|
206
|
-
- [Events](
|
|
205
|
+
- [Build a Custom Report](../how-to/custom-report.md) - Step-by-step guide to creating custom reports
|
|
206
|
+
- [Events](events.md) - How report generation uses the events system
|
|
@@ -214,11 +214,11 @@ curl 'https://api.mystore.com/api/v3/store/products?page=1&limit=24' \
|
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
See [Querying](
|
|
217
|
+
See [Querying](../../api-reference/store-api/querying.md) for the full list of filtering, sorting, and pagination options.
|
|
218
218
|
|
|
219
219
|
## Search Providers
|
|
220
220
|
|
|
221
|
-
Spree uses a pluggable search provider architecture. The default provider uses SQL (ILIKE + Ransack). For production catalogs with 1,000+ products, we recommend switching to [Meilisearch](
|
|
221
|
+
Spree uses a pluggable search provider architecture. The default provider uses SQL (ILIKE + Ransack). For production catalogs with 1,000+ products, we recommend switching to [Meilisearch](../../integrations/search/meilisearch.md) for typo tolerance, relevance ranking, and faster faceted search.
|
|
222
222
|
|
|
223
223
|
```ruby
|
|
224
224
|
# config/initializers/spree.rb
|
|
@@ -227,11 +227,11 @@ Spree.search_provider = 'Spree::SearchProvider::Meilisearch'
|
|
|
227
227
|
|
|
228
228
|
No client-side or API changes are needed — the same `q[search]`, filter params, and sort options work with any provider.
|
|
229
229
|
|
|
230
|
-
See [Build a Custom Search Provider](
|
|
230
|
+
See [Build a Custom Search Provider](../how-to/custom-search-provider.md) for architecture details and how to build custom providers.
|
|
231
231
|
|
|
232
232
|
## Related Documentation
|
|
233
233
|
|
|
234
|
-
- [Products](
|
|
235
|
-
- [Querying](
|
|
236
|
-
- [Build a Custom Search Provider](
|
|
237
|
-
- [Meilisearch Integration](
|
|
234
|
+
- [Products](products.md) — Product catalog and listing
|
|
235
|
+
- [Querying](../../api-reference/store-api/querying.md) — API filtering, sorting, and pagination reference
|
|
236
|
+
- [Build a Custom Search Provider](../how-to/custom-search-provider.md) — Step-by-step guide
|
|
237
|
+
- [Meilisearch Integration](../../integrations/search/meilisearch.md) — Setup guide
|
|
@@ -5,7 +5,7 @@ description: Shipping methods, rates, split shipments, and fulfillment
|
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
7
7
|
|
|
8
|
-
A shipment represents a package being sent to a customer from a [Stock Location](
|
|
8
|
+
A shipment represents a package being sent to a customer from a [Stock Location](inventory.md#stock-locations). Each order can have one or more shipments — Spree automatically splits orders into multiple shipments when items need to ship from different locations or require different shipping methods.
|
|
9
9
|
|
|
10
10
|
```mermaid
|
|
11
11
|
erDiagram
|
|
@@ -41,10 +41,10 @@ erDiagram
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
**Key relationships:**
|
|
44
|
-
- **Shipment** tracks delivery of items from a [Stock Location](
|
|
44
|
+
- **Shipment** tracks delivery of items from a [Stock Location](inventory.md#stock-locations)
|
|
45
45
|
- **Shipping Method** defines the carrier/service (UPS, FedEx, etc.)
|
|
46
46
|
- **Shipping Rate** represents the calculated cost for a method
|
|
47
|
-
- **[Zone](
|
|
47
|
+
- **[Zone](addresses.md#zones)** defines geographic regions for shipping availability
|
|
48
48
|
- **Shipping Category** groups products with similar shipping requirements
|
|
49
49
|
|
|
50
50
|
## Shipment Attributes
|
|
@@ -120,9 +120,9 @@ curl -X PATCH 'https://api.mystore.com/api/v3/store/carts/cart_xxx/shipments/shp
|
|
|
120
120
|
|
|
121
121
|
Shipping methods represent the carrier services available to customers (e.g., UPS Ground, FedEx Overnight, DHL International). Each shipping method is scoped to:
|
|
122
122
|
|
|
123
|
-
- **[Zones](
|
|
123
|
+
- **[Zones](addresses.md#zones)** — geographic regions where the method is available
|
|
124
124
|
- **Shipping Categories** — product groups the method handles
|
|
125
|
-
- **[Stores](
|
|
125
|
+
- **[Stores](stores.md)** — which stores offer this method
|
|
126
126
|
|
|
127
127
|
Only methods whose zone matches the customer's shipping address are offered at checkout.
|
|
128
128
|
|
|
@@ -139,7 +139,7 @@ Each product is assigned a shipping category. Shipping methods can be restricted
|
|
|
139
139
|
|
|
140
140
|
### Calculators
|
|
141
141
|
|
|
142
|
-
Each shipping method uses a [Calculator](
|
|
142
|
+
Each shipping method uses a [Calculator](calculators.md) to determine the cost. Spree includes these built-in calculators:
|
|
143
143
|
|
|
144
144
|
| Calculator | Description |
|
|
145
145
|
|------------|-------------|
|
|
@@ -149,7 +149,7 @@ Each shipping method uses a [Calculator](/developer/core-concepts/calculators) t
|
|
|
149
149
|
| Flexible rate | One rate for the first item, another for each additional |
|
|
150
150
|
| Price sack | Tiered pricing based on order total |
|
|
151
151
|
|
|
152
|
-
You can create custom calculators for more complex pricing. See the [Calculators guide](
|
|
152
|
+
You can create custom calculators for more complex pricing. See the [Calculators guide](calculators.md).
|
|
153
153
|
|
|
154
154
|
## Split Shipments
|
|
155
155
|
|
|
@@ -175,7 +175,7 @@ flowchart TB
|
|
|
175
175
|
|
|
176
176
|
By default, Spree also splits shipments when a package exceeds a weight threshold (default: 150 units). This prevents individual packages from being too heavy.
|
|
177
177
|
|
|
178
|
-
> **INFO:** Split shipment behavior is customizable. See the [Customization Quickstart](
|
|
178
|
+
> **INFO:** Split shipment behavior is customizable. See the [Customization Quickstart](../customization/quickstart.md) for details on creating custom splitting rules.
|
|
179
179
|
|
|
180
180
|
## Examples
|
|
181
181
|
|
|
@@ -205,8 +205,8 @@ A store shipping from 2 locations (New York, Los Angeles) with 3 carriers and 3
|
|
|
205
205
|
|
|
206
206
|
## Related Documentation
|
|
207
207
|
|
|
208
|
-
- [Orders](
|
|
209
|
-
- [Inventory](
|
|
210
|
-
- [Calculators](
|
|
211
|
-
- [Addresses](
|
|
212
|
-
- [Events](
|
|
208
|
+
- [Orders](orders.md) — Checkout flow and shipping rate selection
|
|
209
|
+
- [Inventory](inventory.md) — Stock locations and inventory management
|
|
210
|
+
- [Calculators](calculators.md) — Shipping rate calculators
|
|
211
|
+
- [Addresses](addresses.md) — Shipping address and zones
|
|
212
|
+
- [Events](events.md) — Subscribe to shipment events (e.g., `shipment.shipped`)
|
|
@@ -106,6 +106,6 @@ Spree prevents certain words from being used as slugs to avoid route conflicts:
|
|
|
106
106
|
|
|
107
107
|
## Related Documentation
|
|
108
108
|
|
|
109
|
-
- [Products](
|
|
110
|
-
- [Translations](
|
|
111
|
-
- [Querying](
|
|
109
|
+
- [Products](products.md) — Product catalog
|
|
110
|
+
- [Translations](translations.md) — Multi-language content
|
|
111
|
+
- [Querying](../../api-reference/store-api/querying.md) — API resource lookup
|
|
@@ -45,7 +45,7 @@ Admin users can have different roles that control their permissions:
|
|
|
45
45
|
|------|-------------|
|
|
46
46
|
| `admin` | Full access to all Admin Panel features |
|
|
47
47
|
|
|
48
|
-
> **INFO:** You can create custom roles with specific permissions. See the [Customize Permissions guide](
|
|
48
|
+
> **INFO:** You can create custom roles with specific permissions. See the [Customize Permissions guide](../customization/permissions.md) for details.
|
|
49
49
|
|
|
50
50
|
## Creating Admin Users
|
|
51
51
|
|
|
@@ -101,7 +101,7 @@ flowchart TB
|
|
|
101
101
|
|
|
102
102
|
### Invitation Events
|
|
103
103
|
|
|
104
|
-
The invitation system publishes [events](
|
|
104
|
+
The invitation system publishes [events](events.md) you can subscribe to:
|
|
105
105
|
|
|
106
106
|
| Event | Description |
|
|
107
107
|
|-------|-------------|
|
|
@@ -113,11 +113,11 @@ The invitation system publishes [events](/developer/core-concepts/events) you ca
|
|
|
113
113
|
|
|
114
114
|
Spree uses [CanCanCan](https://github.com/CanCanCommunity/cancancan) for authorization. Permissions apply to both customers (Store API access) and admins (Admin Panel access).
|
|
115
115
|
|
|
116
|
-
See the [Customize Permissions guide](
|
|
116
|
+
See the [Customize Permissions guide](../customization/permissions.md) for details on creating custom roles and permission sets.
|
|
117
117
|
|
|
118
118
|
## Related Documentation
|
|
119
119
|
|
|
120
|
-
- [Customers](
|
|
121
|
-
- [Stores](
|
|
122
|
-
- [Permissions](
|
|
123
|
-
- [Events](
|
|
120
|
+
- [Customers](customers.md) — Customer accounts and authentication
|
|
121
|
+
- [Stores](stores.md) — Multi-store setup
|
|
122
|
+
- [Permissions](../customization/permissions.md) — Roles and authorization
|
|
123
|
+
- [Events](events.md) — Subscribe to invitation events
|
|
@@ -311,7 +311,7 @@ When a registered customer has multiple store credits, they are applied in order
|
|
|
311
311
|
|
|
312
312
|
## Related Documentation
|
|
313
313
|
|
|
314
|
-
- [Payments](
|
|
315
|
-
- [Orders](
|
|
316
|
-
- [Customers](
|
|
317
|
-
- [Events](
|
|
314
|
+
- [Payments](payments.md) — Payment processing and methods
|
|
315
|
+
- [Orders](orders.md) — Order management
|
|
316
|
+
- [Customers](customers.md) — Customer management
|
|
317
|
+
- [Events](events.md) — Event system and subscribers
|
|
@@ -5,7 +5,7 @@ description: The central model in Spree — every resource is scoped to a store
|
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
7
7
|
|
|
8
|
-
The Store is the central model in Spree. Every resource — products, orders, markets, payment methods, taxonomies — is scoped to a store. Most setups use a single store, but Spree supports [multi-store](
|
|
8
|
+
The Store is the central model in Spree. Every resource — products, orders, markets, payment methods, taxonomies — is scoped to a store. Most setups use a single store, but Spree supports [multi-store](../multi-store/quickstart.md) configurations where each store operates independently with its own catalog, branding, and checkout.
|
|
9
9
|
|
|
10
10
|
```mermaid
|
|
11
11
|
erDiagram
|
|
@@ -83,13 +83,13 @@ curl 'https://api.mystore.com/api/v3/store/store' \
|
|
|
83
83
|
|
|
84
84
|
## Markets
|
|
85
85
|
|
|
86
|
-
[Markets](
|
|
86
|
+
[Markets](markets.md) let you segment your store into geographic regions, each with its own currency, locale, and set of countries. For example, a single store can have:
|
|
87
87
|
|
|
88
88
|
- **North America** — USD, English, ships to US and Canada
|
|
89
89
|
- **Europe** — EUR, German, ships to DE, FR, AT, NL
|
|
90
90
|
- **United Kingdom** — GBP, English, ships to GB
|
|
91
91
|
|
|
92
|
-
See the [Markets](
|
|
92
|
+
See the [Markets](markets.md) guide for details.
|
|
93
93
|
|
|
94
94
|
## Store Resources
|
|
95
95
|
|
|
@@ -97,21 +97,21 @@ Each store has its own set of resources. This means products, orders, and promot
|
|
|
97
97
|
|
|
98
98
|
| Resource | Relationship |
|
|
99
99
|
|----------|-------------|
|
|
100
|
-
| [**Markets**](
|
|
101
|
-
| [**Orders**](
|
|
102
|
-
| [**Products**](
|
|
103
|
-
| [**Payment Methods**](
|
|
104
|
-
| [**Shipping Methods**](
|
|
105
|
-
| [**Taxonomies**](
|
|
106
|
-
| [**Promotions**](
|
|
100
|
+
| [**Markets**](markets.md) | A store has many markets, each defining a geographic region with its own currency and locale |
|
|
101
|
+
| [**Orders**](orders.md) | An order belongs to one store |
|
|
102
|
+
| [**Products**](products.md) | A product can be available in multiple stores |
|
|
103
|
+
| [**Payment Methods**](payments.md) | A payment method can be available in multiple stores |
|
|
104
|
+
| [**Shipping Methods**](shipments.md) | A shipping method can be available in multiple stores |
|
|
105
|
+
| [**Taxonomies**](products.md#taxons-and-taxonomies) | A taxonomy belongs to one store |
|
|
106
|
+
| [**Promotions**](promotions.md) | A promotion can apply to multiple stores |
|
|
107
107
|
|
|
108
108
|
## Multi-Store Setup
|
|
109
109
|
|
|
110
|
-
To run multiple stores from a single Spree installation, see the [Multi-Store guide](
|
|
110
|
+
To run multiple stores from a single Spree installation, see the [Multi-Store guide](../multi-store/quickstart.md). Each store gets its own domain, branding, catalog, and checkout — while sharing the same admin dashboard and infrastructure.
|
|
111
111
|
|
|
112
112
|
## Related Documentation
|
|
113
113
|
|
|
114
|
-
- [Markets](
|
|
115
|
-
- [Products](
|
|
116
|
-
- [Orders](
|
|
117
|
-
- [Multi-Store](
|
|
114
|
+
- [Markets](markets.md) — Multi-region commerce within a store
|
|
115
|
+
- [Products](products.md) — Product catalog
|
|
116
|
+
- [Orders](orders.md) — Order management and checkout
|
|
117
|
+
- [Multi-Store](../multi-store/quickstart.md) — Running multiple stores
|
|
@@ -5,7 +5,7 @@ description: Tax categories, tax rates, zones, and how Spree calculates taxes at
|
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
7
7
|
|
|
8
|
-
Spree uses Tax Categories and Tax Rates to calculate taxes for orders. Products are assigned to tax categories, and tax rates define the percentage charged within specific geographic [Zones](
|
|
8
|
+
Spree uses Tax Categories and Tax Rates to calculate taxes for orders. Products are assigned to tax categories, and tax rates define the percentage charged within specific geographic [Zones](addresses.md#zones).
|
|
9
9
|
|
|
10
10
|
```mermaid
|
|
11
11
|
erDiagram
|
|
@@ -35,9 +35,9 @@ erDiagram
|
|
|
35
35
|
|
|
36
36
|
**Key relationships:**
|
|
37
37
|
- **Tax Category** groups products for tax purposes (e.g., "Clothing", "Food", "Digital")
|
|
38
|
-
- **Tax Rate** defines the percentage and rules for a Tax Category within a [Zone](
|
|
38
|
+
- **Tax Rate** defines the percentage and rules for a Tax Category within a [Zone](addresses.md#zones)
|
|
39
39
|
- **Zone** defines geographic regions (countries or states) where taxes apply
|
|
40
|
-
- **[Adjustments](
|
|
40
|
+
- **[Adjustments](adjustments.md)** are created on orders/line items to apply taxes
|
|
41
41
|
|
|
42
42
|
## Tax Categories
|
|
43
43
|
|
|
@@ -86,7 +86,7 @@ Common in Europe and many other countries. The displayed price **already include
|
|
|
86
86
|
- Displayed price: **£17.99** (includes £0.86 VAT)
|
|
87
87
|
- If shipped outside VAT zone: price reduces to **£17.13**
|
|
88
88
|
|
|
89
|
-
> **INFO:** The `tax_inclusive` setting on [Markets](
|
|
89
|
+
> **INFO:** The `tax_inclusive` setting on [Markets](markets.md) controls whether prices are displayed with or without tax for each geographic region.
|
|
90
90
|
|
|
91
91
|
## Default Tax Zone
|
|
92
92
|
|
|
@@ -98,12 +98,12 @@ If the customer's shipping address is outside the default tax zone, the assumed
|
|
|
98
98
|
|
|
99
99
|
During checkout, taxes are calculated based on the shipping address:
|
|
100
100
|
|
|
101
|
-
1. The customer's shipping address determines their [Zone](
|
|
101
|
+
1. The customer's shipping address determines their [Zone](addresses.md#zones)
|
|
102
102
|
2. Spree finds matching tax rates for that zone and the product's tax category
|
|
103
|
-
3. Tax [Adjustments](
|
|
103
|
+
3. Tax [Adjustments](adjustments.md) are created on line items
|
|
104
104
|
4. The order total is updated
|
|
105
105
|
|
|
106
|
-
> **NOTE:** For complex tax requirements (interstate US sales, international VAT), consider using automated tax calculation. The [Stripe Tax integration](
|
|
106
|
+
> **NOTE:** For complex tax requirements (interstate US sales, international VAT), consider using automated tax calculation. The [Stripe Tax integration](../../integrations/payments/stripe.md) handles this automatically.
|
|
107
107
|
|
|
108
108
|
## Managing Taxes
|
|
109
109
|
|
|
@@ -129,7 +129,7 @@ Tax categories and rates are managed in the Admin Panel under **Settings → Tax
|
|
|
129
129
|
|
|
130
130
|
## Related Documentation
|
|
131
131
|
|
|
132
|
-
- [Markets](
|
|
133
|
-
- [Addresses](
|
|
134
|
-
- [Adjustments](
|
|
135
|
-
- [Orders](
|
|
132
|
+
- [Markets](markets.md) — Tax-inclusive pricing per market
|
|
133
|
+
- [Addresses](addresses.md) — Zones and address-based taxation
|
|
134
|
+
- [Adjustments](adjustments.md) — Tax adjustments
|
|
135
|
+
- [Orders](orders.md) — How taxes affect order totals
|
|
@@ -10,7 +10,7 @@ Spree supports two types of translations:
|
|
|
10
10
|
1. **Resource Translations** — translatable content fields on models like Products, Taxons, and Stores (e.g., product name, description, slug)
|
|
11
11
|
2. **UI Translations** — interface strings used in the admin panel (e.g., button labels, flash messages)
|
|
12
12
|
|
|
13
|
-
For configuring which locales and currencies are available in your store, see [Markets](
|
|
13
|
+
For configuring which locales and currencies are available in your store, see [Markets](markets.md). Markets control locale and currency assignment per geographic region.
|
|
14
14
|
|
|
15
15
|
## Resource Translations
|
|
16
16
|
|
|
@@ -90,7 +90,7 @@ curl 'https://api.mystore.com/api/v3/store/products/spree-tote' \
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
Slugs are also localized — a product can have different slugs per locale. See [Slugs](
|
|
93
|
+
Slugs are also localized — a product can have different slugs per locale. See [Slugs](slugs.md#internationalization) for details.
|
|
94
94
|
|
|
95
95
|
### Managing Translations
|
|
96
96
|
|
|
@@ -114,7 +114,7 @@ Once installed, all translation files are available automatically — no need to
|
|
|
114
114
|
|
|
115
115
|
## Related Documentation
|
|
116
116
|
|
|
117
|
-
- [Markets](
|
|
118
|
-
- [Slugs](
|
|
119
|
-
- [Stores](
|
|
120
|
-
- [Products](
|
|
117
|
+
- [Markets](markets.md) — Locale and currency configuration per geographic region
|
|
118
|
+
- [Slugs](slugs.md) — Localized slugs and URL identifiers
|
|
119
|
+
- [Stores](stores.md) — Multi-store setup
|
|
120
|
+
- [Products](products.md) — Product translations
|
|
@@ -15,7 +15,7 @@ Spree has two separate user types:
|
|
|
15
15
|
| Customers | `Spree.user_class` | `Spree::User` |
|
|
16
16
|
| Admins | `Spree.admin_user_class` | `Spree::AdminUser` |
|
|
17
17
|
|
|
18
|
-
> **INFO:** You can use your own user classes. See the [Customize Authentication guide](
|
|
18
|
+
> **INFO:** You can use your own user classes. See the [Customize Authentication guide](../customization/authentication.md) for details.
|
|
19
19
|
|
|
20
20
|
## Customers
|
|
21
21
|
|
|
@@ -166,8 +166,8 @@ Authenticated customers have access to these resources:
|
|
|
166
166
|
|
|
167
167
|
| Resource | Description |
|
|
168
168
|
|----------|-------------|
|
|
169
|
-
| [**Addresses**](
|
|
170
|
-
| [**Orders**](
|
|
169
|
+
| [**Addresses**](addresses.md#customer-address-book) | Billing and shipping addresses with default selection |
|
|
170
|
+
| [**Orders**](orders.md#order-history) | Past order history |
|
|
171
171
|
| **Credit Cards** | Saved credit cards for checkout |
|
|
172
172
|
| **Payment Sources** | Other saved payment methods (PayPal, Klarna, etc.) |
|
|
173
173
|
| **Store Credits** | Balance assigned by the store, usable at checkout |
|
|
@@ -176,7 +176,7 @@ Authenticated customers have access to these resources:
|
|
|
176
176
|
|
|
177
177
|
### Guest Checkout
|
|
178
178
|
|
|
179
|
-
Customers don't need to register to purchase. Guest checkout uses an order token (`X-Spree-Token`) to identify the cart. See [Orders — Cart](
|
|
179
|
+
Customers don't need to register to purchase. Guest checkout uses an order token (`X-Spree-Token`) to identify the cart. See [Orders — Cart](orders.md#cart) for details.
|
|
180
180
|
|
|
181
181
|
## Admin Users
|
|
182
182
|
|
|
@@ -220,7 +220,7 @@ Admin users can have different roles that control their permissions:
|
|
|
220
220
|
|------|-------------|
|
|
221
221
|
| `admin` | Full access to all Admin Panel features |
|
|
222
222
|
|
|
223
|
-
> **INFO:** You can create custom roles with specific permissions. See the [Customize Permissions guide](
|
|
223
|
+
> **INFO:** You can create custom roles with specific permissions. See the [Customize Permissions guide](../customization/permissions.md) for details.
|
|
224
224
|
|
|
225
225
|
### Creating Admin Users
|
|
226
226
|
|
|
@@ -276,7 +276,7 @@ flowchart TB
|
|
|
276
276
|
|
|
277
277
|
#### Invitation Events
|
|
278
278
|
|
|
279
|
-
The invitation system publishes [events](
|
|
279
|
+
The invitation system publishes [events](events.md) you can subscribe to:
|
|
280
280
|
|
|
281
281
|
| Event | Description |
|
|
282
282
|
|-------|-------------|
|
|
@@ -288,12 +288,12 @@ The invitation system publishes [events](/developer/core-concepts/events) you ca
|
|
|
288
288
|
|
|
289
289
|
Spree uses [CanCanCan](https://github.com/CanCanCommunity/cancancan) for authorization. Permissions apply to both customers (Store API access) and admins (Admin Panel access).
|
|
290
290
|
|
|
291
|
-
See the [Customize Permissions guide](
|
|
291
|
+
See the [Customize Permissions guide](../customization/permissions.md) for details on creating custom roles and permission sets.
|
|
292
292
|
|
|
293
293
|
## Related Documentation
|
|
294
294
|
|
|
295
|
-
- [Addresses](
|
|
296
|
-
- [Orders](
|
|
297
|
-
- [Authentication](
|
|
298
|
-
- [Permissions](
|
|
299
|
-
- [Events](
|
|
295
|
+
- [Addresses](addresses.md) — Customer address management
|
|
296
|
+
- [Orders](orders.md) — Order history and checkout
|
|
297
|
+
- [Authentication](../customization/authentication.md) — Custom authentication setup
|
|
298
|
+
- [Permissions](../customization/permissions.md) — Roles and authorization
|
|
299
|
+
- [Events](events.md) — Subscribe to user and invitation events
|
|
@@ -7,7 +7,7 @@ description: Send real-time HTTP notifications to external services when events
|
|
|
7
7
|
|
|
8
8
|
Webhooks allow your Spree store to send real-time HTTP POST notifications to external services when events occur. When an order is completed, a product is updated, or inventory changes, Spree can automatically notify your CRM, fulfillment service, analytics platform, or any other system.
|
|
9
9
|
|
|
10
|
-
Webhooks are built on top of Spree's [event system](
|
|
10
|
+
Webhooks are built on top of Spree's [event system](events.md), providing:
|
|
11
11
|
|
|
12
12
|
- **Multi-store support** - Each store has its own webhook endpoints
|
|
13
13
|
- **Event filtering** - Subscribe to specific events or patterns with wildcards
|
|
@@ -113,7 +113,7 @@ endpoint.subscriptions = ['*'] # All events (explicit)
|
|
|
113
113
|
|
|
114
114
|
## Webhook Payload
|
|
115
115
|
|
|
116
|
-
Each webhook delivery sends a JSON payload with the following structure. The `data` object uses the same [Store API V3 serializers](
|
|
116
|
+
Each webhook delivery sends a JSON payload with the following structure. The `data` object uses the same [Store API V3 serializers](../../api-reference/introduction.md) as the REST API, so webhook payloads and API responses share the same schema:
|
|
117
117
|
|
|
118
118
|
```json
|
|
119
119
|
{
|
|
@@ -143,10 +143,10 @@ Each webhook delivery sends a JSON payload with the following structure. The `da
|
|
|
143
143
|
| `id` | Unique UUID for this event |
|
|
144
144
|
| `name` | Event name (e.g., `order.completed`) |
|
|
145
145
|
| `created_at` | ISO8601 timestamp when event occurred |
|
|
146
|
-
| `data` | Serialized resource data (V3 API format with [prefixed IDs](
|
|
146
|
+
| `data` | Serialized resource data (V3 API format with [prefixed IDs](../../api-reference/introduction.md)) |
|
|
147
147
|
| `metadata` | Additional context including Spree version |
|
|
148
148
|
|
|
149
|
-
For complete payload schemas for each event type, see [Webhook Events & Payloads](
|
|
149
|
+
For complete payload schemas for each event type, see [Webhook Events & Payloads](../../api-reference/webhooks-events.md).
|
|
150
150
|
|
|
151
151
|
## HTTP Request Details
|
|
152
152
|
|
|
@@ -276,7 +276,7 @@ Spree::Api::Config.webhooks_verify_ssl = false # Disable (not recommended for pr
|
|
|
276
276
|
|
|
277
277
|
## Available Events
|
|
278
278
|
|
|
279
|
-
Webhooks can subscribe to any event in Spree's event system. See [Events](
|
|
279
|
+
Webhooks can subscribe to any event in Spree's event system. See [Events](events.md#available-events) for a complete list.
|
|
280
280
|
|
|
281
281
|
Common webhook events include:
|
|
282
282
|
|
|
@@ -373,6 +373,6 @@ delivery.response_body # => Response from your endpoint
|
|
|
373
373
|
|
|
374
374
|
## Related Documentation
|
|
375
375
|
|
|
376
|
-
- [Events](
|
|
377
|
-
- [Customization Quickstart](
|
|
378
|
-
- [Dependencies](
|
|
376
|
+
- [Events](events.md) - Understanding Spree's event system
|
|
377
|
+
- [Customization Quickstart](../customization/quickstart.md) - Overview of all customization options
|
|
378
|
+
- [Dependencies](../customization/dependencies.md) - Customizing Spree services
|
|
@@ -91,11 +91,11 @@ This replaces `docker-compose.yml` with a version that builds from `backend/`, r
|
|
|
91
91
|
- **Configure Spree** in `backend/config/initializers/spree.rb`
|
|
92
92
|
- **Add migrations** with `cd backend && bin/rails generate migration`
|
|
93
93
|
|
|
94
|
-
See the [Customization Guide](
|
|
94
|
+
See the [Customization Guide](../customization.md) for more details.
|
|
95
95
|
|
|
96
96
|
### Spree CLI Commands
|
|
97
97
|
|
|
98
|
-
The project includes [@spree/cli](
|
|
98
|
+
The project includes [@spree/cli](../cli/quickstart.md) for managing your Spree backend:
|
|
99
99
|
|
|
100
100
|
| Command | Description |
|
|
101
101
|
|---------|-------------|
|
|
@@ -152,7 +152,7 @@ SPREE_VERSION_TAG=5.4
|
|
|
152
152
|
## Next Steps
|
|
153
153
|
|
|
154
154
|
|
|
155
|
-
- [Next.js Storefront](
|
|
156
|
-
- [Spree SDK](
|
|
155
|
+
- [Next.js Storefront](../storefront/nextjs/quickstart.md) — Customize and extend the Storefront
|
|
156
|
+
- [Spree SDK](../sdk/quickstart.md) — TypeScript SDK for the Store and Admin APIs
|
|
157
157
|
- [API Reference](/api-reference) — Explore the REST API endpoints
|
|
158
|
-
- [Core Concepts](
|
|
158
|
+
- [Core Concepts](../core-concepts/architecture.md) — Learn about Spree's architecture
|
|
@@ -32,7 +32,7 @@ You can easily replace existing Spree serializers with your own thanks to [Spree
|
|
|
32
32
|
|
|
33
33
|
### Adding custom attributes
|
|
34
34
|
|
|
35
|
-
> **NOTE:** As a rule of thumb it's recommended to use [Properties](
|
|
35
|
+
> **NOTE:** As a rule of thumb it's recommended to use [Properties](../core-concepts/products.md#product-properties) and [OptionTypes/Option Values](../core-concepts/products.md#option-types-and-option-values) for custom attributes and not to modify the Spree database schema
|
|
36
36
|
|
|
37
37
|
Let's say you want to customize the Storefront API's [Product serializer](https://github.com/spree/spree/blob/main/api/app/serializers/spree/v2/storefront/product_serializer.rb) to include you custom database column `my_newcustom_attribute` that you've added to the `spree_products` database table.
|
|
38
38
|
|
|
@@ -58,7 +58,7 @@ Now let's tell Spree to use this new serializer, in `config/initializers/spree.r
|
|
|
58
58
|
Spree::Api::Dependencies.storefront_product_serializer = 'MyProductSerializer'
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Restart the webserver and hit the [Products API](
|
|
61
|
+
Restart the webserver and hit the [Products API](../../api-reference/storefront/products/list-all-products.md) to notice that the payload now includes your new attribute.
|
|
62
62
|
|
|
63
63
|
### Adding a new association
|
|
64
64
|
|
|
@@ -4,7 +4,7 @@ description: Learn how to use a custom authentication setup with Spree
|
|
|
4
4
|
version: v5
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
If you installed Spree following the [Quickstart guide](
|
|
7
|
+
If you installed Spree following the [Quickstart guide](../quickstart.md), you can completely skip this step - you are all set and integrated with the [Devise](https://github.com/plataformatec/devise) gem.
|
|
8
8
|
|
|
9
9
|
However if you're adding Spree to an existing application that has its own authentication system, you will need to follow these steps.
|
|
10
10
|
|
|
@@ -85,4 +85,4 @@ end
|
|
|
85
85
|
|
|
86
86
|
## Admin Panel authentication
|
|
87
87
|
|
|
88
|
-
Please refer to the [Admin Panel Authentication](
|
|
88
|
+
Please refer to the [Admin Panel Authentication](../admin/authentication.md) page for more details.
|