@spree/docs 0.1.0 → 0.1.1
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 +10576 -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 +4 -4
- 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 @@ Storefront API requires authorization only for certain actions associated with u
|
|
|
9
9
|
|
|
10
10
|
### Using X-Spree-Order-Token header
|
|
11
11
|
|
|
12
|
-
[Cart](
|
|
12
|
+
[Cart](cart.md) and [Checkout](checkout.md) endpoints paths also allow interactions without the bearer token to allow creating and managing guest checkouts.
|
|
13
13
|
|
|
14
14
|
When you first create a cart via:
|
|
15
15
|
|
|
@@ -39,7 +39,7 @@ You can store this token in the frontend session (eg. Session Storage or a cooki
|
|
|
39
39
|
|
|
40
40
|
## For signed in users
|
|
41
41
|
|
|
42
|
-
For users who have an account in your store, you will need to generate oAuth tokens to authenticate requests to endpoints such as [Account](
|
|
42
|
+
For users who have an account in your store, you will need to generate oAuth tokens to authenticate requests to endpoints such as [Account](account.md), [Cart](cart.md) and [Checkout](checkout.md).
|
|
43
43
|
|
|
44
44
|
### Generating OAuth token
|
|
45
45
|
|
|
@@ -15,7 +15,7 @@ This doc will be referring to the library version as YOUR_VERSION.
|
|
|
15
15
|
## Resources
|
|
16
16
|
|
|
17
17
|
- [Official Adyen Documentation for Android integration](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=Android&integration=Drop-in&version=5.13.1)
|
|
18
|
-
- Spree Adyen API docs - [create payment_session](
|
|
18
|
+
- Spree Adyen API docs - [create payment_session](../storefront/adyen/create-an-adyen-payment-session.md) and [get payment_session](../storefront/adyen/get-adyen-payment-session.md)
|
|
19
19
|
- [Official Adyen example for Android integration](https://github.com/adyen-examples/adyen-android-online-payments)
|
|
20
20
|
|
|
21
21
|
## Overview
|
|
@@ -43,7 +43,7 @@ implementation "com.adyen.checkout:drop-in:YOUR_VERSION"
|
|
|
43
43
|
|
|
44
44
|
## Step 2: Create a checkout session
|
|
45
45
|
|
|
46
|
-
Create session using [this endpoint](
|
|
46
|
+
Create session using [this endpoint](../storefront/adyen/create-an-adyen-payment-session.md).
|
|
47
47
|
|
|
48
48
|
```kotlin
|
|
49
49
|
val sessionModel = SessionModel.SERIALIZER.deserialize(sessionsResponseJSON)
|
|
@@ -27,7 +27,7 @@ Current newest version available at the moment of writing the tutorial is 5.19.2
|
|
|
27
27
|
## Resources
|
|
28
28
|
|
|
29
29
|
- [Official Adyen Documentation for iOS integration](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=iOS&integration=Drop-in&version=5.19.2)
|
|
30
|
-
- Spree Adyen API docs - [create payment_session](
|
|
30
|
+
- Spree Adyen API docs - [create payment_session](../storefront/adyen/create-an-adyen-payment-session.md) and [get payment_session](../storefront/adyen/get-adyen-payment-session.md)
|
|
31
31
|
- [Official Adyen example for iOS integration](https://github.com/Adyen/adyen-ios/tree/develop/Demo)
|
|
32
32
|
- Apple Developer documentation on [defining custom url scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app)
|
|
33
33
|
|
|
@@ -68,7 +68,7 @@ let adyenContext = AdyenContext(apiContext: apiContext, payment:payment)
|
|
|
68
68
|
|
|
69
69
|
## Step 3: Create and set up session
|
|
70
70
|
|
|
71
|
-
Create a session using [payment_session endpoint](
|
|
71
|
+
Create a session using [payment_session endpoint](../storefront/adyen/create-an-adyen-payment-session.md).
|
|
72
72
|
Then set a configuration using data from the response:
|
|
73
73
|
|
|
74
74
|
```swift
|
|
@@ -72,14 +72,14 @@ Here we need to send some basic information about the customer's shipping addres
|
|
|
72
72
|
|
|
73
73
|
- **`bill_address_id`** (`string`) — Set it to `CLEAR` to clear the existing billing address (this prevents the order from accidentally advancing to the `payment` step).
|
|
74
74
|
|
|
75
|
-
[Full documentation](
|
|
75
|
+
[Full documentation](../storefront/checkout/update-checkout.md)
|
|
76
76
|
|
|
77
77
|
</details>
|
|
78
78
|
|
|
79
79
|
<details>
|
|
80
80
|
<summary>Move the order to the delivery step</summary>
|
|
81
81
|
|
|
82
|
-
[Endpoint documentation](
|
|
82
|
+
[Endpoint documentation](../storefront/checkout-state/advance-checkout.md)
|
|
83
83
|
|
|
84
84
|
```bash Advance order to the delivery step
|
|
85
85
|
curl -X PATCH '<SHOP URL>/api/v2/storefront/checkout/advance?state=delivery&include=shipments.shipping_rates' \
|
|
@@ -104,7 +104,7 @@ This will return you an order response, and you can update the payment element w
|
|
|
104
104
|
|
|
105
105
|
Here we need to send the selected shipping method to the backend and update the total in the payment element
|
|
106
106
|
|
|
107
|
-
[Endpoint documentation](
|
|
107
|
+
[Endpoint documentation](../storefront/checkout-shipments/selects-shipping-method-for-shipments.md)
|
|
108
108
|
|
|
109
109
|
```bash Select shipping method
|
|
110
110
|
curl -X PATCH '<SHOP URL>/api/v2/storefront/checkout/select_shipping_method' \
|
|
@@ -132,7 +132,7 @@ Now you should make several more calls to the backend
|
|
|
132
132
|
```
|
|
133
133
|
> **INFO:** `200` response code means that the order is ready for the payment.
|
|
134
134
|
|
|
135
|
-
[Endpoint documentation](
|
|
135
|
+
[Endpoint documentation](../storefront/checkout/validate-order-payment.md)
|
|
136
136
|
|
|
137
137
|
</details>
|
|
138
138
|
|
|
@@ -141,7 +141,7 @@ Now you should make several more calls to the backend
|
|
|
141
141
|
|
|
142
142
|
You should have a lot more information about the customer (in previous events, Stripe probably will not provide you information such as customer address), so send them to the backend:
|
|
143
143
|
|
|
144
|
-
[Endpoint documentation](
|
|
144
|
+
[Endpoint documentation](../storefront/checkout/update-checkout.md)
|
|
145
145
|
|
|
146
146
|
```bash Update the order [expandable]
|
|
147
147
|
curl -X PATCH <SHOP URL>/api/v2/storefront/checkout \
|
|
@@ -194,7 +194,7 @@ You should have a lot more information about the customer (in previous events, S
|
|
|
194
194
|
<details>
|
|
195
195
|
<summary>Move the order to the payment step</summary>
|
|
196
196
|
|
|
197
|
-
[Endpoint documentation](
|
|
197
|
+
[Endpoint documentation](../storefront/checkout-state/advance-checkout.md)
|
|
198
198
|
```bash Move the order to the payment step
|
|
199
199
|
curl -X PATCH '<SHOP URL>/api/v2/storefront/checkout/advance?state=payment' \
|
|
200
200
|
-H 'Authorization: Bearer <Token>' \
|
|
@@ -221,7 +221,7 @@ curl -X POST <SHOP URL>/api/v2/storefront/stripe/payment_intents/<PAYMENT INTENT
|
|
|
221
221
|
-H 'Authorization: Bearer <Token>'
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
[Endpoint documentation](
|
|
224
|
+
[Endpoint documentation](../storefront/stripe/mark-the-payment-intent-as-confirmed-and-move-the-order-to-the-complete-state.md)
|
|
225
225
|
|
|
226
226
|
This will also check if the payment intent is confirmed, and it will move the order to the complete state
|
|
227
227
|
|
|
@@ -241,7 +241,7 @@ curl -X PATCH <SHOP URL>/api/v2/storefront/checkout \
|
|
|
241
241
|
}'
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
[Endpoint documentation](
|
|
244
|
+
[Endpoint documentation](../storefront/checkout/update-checkout.md)
|
|
245
245
|
|
|
246
246
|
### All Done!
|
|
247
247
|
|
|
@@ -10,9 +10,9 @@ Spree Commerce open-source comes with a fully-featured Ecommerce API enabling a
|
|
|
10
10
|
Currently Spree includes 2 modern REST APIs:
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
- [Storefront API](
|
|
13
|
+
- [Storefront API](../storefront/authentication.md) — Designed to allow customers to interact with the store via external applications (e.g. Next.js storefront or a dedicated mobile app)
|
|
14
14
|
|
|
15
|
-
- [Platform API](
|
|
15
|
+
- [Platform API](../platform/authentication.md) — Provides management capabilities, allowing third party apps to perform actions otherwise available via the admin panel.
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
## Thank you!
|
|
@@ -25,9 +25,9 @@ Every webhook delivery sends a JSON envelope with the event metadata and a `data
|
|
|
25
25
|
| `data` | object | Serialized resource (see payloads below) |
|
|
26
26
|
| `metadata` | object | Additional context including Spree version |
|
|
27
27
|
|
|
28
|
-
Event payloads use the same [Store API V3 serializers](
|
|
28
|
+
Event payloads use the same [Store API V3 serializers](introduction.md) as the REST API. All `id` fields use [prefixed IDs](introduction.md) (e.g., `or_m3Rp9wXz`, `prod_86Rf07xd4z`). All monetary values are strings. All timestamps are ISO 8601.
|
|
29
29
|
|
|
30
|
-
For details on creating webhook endpoints and verifying signatures, see [Webhooks](
|
|
30
|
+
For details on creating webhook endpoints and verifying signatures, see [Webhooks](../developer/core-concepts/webhooks.md). For the event system internals and subscriber pattern, see [Events](../developer/core-concepts/events.md).
|
|
31
31
|
|
|
32
32
|
> **INFO:** Event payloads include the same top-level attributes and unconditional associations as API responses. Conditional associations (like product variants, images, or metafields) are not included in event payloads.
|
|
33
33
|
|
|
@@ -24,10 +24,10 @@ The Admin Dashboard allows store administrators to manage:
|
|
|
24
24
|
As a developer, you can fully customize the Admin Dashboard:
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
- [Add New Sections](
|
|
28
|
-
- [Extend Existing UI](
|
|
29
|
-
- [Custom Navigation](
|
|
30
|
-
- [Custom Styling](
|
|
27
|
+
- [Add New Sections](../tutorial/admin.md) — Create entirely new admin pages for custom features like Brands, Vendors, or any custom model
|
|
28
|
+
- [Extend Existing UI](extending-ui.md) — Inject custom fields, buttons, and sections into existing admin pages
|
|
29
|
+
- [Custom Navigation](navigation.md) — Add menu items to the sidebar or create custom navigation structures
|
|
30
|
+
- [Custom Styling](custom-css.md) — Add your own CSS to match your brand or modify the look and feel
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
## Architecture Overview
|
|
@@ -79,11 +79,11 @@ module Spree
|
|
|
79
79
|
end
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
> **INFO:** Learn more about creating admin sections in the [Admin Dashboard Tutorial](
|
|
82
|
+
> **INFO:** Learn more about creating admin sections in the [Admin Dashboard Tutorial](../tutorial/admin.md).
|
|
83
83
|
|
|
84
84
|
### Views & Templates
|
|
85
85
|
|
|
86
|
-
Views use standard Rails ERB templates with Spree's [Form Builder](
|
|
86
|
+
Views use standard Rails ERB templates with Spree's [Form Builder](form-builder.md) and [Components](components.md):
|
|
87
87
|
|
|
88
88
|
```erb
|
|
89
89
|
<%# app/views/spree/admin/brands/_form.html.erb %>
|
|
@@ -117,7 +117,7 @@ Spree Admin uses [Hotwire](https://hotwire.dev/) (Turbo + Stimulus) for interact
|
|
|
117
117
|
</div>
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
> **INFO:** Add custom JavaScript using [Stimulus controllers](
|
|
120
|
+
> **INFO:** Add custom JavaScript using [Stimulus controllers](custom-javascript.md).
|
|
121
121
|
|
|
122
122
|
### Styling
|
|
123
123
|
|
|
@@ -135,7 +135,7 @@ The Admin Dashboard uses [Tailwind CSS v4](https://tailwindcss.com/) for styling
|
|
|
135
135
|
</div>
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
> **INFO:** Learn how to customize styles in [Custom CSS](
|
|
138
|
+
> **INFO:** Learn how to customize styles in [Custom CSS](custom-css.md).
|
|
139
139
|
|
|
140
140
|
## Quick Reference
|
|
141
141
|
|
|
@@ -143,10 +143,10 @@ The Admin Dashboard uses [Tailwind CSS v4](https://tailwindcss.com/) for styling
|
|
|
143
143
|
|
|
144
144
|
| Tool | Purpose | Documentation |
|
|
145
145
|
|------|---------|---------------|
|
|
146
|
-
| Form Builder | Create consistent forms with validation | [Form Builder](
|
|
147
|
-
| Components | Dropdowns, dialogs, icons, badges, etc. | [Components](
|
|
148
|
-
| Helper Methods | Navigation, links, utilities | [Helper Methods](
|
|
149
|
-
| UI Extensions | Inject content into existing pages | [Extending UI](
|
|
146
|
+
| Form Builder | Create consistent forms with validation | [Form Builder](form-builder.md) |
|
|
147
|
+
| Components | Dropdowns, dialogs, icons, badges, etc. | [Components](components.md) |
|
|
148
|
+
| Helper Methods | Navigation, links, utilities | [Helper Methods](helper-methods.md) |
|
|
149
|
+
| UI Extensions | Inject content into existing pages | [Extending UI](extending-ui.md) |
|
|
150
150
|
|
|
151
151
|
### Common Tasks
|
|
152
152
|
|
|
@@ -178,7 +178,7 @@ Admin users must be authenticated to access the dashboard. Spree supports:
|
|
|
178
178
|
- Custom authentication adapters
|
|
179
179
|
- SSO integration
|
|
180
180
|
|
|
181
|
-
> **INFO:** See [Authentication](
|
|
181
|
+
> **INFO:** See [Authentication](authentication.md) for setup details.
|
|
182
182
|
|
|
183
183
|
### Authorization
|
|
184
184
|
|
|
@@ -194,12 +194,12 @@ authorize! :update, @product
|
|
|
194
194
|
<% end %>
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
> **INFO:** See [Permissions](
|
|
197
|
+
> **INFO:** See [Permissions](../customization/permissions.md) for defining custom abilities.
|
|
198
198
|
|
|
199
199
|
## Next Steps
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
- [Tutorial: Build Admin UI](
|
|
203
|
-
- [Form Builder](
|
|
204
|
-
- [Components](
|
|
205
|
-
- [Extending UI](
|
|
202
|
+
- [Tutorial: Build Admin UI](../tutorial/admin.md) — Step-by-step guide to creating a complete admin section
|
|
203
|
+
- [Form Builder](form-builder.md) — Learn all available form field helpers
|
|
204
|
+
- [Components](components.md) — Explore UI components like dropdowns, dialogs, and icons
|
|
205
|
+
- [Extending UI](extending-ui.md) — Add custom content to existing admin pages
|
|
@@ -400,7 +400,7 @@ Displays optimized images with automatic WebP conversion and retina support.
|
|
|
400
400
|
<% end %>
|
|
401
401
|
```
|
|
402
402
|
|
|
403
|
-
> **INFO:** For comprehensive documentation on image handling, storage configuration, and best practices, see the [Media](
|
|
403
|
+
> **INFO:** For comprehensive documentation on image handling, storage configuration, and best practices, see the [Media](../core-concepts/media.md) guide.
|
|
404
404
|
|
|
405
405
|
## Tooltip
|
|
406
406
|
|
|
@@ -235,7 +235,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
235
235
|
|
|
236
236
|
#### Variables
|
|
237
237
|
|
|
238
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
238
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
239
239
|
|
|
240
240
|
Injects code into the orders list filters, to add custom filters.
|
|
241
241
|
This partial has access to the `f` variable, which is the form builder for the filters, eg.
|
|
@@ -244,7 +244,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
244
244
|
<%= f.spree_text_field :q_number_cont, data: { filters_target: :input } %>
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
> **TIP:** * `q_number_cont` - The name of the filter field. For filtering we're using [ransack](
|
|
247
|
+
> **TIP:** * `q_number_cont` - The name of the filter field. For filtering we're using [ransack](../core-concepts/search-filtering.md) gem, so the name of the filter field is the name of the attribute we're filtering by.
|
|
248
248
|
> * `data: { filters_target: :input }` - Needed for the [Stimulus Filters controller](https://github.com/spree/spree/blob/main/admin/app/javascript/spree/admin/controllers/filters_controller.js) to work.
|
|
249
249
|
|
|
250
250
|
</details>
|
|
@@ -414,7 +414,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
414
414
|
|
|
415
415
|
#### Variables
|
|
416
416
|
|
|
417
|
-
- **`f`** (`ActionView::Helpers::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
417
|
+
- **`f`** (`ActionView::Helpers::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
418
418
|
|
|
419
419
|
Injects code into the customers list filters. This partial has access to the `f` variable, which is the form builder for the filters.
|
|
420
420
|
|
|
@@ -422,7 +422,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
422
422
|
<%= f.spree_select :custom_field_eq, [["VIP", "vip"], ["Regular", "regular"]], { include_blank: true }, { data: { filters_target: :input } } %>
|
|
423
423
|
```
|
|
424
424
|
|
|
425
|
-
> **TIP:** * Use [ransack](
|
|
425
|
+
> **TIP:** * Use [ransack](../core-concepts/search-filtering.md) search syntax for filter field names
|
|
426
426
|
> * Include `data: { filters_target: :input }` for proper integration with the Stimulus Filters controller
|
|
427
427
|
|
|
428
428
|
</details>
|
|
@@ -467,7 +467,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
467
467
|
|
|
468
468
|
#### Variables
|
|
469
469
|
|
|
470
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
470
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
471
471
|
|
|
472
472
|
Injects code into the stock items list filters.
|
|
473
473
|
|
|
@@ -477,7 +477,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
477
477
|
data: { filters_target: :input } %>
|
|
478
478
|
```
|
|
479
479
|
|
|
480
|
-
> **TIP:** Use [ransack](
|
|
480
|
+
> **TIP:** Use [ransack](../core-concepts/search-filtering.md) search syntax for filter field names (e.g., `_lt` for "less than").
|
|
481
481
|
|
|
482
482
|
</details>
|
|
483
483
|
|
|
@@ -649,7 +649,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
649
649
|
|
|
650
650
|
#### Variables
|
|
651
651
|
|
|
652
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
652
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
653
653
|
|
|
654
654
|
Injects code into the customer returns list filters.
|
|
655
655
|
|
|
@@ -660,7 +660,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
660
660
|
{ data: { filters_target: :input } } %>
|
|
661
661
|
```
|
|
662
662
|
|
|
663
|
-
> **TIP:** Use [ransack](
|
|
663
|
+
> **TIP:** Use [ransack](../core-concepts/search-filtering.md) search syntax for filter field names (e.g., `_eq` for "equals").
|
|
664
664
|
|
|
665
665
|
</details>
|
|
666
666
|
|
|
@@ -768,7 +768,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
768
768
|
|
|
769
769
|
#### Variables
|
|
770
770
|
|
|
771
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
771
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
772
772
|
|
|
773
773
|
Injects code into the gift cards list filters.
|
|
774
774
|
|
|
@@ -779,7 +779,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
779
779
|
data: { filters_target: :input } %>
|
|
780
780
|
```
|
|
781
781
|
|
|
782
|
-
> **TIP:** Use [ransack](
|
|
782
|
+
> **TIP:** Use [ransack](../core-concepts/search-filtering.md) search syntax for filter field names (e.g., `_gt` for "greater than").
|
|
783
783
|
|
|
784
784
|
</details>
|
|
785
785
|
|
|
@@ -1015,7 +1015,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1015
1015
|
|
|
1016
1016
|
#### Variables
|
|
1017
1017
|
|
|
1018
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1018
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1019
1019
|
|
|
1020
1020
|
Injects code into the posts list filters.
|
|
1021
1021
|
|
|
@@ -1026,7 +1026,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1026
1026
|
{ data: { filters_target: :input } } %>
|
|
1027
1027
|
```
|
|
1028
1028
|
|
|
1029
|
-
> **TIP:** Use [ransack](
|
|
1029
|
+
> **TIP:** Use [ransack](../core-concepts/search-filtering.md) search syntax for filter field names.
|
|
1030
1030
|
|
|
1031
1031
|
</details>
|
|
1032
1032
|
|
|
@@ -1070,7 +1070,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1070
1070
|
|
|
1071
1071
|
#### Variables
|
|
1072
1072
|
|
|
1073
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1073
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1074
1074
|
|
|
1075
1075
|
Injects code into the promotions list filters.
|
|
1076
1076
|
|
|
@@ -1081,7 +1081,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1081
1081
|
{ data: { filters_target: :input } } %>
|
|
1082
1082
|
```
|
|
1083
1083
|
|
|
1084
|
-
> **TIP:** Use [ransack](
|
|
1084
|
+
> **TIP:** Use [ransack](../core-concepts/search-filtering.md) search syntax for filter field names.
|
|
1085
1085
|
|
|
1086
1086
|
</details>
|
|
1087
1087
|
|
|
@@ -1445,7 +1445,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1445
1445
|
|
|
1446
1446
|
#### Variables
|
|
1447
1447
|
|
|
1448
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1448
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1449
1449
|
|
|
1450
1450
|
Injects code into the stock transfers list filters.
|
|
1451
1451
|
|
|
@@ -1456,7 +1456,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1456
1456
|
{ data: { filters_target: :input } } %>
|
|
1457
1457
|
```
|
|
1458
1458
|
|
|
1459
|
-
> **TIP:** Use [ransack](
|
|
1459
|
+
> **TIP:** Use [ransack](../core-concepts/search-filtering.md) search syntax for filter field names.
|
|
1460
1460
|
|
|
1461
1461
|
</details>
|
|
1462
1462
|
|
|
@@ -1758,7 +1758,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1758
1758
|
|
|
1759
1759
|
#### Variables
|
|
1760
1760
|
|
|
1761
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1761
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1762
1762
|
|
|
1763
1763
|
Injects code into the products list filters. This partial has access to the `f` variable, which is the form builder for the filters.
|
|
1764
1764
|
|
|
@@ -1768,7 +1768,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1768
1768
|
<%= f.spree_text_field :q_name_cont, data: { filters_target: :input } %>
|
|
1769
1769
|
```
|
|
1770
1770
|
|
|
1771
|
-
> **TIP:** * `q_name_cont` is the name of the filter field. For filtering we're using [ransack](
|
|
1771
|
+
> **TIP:** * `q_name_cont` is the name of the filter field. For filtering we're using [ransack](../core-concepts/search-filtering.md) gem, so the name of the filter field is the name of the attribute we're filtering by.
|
|
1772
1772
|
> * `data: { filters_target: :input }` is needed for the [Stimulus Filters controller](https://github.com/spree/spree/blob/main/admin/app/javascript/spree/admin/controllers/filters_controller.js) to work.
|
|
1773
1773
|
|
|
1774
1774
|
</details>
|
|
@@ -1803,7 +1803,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1803
1803
|
|
|
1804
1804
|
#### Variables
|
|
1805
1805
|
|
|
1806
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1806
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1807
1807
|
|
|
1808
1808
|
- **`product`** (`Spree::Product`) — The [Spree::Product](https://github.com/spree/spree/blob/main/core/app/models/spree/product.rb) object.
|
|
1809
1809
|
|
|
@@ -1852,7 +1852,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1852
1852
|
|
|
1853
1853
|
#### Variables
|
|
1854
1854
|
|
|
1855
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1855
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1856
1856
|
|
|
1857
1857
|
- **`product`** (`Spree::Product`) — The [Spree::Product](https://github.com/spree/spree/blob/main/core/app/models/spree/product.rb) object.
|
|
1858
1858
|
|
|
@@ -1901,7 +1901,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1901
1901
|
|
|
1902
1902
|
#### Variables
|
|
1903
1903
|
|
|
1904
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1904
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1905
1905
|
|
|
1906
1906
|
- **`shipping_method`** (`Spree::ShippingMethod`) — The [Spree::ShippingMethod](https://github.com/spree/spree/blob/main/core/app/models/spree/shipping_method.rb) object.
|
|
1907
1907
|
|
|
@@ -1934,7 +1934,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1934
1934
|
|
|
1935
1935
|
#### Variables
|
|
1936
1936
|
|
|
1937
|
-
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](
|
|
1937
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](form-builder.md) object.
|
|
1938
1938
|
|
|
1939
1939
|
- **`store`** (`Spree::Store`) — The [Spree::Store](https://github.com/spree/spree/blob/main/core/app/models/spree/store.rb) object.
|
|
1940
1940
|
|
|
@@ -1958,7 +1958,7 @@ Here's a list of all places you can inject your custom code:
|
|
|
1958
1958
|
|
|
1959
1959
|
## Related Documentation
|
|
1960
1960
|
|
|
1961
|
-
- [Admin Navigation](
|
|
1962
|
-
- [Admin Tables](
|
|
1963
|
-
- [Form Builder](
|
|
1964
|
-
- [Customization Quickstart](
|
|
1961
|
+
- [Admin Navigation](navigation.md) - Add custom menu items to the admin
|
|
1962
|
+
- [Admin Tables](tables.md) - Customize admin list views
|
|
1963
|
+
- [Form Builder](form-builder.md) - Build admin forms with Spree's form helpers
|
|
1964
|
+
- [Customization Quickstart](../customization/quickstart.md) - Overview of all customization options
|
|
@@ -5,7 +5,7 @@ sidebarTitle: Helper Methods
|
|
|
5
5
|
|
|
6
6
|
Helper methods available in the Admin Dashboard for navigation, links, and utility functions.
|
|
7
7
|
|
|
8
|
-
> **INFO:** For UI components that render HTML elements (Dropdowns, Dialogs, Icons, etc.), see the [Components](
|
|
8
|
+
> **INFO:** For UI components that render HTML elements (Dropdowns, Dialogs, Icons, etc.), see the [Components](components.md) documentation.
|
|
9
9
|
|
|
10
10
|
## Navigation Helpers
|
|
11
11
|
|
|
@@ -488,7 +488,7 @@ Renders all registered partials for an injection point.
|
|
|
488
488
|
<%= render_admin_partials(:order_page_sidebar, order: @order) %>
|
|
489
489
|
```
|
|
490
490
|
|
|
491
|
-
See [Extending UI](
|
|
491
|
+
See [Extending UI](extending-ui.md) for more information about injection points.
|
|
492
492
|
|
|
493
493
|
## Preference Helpers
|
|
494
494
|
|
|
@@ -798,8 +798,8 @@ Register with:
|
|
|
798
798
|
|
|
799
799
|
### Related Documentation
|
|
800
800
|
|
|
801
|
-
- [Extending Admin UI](
|
|
802
|
-
- [Admin Tables](
|
|
803
|
-
- [Helper Methods](
|
|
804
|
-
- [Permissions](
|
|
805
|
-
- [Customization Quickstart](
|
|
801
|
+
- [Extending Admin UI](extending-ui.md) - Learn about other UI injection points
|
|
802
|
+
- [Admin Tables](tables.md) - Customize admin list views
|
|
803
|
+
- [Helper Methods](helper-methods.md) - Explore other admin helper methods
|
|
804
|
+
- [Permissions](../customization/permissions.md) - Understand the authorization system
|
|
805
|
+
- [Customization Quickstart](../customization/quickstart.md) - Overview of all customization options
|
|
@@ -485,7 +485,7 @@ Spree.admin.tables.products
|
|
|
485
485
|
|
|
486
486
|
## Related Documentation
|
|
487
487
|
|
|
488
|
-
- [Admin Navigation](
|
|
489
|
-
- [Extending Admin UI](
|
|
490
|
-
- [Search & Filtering](
|
|
491
|
-
- [Customization Quickstart](
|
|
488
|
+
- [Admin Navigation](navigation.md) - Add custom menu items to the admin
|
|
489
|
+
- [Extending Admin UI](extending-ui.md) - Inject partials into admin pages
|
|
490
|
+
- [Search & Filtering](../core-concepts/search-filtering.md) - Add searchable/filterable fields
|
|
491
|
+
- [Customization Quickstart](../customization/quickstart.md) - Overview of all customization options
|
|
@@ -4,7 +4,7 @@ sidebarTitle: Overview
|
|
|
4
4
|
description: Manage your Spree Commerce project from the command line.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
The Spree CLI (`@spree/cli`) manages Docker-based Spree projects created with [create-spree-app](
|
|
7
|
+
The Spree CLI (`@spree/cli`) manages Docker-based Spree projects created with [create-spree-app](../create-spree-app/quickstart.md).
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -72,7 +72,7 @@ spree eject
|
|
|
72
72
|
|
|
73
73
|
After ejecting, the Docker image is built from `backend/Dockerfile`. Edit files in `backend/` and run `spree dev` to rebuild and restart with your changes.
|
|
74
74
|
|
|
75
|
-
See [Customizing the Backend](
|
|
75
|
+
See [Customizing the Backend](../create-spree-app/quickstart.md#customizing-the-backend) for details on what you can customize.
|
|
76
76
|
|
|
77
77
|
### `spree logs`
|
|
78
78
|
|
|
@@ -5,9 +5,9 @@ description: Learn how to create a Spree extension.
|
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
7
7
|
|
|
8
|
-
[Spree Extensions](
|
|
8
|
+
[Spree Extensions](../customization/extensions.md) are a way to add new functionality to your Spree store. They are a great way to extend the functionality of Spree and add new features. You can share them with Spree community on Github so anyone can use them, contribute back and share your improvements.
|
|
9
9
|
|
|
10
|
-
> **INFO:** This tutorial uses decorators for extending Spree models. For extensions that need to react to events (sync with external services, send notifications, etc.), consider using [Events subscribers](
|
|
10
|
+
> **INFO:** This tutorial uses decorators for extending Spree models. For extensions that need to react to events (sync with external services, send notifications, etc.), consider using [Events subscribers](../core-concepts/events.md) instead - they're easier to test and maintain. See [Customization Quickstart](../customization/quickstart.md) for guidance on choosing the right approach.
|
|
11
11
|
|
|
12
12
|
## Getting Started
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ cd spree_simple_sales
|
|
|
27
27
|
|
|
28
28
|
## Adding a Sale Price to Variants
|
|
29
29
|
|
|
30
|
-
The first thing we need to do is create a migration that adds a sale_price column to [variants](
|
|
30
|
+
The first thing we need to do is create a migration that adds a sale_price column to [variants](../core-concepts/products.md#variants).
|
|
31
31
|
|
|
32
32
|
We can do this with the following command:
|
|
33
33
|
|
|
@@ -227,11 +227,11 @@ While this tutorial uses decorators to extend Spree's core behavior, modern Spre
|
|
|
227
227
|
| Use Case | Recommended Approach |
|
|
228
228
|
|----------|---------------------|
|
|
229
229
|
| Structural changes (associations, validations) | Decorators (as shown in this tutorial) |
|
|
230
|
-
| React to model changes | [Events subscribers](
|
|
231
|
-
| External service integration | [Webhooks](
|
|
232
|
-
| Replace core services | [Dependencies injection](
|
|
233
|
-
| Add admin UI elements | [Admin Partials](
|
|
234
|
-
| Add admin menu items | [Admin Navigation](
|
|
230
|
+
| React to model changes | [Events subscribers](../core-concepts/events.md) |
|
|
231
|
+
| External service integration | [Webhooks](../core-concepts/webhooks.md) |
|
|
232
|
+
| Replace core services | [Dependencies injection](../customization/dependencies.md) |
|
|
233
|
+
| Add admin UI elements | [Admin Partials](../admin/extending-ui.md) |
|
|
234
|
+
| Add admin menu items | [Admin Navigation](../admin/navigation.md) |
|
|
235
235
|
|
|
236
236
|
For example, if your extension needs to sync data with an external service when products are updated, use an Events subscriber instead of a decorator callback:
|
|
237
237
|
|
|
@@ -252,7 +252,7 @@ end
|
|
|
252
252
|
|
|
253
253
|
## Related Documentation
|
|
254
254
|
|
|
255
|
-
- [Events](
|
|
256
|
-
- [Webhooks](
|
|
257
|
-
- [Dependencies](
|
|
258
|
-
- [Customization Quickstart](
|
|
255
|
+
- [Events](../core-concepts/events.md) - Subscribe to Spree events
|
|
256
|
+
- [Webhooks](../core-concepts/webhooks.md) - HTTP callbacks for external integrations
|
|
257
|
+
- [Dependencies](../customization/dependencies.md) - Replace core services
|
|
258
|
+
- [Customization Quickstart](../customization/quickstart.md) - Choose the right approach
|
|
@@ -21,7 +21,7 @@ To find issues you can tackle on we recommend visiting [Spree Contribute page](h
|
|
|
21
21
|
|
|
22
22
|
## Creating a Spree extension
|
|
23
23
|
|
|
24
|
-
Extensions provide additional features and integrations for your Spree store. You can create your own and share with the rest of the community. Before doing so please check our [Extension directory](
|
|
24
|
+
Extensions provide additional features and integrations for your Spree store. You can create your own and share with the rest of the community. Before doing so please check our [Extension directory](../customization/extensions.md) if your desired extension does not exist already. If not [follow Extensions tutorial](../contributing/extensions_tutorial) to learn how to create one.
|
|
25
25
|
|
|
26
26
|
## Helping others on Spree slack
|
|
27
27
|
|