@spree/docs 0.1.0
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/README.md +54 -0
- package/dist/api-reference/platform/authentication.md +38 -0
- package/dist/api-reference/store-api/authentication.md +188 -0
- package/dist/api-reference/store-api/errors.md +277 -0
- package/dist/api-reference/store-api/idempotency.md +129 -0
- package/dist/api-reference/store-api/introduction.md +34 -0
- package/dist/api-reference/store-api/localization.md +279 -0
- package/dist/api-reference/store-api/metadata.md +160 -0
- package/dist/api-reference/store-api/monetary-amounts.md +65 -0
- package/dist/api-reference/store-api/querying.md +399 -0
- package/dist/api-reference/store-api/rate-limitting.md +103 -0
- package/dist/api-reference/store-api/relations.md +185 -0
- package/dist/api-reference/storefront/authentication.md +88 -0
- package/dist/api-reference/tutorials/adyen-integration-guide-for-android.md +165 -0
- package/dist/api-reference/tutorials/adyen-integration-guide-for-ios.md +194 -0
- package/dist/api-reference/tutorials/quick-checkout-with-stripe.md +248 -0
- package/dist/api-reference/v2/fetching-multiple-resources.md +26 -0
- package/dist/api-reference/v2/filtering-and-sorting.md +53 -0
- package/dist/api-reference/v2/introduction.md +22 -0
- package/dist/api-reference/v2/pagination.md +37 -0
- package/dist/api-reference/webhooks-events.md +883 -0
- package/dist/developer/admin/admin.md +205 -0
- package/dist/developer/admin/authentication.md +59 -0
- package/dist/developer/admin/components.md +711 -0
- package/dist/developer/admin/custom-css.md +243 -0
- package/dist/developer/admin/custom-javascript.md +116 -0
- package/dist/developer/admin/extending-ui.md +1964 -0
- package/dist/developer/admin/form-builder.md +444 -0
- package/dist/developer/admin/helper-methods.md +531 -0
- package/dist/developer/admin/navigation.md +805 -0
- package/dist/developer/admin/tables.md +491 -0
- package/dist/developer/advanced/adding_spree_to_rails_app.md +106 -0
- package/dist/developer/cli/quickstart.md +137 -0
- package/dist/developer/contributing/creating-an-extension.md +258 -0
- package/dist/developer/contributing/developing-spree.md +339 -0
- package/dist/developer/contributing/quickstart.md +32 -0
- package/dist/developer/contributing/updating-extensions.md +67 -0
- package/dist/developer/core-concepts/addresses.md +265 -0
- package/dist/developer/core-concepts/adjustments.md +107 -0
- package/dist/developer/core-concepts/architecture.md +177 -0
- package/dist/developer/core-concepts/calculators.md +323 -0
- package/dist/developer/core-concepts/customers.md +230 -0
- package/dist/developer/core-concepts/events.md +624 -0
- package/dist/developer/core-concepts/imports-exports.md +698 -0
- package/dist/developer/core-concepts/inventory.md +191 -0
- package/dist/developer/core-concepts/markets.md +250 -0
- package/dist/developer/core-concepts/media.md +167 -0
- package/dist/developer/core-concepts/metafields.md +187 -0
- package/dist/developer/core-concepts/orders.md +328 -0
- package/dist/developer/core-concepts/payments.md +710 -0
- package/dist/developer/core-concepts/pricing.md +163 -0
- package/dist/developer/core-concepts/products.md +360 -0
- package/dist/developer/core-concepts/promotions.md +322 -0
- package/dist/developer/core-concepts/reports.md +206 -0
- package/dist/developer/core-concepts/search-filtering.md +237 -0
- package/dist/developer/core-concepts/shipments.md +212 -0
- package/dist/developer/core-concepts/slugs.md +111 -0
- package/dist/developer/core-concepts/staff-roles.md +123 -0
- package/dist/developer/core-concepts/store-credits-gift-cards.md +317 -0
- package/dist/developer/core-concepts/stores.md +117 -0
- package/dist/developer/core-concepts/taxes.md +135 -0
- package/dist/developer/core-concepts/translations.md +120 -0
- package/dist/developer/core-concepts/users.md +299 -0
- package/dist/developer/core-concepts/webhooks.md +378 -0
- package/dist/developer/create-spree-app/quickstart.md +158 -0
- package/dist/developer/customization/api.md +93 -0
- package/dist/developer/customization/authentication.md +88 -0
- package/dist/developer/customization/checkout.md +204 -0
- package/dist/developer/customization/configuration.md +55 -0
- package/dist/developer/customization/decorators.md +523 -0
- package/dist/developer/customization/dependencies.md +232 -0
- package/dist/developer/customization/emails.md +21 -0
- package/dist/developer/customization/extensions.md +92 -0
- package/dist/developer/customization/metadata.md +236 -0
- package/dist/developer/customization/model-preferences.md +130 -0
- package/dist/developer/customization/permissions.md +265 -0
- package/dist/developer/customization/quickstart.md +229 -0
- package/dist/developer/customization/routes.md +24 -0
- package/dist/developer/customization/v4/admin-panel.md +78 -0
- package/dist/developer/customization/v4/authentication.md +210 -0
- package/dist/developer/customization/v4/checkout.md +212 -0
- package/dist/developer/customization/v4/deface.md +251 -0
- package/dist/developer/customization/v4/images.md +86 -0
- package/dist/developer/customization/v4/storefront.md +450 -0
- package/dist/developer/deployment/assets.md +87 -0
- package/dist/developer/deployment/aws.md +335 -0
- package/dist/developer/deployment/caching.md +27 -0
- package/dist/developer/deployment/cdn.md +39 -0
- package/dist/developer/deployment/database.md +155 -0
- package/dist/developer/deployment/docker.md +128 -0
- package/dist/developer/deployment/emails.md +77 -0
- package/dist/developer/deployment/environment_variables.md +111 -0
- package/dist/developer/deployment/heroku.md +51 -0
- package/dist/developer/deployment/render.md +95 -0
- package/dist/developer/getting-started/quickstart.md +82 -0
- package/dist/developer/how-to/custom-payment-method.md +374 -0
- package/dist/developer/how-to/custom-promotion.md +373 -0
- package/dist/developer/how-to/custom-report.md +387 -0
- package/dist/developer/how-to/custom-search-provider.md +230 -0
- package/dist/developer/multi-store/quickstart.md +71 -0
- package/dist/developer/multi-store/setup.md +38 -0
- package/dist/developer/multi-tenant/configuration.md +41 -0
- package/dist/developer/multi-tenant/core-concepts.md +75 -0
- package/dist/developer/multi-tenant/installation.md +96 -0
- package/dist/developer/multi-tenant/quickstart.md +20 -0
- package/dist/developer/multi-vendor/installation.md +45 -0
- package/dist/developer/multi-vendor/quickstart.md +17 -0
- package/dist/developer/sdk/admin/quickstart.md +22 -0
- package/dist/developer/sdk/authentication.md +89 -0
- package/dist/developer/sdk/configuration.md +225 -0
- package/dist/developer/sdk/quickstart.md +82 -0
- package/dist/developer/sdk/store/account.md +67 -0
- package/dist/developer/sdk/store/cart-checkout.md +140 -0
- package/dist/developer/sdk/store/markets.md +151 -0
- package/dist/developer/sdk/store/payments.md +96 -0
- package/dist/developer/sdk/store/products.md +149 -0
- package/dist/developer/sdk/store/wishlists.md +52 -0
- package/dist/developer/security/pci_compliance.md +15 -0
- package/dist/developer/security/security_policy.md +68 -0
- package/dist/developer/storefront/blocks.md +285 -0
- package/dist/developer/storefront/custom-css.md +260 -0
- package/dist/developer/storefront/custom-javascript.md +166 -0
- package/dist/developer/storefront/helper-methods.md +1288 -0
- package/dist/developer/storefront/links.md +298 -0
- package/dist/developer/storefront/nextjs/architecture.md +150 -0
- package/dist/developer/storefront/nextjs/customization.md +141 -0
- package/dist/developer/storefront/nextjs/deployment.md +180 -0
- package/dist/developer/storefront/nextjs/quickstart.md +92 -0
- package/dist/developer/storefront/nextjs/spree-next-package.md +314 -0
- package/dist/developer/storefront/pages.md +163 -0
- package/dist/developer/storefront/sections.md +569 -0
- package/dist/developer/storefront/storefront.md +56 -0
- package/dist/developer/storefront/themes.md +161 -0
- package/dist/developer/tutorial/admin.md +134 -0
- package/dist/developer/tutorial/extending-models.md +380 -0
- package/dist/developer/tutorial/file-uploads.md +121 -0
- package/dist/developer/tutorial/introduction.md +33 -0
- package/dist/developer/tutorial/model.md +41 -0
- package/dist/developer/tutorial/page-builder.md +487 -0
- package/dist/developer/tutorial/rich-text.md +73 -0
- package/dist/developer/tutorial/seo.md +332 -0
- package/dist/developer/tutorial/storefront.md +352 -0
- package/dist/developer/tutorial/testing.md +558 -0
- package/dist/developer/upgrades/2.0-to-2.1.md +46 -0
- package/dist/developer/upgrades/2.1-to-2.2.md +59 -0
- package/dist/developer/upgrades/2.2-to-2.3.md +44 -0
- package/dist/developer/upgrades/2.3-to-2.4.md +42 -0
- package/dist/developer/upgrades/3.0-to-3.1.md +47 -0
- package/dist/developer/upgrades/3.1-to-3.2.md +34 -0
- package/dist/developer/upgrades/3.2-to-3.3.md +70 -0
- package/dist/developer/upgrades/3.3-to-3.4.md +36 -0
- package/dist/developer/upgrades/3.4-to-3.5.md +44 -0
- package/dist/developer/upgrades/3.5-to-3.6.md +40 -0
- package/dist/developer/upgrades/3.6-to-3.7.md +62 -0
- package/dist/developer/upgrades/3.7-to-4.0.md +152 -0
- package/dist/developer/upgrades/4.0-to-4.1.md +92 -0
- package/dist/developer/upgrades/4.1-to-4.2.md +109 -0
- package/dist/developer/upgrades/4.10-to-5.0.md +129 -0
- package/dist/developer/upgrades/4.2-to-4.3.md +100 -0
- package/dist/developer/upgrades/4.3-to-4.4.md +125 -0
- package/dist/developer/upgrades/4.4-to-4.5.md +94 -0
- package/dist/developer/upgrades/4.5-to-4.6.md +119 -0
- package/dist/developer/upgrades/4.6-to-4.7.md +39 -0
- package/dist/developer/upgrades/4.8-to-4.9.md +24 -0
- package/dist/developer/upgrades/4.9-to-4.10.md +24 -0
- package/dist/developer/upgrades/4.x-to-4.8.md +52 -0
- package/dist/developer/upgrades/5.0-to-5.1.md +28 -0
- package/dist/developer/upgrades/5.1-to-5.2.md +127 -0
- package/dist/developer/upgrades/5.2-to-5.3.md +338 -0
- package/dist/developer/upgrades/5.3-to-5.4.md +248 -0
- package/dist/developer/upgrades/quickstart.md +36 -0
- package/dist/integrations/analytics/google-analytics.md +64 -0
- package/dist/integrations/analytics/google-tag-manager.md +78 -0
- package/dist/integrations/integrations.md +39 -0
- package/dist/integrations/marketing/klaviyo.md +99 -0
- package/dist/integrations/payments/adyen.md +90 -0
- package/dist/integrations/payments/paypal.md +41 -0
- package/dist/integrations/payments/razorpay.md +45 -0
- package/dist/integrations/payments/stripe.md +109 -0
- package/dist/integrations/search/meilisearch.md +236 -0
- package/dist/integrations/sso-mfa-social-login/admin-dashboard.md +57 -0
- package/dist/integrations/sso-mfa-social-login/storefront.md +56 -0
- package/package.json +27 -0
|
@@ -0,0 +1,1964 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Extending Admin Dashboard UI
|
|
3
|
+
sidebarTitle: Extending UI
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Spree Admin Dashboard allows you easily extend existing pages and screens with your own code, without any need to modify the core codebase. This allows you to easily inject your custom UI elements without compromising the integrity of the core codebase. Which in effect allows you to safely update your Spree installation to the latest version.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
|
|
10
|
+
The entire system works on the basis of injection points which are declared throughout the admin dashboard and allows you to push your own code there. Each injection point is identified by a key, eg. `body_end`.
|
|
11
|
+
|
|
12
|
+
Let's say you want to add a new footer to the admin dashboard. You'll need to generate a template in your application:
|
|
13
|
+
|
|
14
|
+
1. Ensure you have the proper directory to store your templates:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
mkdir -p app/views/spree/admin/shared
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Create a new partial template file (partial templates file names start with underscore)
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
touch app/views/spree/admin/shared/_additional_footer.html.erb
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. Add your own code to the partial
|
|
27
|
+
|
|
28
|
+
```erb
|
|
29
|
+
<div class="mx-auto bg-light p-3 rounded-lg text-center w-10">
|
|
30
|
+
Copyright <%= current_store.name %> <%= Time.current.year %>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
4. Register your partial in `config/initializers/spree.rb`
|
|
35
|
+
|
|
36
|
+
**Spree 5.2+:**
|
|
37
|
+
|
|
38
|
+
```ruby config/initializers/spree.rb
|
|
39
|
+
Rails.application.config.after_initialize do
|
|
40
|
+
Spree.admin.partials.body_end << 'spree/admin/shared/additional_footer'
|
|
41
|
+
end
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Spree 5.1 and below:**
|
|
45
|
+
|
|
46
|
+
```ruby config/initializers/spree.rb
|
|
47
|
+
Rails.application.config.spree_admin.body_end << 'spree/admin/shared/additional_footer_partials'
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> **WARNING:** For older versions of Spree you need to add `_partials` suffix for all injection points,
|
|
51
|
+
> eg. `body_end_partials` instead of `body_end`.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
> **INFO:** The key is the name of the injection point, eg. `body_end`.
|
|
55
|
+
|
|
56
|
+
> **INFO:** Remember to use the correct path to your template file and skip the `_` prefix.
|
|
57
|
+
|
|
58
|
+
5. Restart your web server and you should see your new footer.
|
|
59
|
+
|
|
60
|
+
<img src="/images/developer/admin/partial_injecting_example.png" />
|
|
61
|
+
|
|
62
|
+
> **INFO:** Making further changes to the partial template will not require you to restart the web server. They will be picked up automatically.
|
|
63
|
+
|
|
64
|
+
> **HINT:** To summarize, we're injecting our code into the `body_end` array. This is a list of partials that will be rendered at the end of the body tag (before the closing `</body>` tag). The order of the partials in the array is the order in which they will be rendered.
|
|
65
|
+
|
|
66
|
+
## Partials API
|
|
67
|
+
|
|
68
|
+
The `Spree.admin.partials` object provides a clean API for registering partials to injection points. This API is available in Spree 5.2 and later.
|
|
69
|
+
|
|
70
|
+
### Accessing Available Injection Points
|
|
71
|
+
|
|
72
|
+
You can list all available injection points programmatically:
|
|
73
|
+
|
|
74
|
+
```ruby
|
|
75
|
+
# In Rails console or initializer
|
|
76
|
+
Spree.admin.partials.keys
|
|
77
|
+
# => ["head", "body_start", "body_end", "dashboard_analytics", "product_form", ...]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Registering Partials
|
|
81
|
+
|
|
82
|
+
Each injection point is an array that you can append to:
|
|
83
|
+
|
|
84
|
+
```ruby config/initializers/spree.rb
|
|
85
|
+
|
|
86
|
+
# Add a single partial
|
|
87
|
+
Spree.admin.partials.product_form << 'spree/admin/products/erp_section'
|
|
88
|
+
|
|
89
|
+
# Add multiple partials
|
|
90
|
+
Spree.admin.partials.dashboard_sidebar << 'spree/admin/dashboard/analytics_widget'
|
|
91
|
+
Spree.admin.partials.dashboard_sidebar << 'spree/admin/dashboard/inventory_widget'
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Viewing Registered Partials
|
|
95
|
+
|
|
96
|
+
To see which partials are registered for a specific injection point:
|
|
97
|
+
|
|
98
|
+
```ruby
|
|
99
|
+
Spree.admin.partials.product_form
|
|
100
|
+
# => ["spree/admin/products/erp_section"]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Replacing All Partials
|
|
104
|
+
|
|
105
|
+
You can also replace all partials for an injection point:
|
|
106
|
+
|
|
107
|
+
```ruby
|
|
108
|
+
Spree.admin.partials.product_form = ['my/custom/partial']
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
> **WARNING:** Replacing all partials will remove any partials registered by other extensions. Use this with caution.
|
|
112
|
+
|
|
113
|
+
## List of all injection points
|
|
114
|
+
|
|
115
|
+
Here's a list of all places you can inject your custom code:
|
|
116
|
+
|
|
117
|
+
### Layout
|
|
118
|
+
|
|
119
|
+
<details>
|
|
120
|
+
<summary><head></summary>
|
|
121
|
+
|
|
122
|
+
`head`
|
|
123
|
+
|
|
124
|
+
Injects code into the `<head>` tag
|
|
125
|
+
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<details>
|
|
130
|
+
<summary><body></summary>
|
|
131
|
+
|
|
132
|
+
`body_start`
|
|
133
|
+
|
|
134
|
+
Injects code into the `<body>` tag, before the main content
|
|
135
|
+
|
|
136
|
+
</details>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
<details>
|
|
140
|
+
<summary></body></summary>
|
|
141
|
+
|
|
142
|
+
`body_end`
|
|
143
|
+
|
|
144
|
+
Injects code into the `<body>` tag, after the main content
|
|
145
|
+
|
|
146
|
+
</details>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Dashboard
|
|
150
|
+
|
|
151
|
+
<details>
|
|
152
|
+
<summary>Analytics</summary>
|
|
153
|
+
|
|
154
|
+
`dashboard_analytics`
|
|
155
|
+
|
|
156
|
+
<img src="/images/developer/admin/dashboard_analytics_partials.png" />
|
|
157
|
+
|
|
158
|
+
Injects code into the dashboard analytics section, eg.
|
|
159
|
+
|
|
160
|
+
```erb
|
|
161
|
+
<div class="card">
|
|
162
|
+
<div class="card-body">
|
|
163
|
+
<h5 class="card-title">Top ERP products</h5>
|
|
164
|
+
</div>
|
|
165
|
+
<div class="card-footer">
|
|
166
|
+
<%# ... my custom content ... %>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
</details>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
<details>
|
|
175
|
+
<summary>Sidebar</summary>
|
|
176
|
+
|
|
177
|
+
`dashboard_sidebar`
|
|
178
|
+
|
|
179
|
+
<img src="/images/developer/admin/dashboard_sidebar_partials.png" />
|
|
180
|
+
|
|
181
|
+
Injects code into the dashboard sidebar, eg.
|
|
182
|
+
|
|
183
|
+
```erb
|
|
184
|
+
<div class="card">
|
|
185
|
+
<div class="card-body">
|
|
186
|
+
<h5 class="card-title">Latest ERP syncs</h5>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="card-footer">
|
|
189
|
+
<%# ... my custom content ... %>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
</details>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
### Orders
|
|
198
|
+
|
|
199
|
+
<details>
|
|
200
|
+
<summary>Orders Actions</summary>
|
|
201
|
+
|
|
202
|
+
`orders_actions`
|
|
203
|
+
|
|
204
|
+
Injects code into the page actions area (top right of the page) for the orders list page. This is useful for adding custom buttons, export options, or other actions.
|
|
205
|
+
|
|
206
|
+
```erb
|
|
207
|
+
<%= link_to "Export to ERP", export_orders_to_erp_path, class: "btn btn-secondary" %>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
</details>
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
<details>
|
|
214
|
+
<summary>Orders Header</summary>
|
|
215
|
+
|
|
216
|
+
`orders_header`
|
|
217
|
+
|
|
218
|
+
Injects code between the page header and the main content area for the orders list page. This is useful for adding notifications, alerts, or additional information.
|
|
219
|
+
|
|
220
|
+
```erb
|
|
221
|
+
<div class="alert alert-info">
|
|
222
|
+
<strong>Processing:</strong> Orders are automatically processed and shipped within 24 hours.
|
|
223
|
+
</div>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
</details>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
<details>
|
|
230
|
+
<summary>Orders Filters</summary>
|
|
231
|
+
|
|
232
|
+
`orders_filters`
|
|
233
|
+
|
|
234
|
+
<img src="/images/developer/admin/orders_filters_partials.png" />
|
|
235
|
+
|
|
236
|
+
#### Variables
|
|
237
|
+
|
|
238
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
239
|
+
|
|
240
|
+
Injects code into the orders list filters, to add custom filters.
|
|
241
|
+
This partial has access to the `f` variable, which is the form builder for the filters, eg.
|
|
242
|
+
|
|
243
|
+
```erb
|
|
244
|
+
<%= f.spree_text_field :q_number_cont, data: { filters_target: :input } %>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
> **TIP:** * `q_number_cont` - The name of the filter field. For filtering we're using [ransack](/developer/core-concepts/search-filtering) gem, so the name of the filter field is the name of the attribute we're filtering by.
|
|
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
|
+
|
|
250
|
+
</details>
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
<details>
|
|
254
|
+
<summary>Order Page Dropdown</summary>
|
|
255
|
+
|
|
256
|
+
`order_page_dropdown`
|
|
257
|
+
|
|
258
|
+
<img src="/images/developer/admin/order_page_dropdown_partials.png" />
|
|
259
|
+
|
|
260
|
+
#### Variables
|
|
261
|
+
|
|
262
|
+
- **`order`** (`Spree::Order`) — The [Spree::Order](https://github.com/spree/spree/blob/main/core/app/models/spree/order.rb) object.
|
|
263
|
+
|
|
264
|
+
Injects code into the order page dropdown. This partial has access to the `order` variable.
|
|
265
|
+
|
|
266
|
+
To add an additional dropdown item, you can use the following code:
|
|
267
|
+
|
|
268
|
+
```erb
|
|
269
|
+
<%= link_to "View Order in ERP", "https://erp.com/orders/#{order.number}", class: "dropdown-item", target: "_blank" %>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
> **TIP:** * `dropdown-item` is a CSS class for styling the dropdown item
|
|
273
|
+
> * `target: "_blank"` is used to open the link in a new tab
|
|
274
|
+
|
|
275
|
+
</details>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
<details>
|
|
279
|
+
<summary>Order Page Header</summary>
|
|
280
|
+
|
|
281
|
+
`order_page_header`
|
|
282
|
+
|
|
283
|
+
<img src="/images/developer/admin/order_page_header_partials.png" />
|
|
284
|
+
|
|
285
|
+
#### Variables
|
|
286
|
+
|
|
287
|
+
- **`order`** (`Spree::Order`) — The [Spree::Order](https://github.com/spree/spree/blob/main/core/app/models/spree/order.rb) object.
|
|
288
|
+
|
|
289
|
+
Injects code into the order page header.
|
|
290
|
+
|
|
291
|
+
To add an additional action button near the `...` button, you can use the following code:
|
|
292
|
+
|
|
293
|
+
<img src="/images/developer/admin/order_page_header_partials.png" />
|
|
294
|
+
|
|
295
|
+
Injects code into the order page header.
|
|
296
|
+
|
|
297
|
+
To add an additional action button near the `...` button, you can use the following code:
|
|
298
|
+
|
|
299
|
+
```erb
|
|
300
|
+
<%= content_for :page_actions do %>
|
|
301
|
+
<%= link_to "Send to ERP", "#", class: "btn btn-primary" %>
|
|
302
|
+
<% end %>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
To add an inline alert to the order page, you can use the following code:
|
|
306
|
+
|
|
307
|
+
```erb
|
|
308
|
+
<%= content_for :page_alerts do %>
|
|
309
|
+
<% if order.sent_to_erp_at.blank? %>
|
|
310
|
+
<div class="alert alert-success">Order sent to ERP at <%= local_time(order.sent_to_erp_at) %></div>
|
|
311
|
+
<% else %>
|
|
312
|
+
<div class="alert alert-danger">Order not sent to ERP</div>
|
|
313
|
+
<% end %>
|
|
314
|
+
<% end %>
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
> **TIP:** `local_time` is a helper for displaying the time in the user's timezone in a human readable **format** (based on the browser's timezone).
|
|
318
|
+
|
|
319
|
+
</details>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
<details>
|
|
323
|
+
<summary>Order Page Body</summary>
|
|
324
|
+
|
|
325
|
+
`order_page_body`
|
|
326
|
+
|
|
327
|
+
<img src="/images/developer/admin/order_page_body_partials.png" />
|
|
328
|
+
|
|
329
|
+
#### Variables
|
|
330
|
+
|
|
331
|
+
- **`order`** (`Spree::Order`) — The [Spree::Order](https://github.com/spree/spree/blob/main/core/app/models/spree/order.rb) object.
|
|
332
|
+
|
|
333
|
+
Injects code into the order page body. This partial has access to the `order` variable.
|
|
334
|
+
|
|
335
|
+
To add a new section to the order page, you can use the following code:
|
|
336
|
+
|
|
337
|
+
```erb
|
|
338
|
+
<div class="card mb-6">
|
|
339
|
+
<div class="card-header">
|
|
340
|
+
<h5 class="card-title">ERP Integration</h5>
|
|
341
|
+
</div>
|
|
342
|
+
<div class="card-body">
|
|
343
|
+
<% if order.sent_to_erp_at.blank? %>
|
|
344
|
+
<p class="text-muted text-center">Order not sent to ERP</p>
|
|
345
|
+
<% else %>
|
|
346
|
+
<ul class="list-group list-group-flush">
|
|
347
|
+
<li class="list-group-item">
|
|
348
|
+
<strong>ERP Order ID:</strong> <%= order.erp_order_id %>
|
|
349
|
+
</li>
|
|
350
|
+
<li class="list-group-item">
|
|
351
|
+
<strong>Sent to ERP at:</strong> <%= local_time(order.sent_to_erp_at) %>
|
|
352
|
+
</li>
|
|
353
|
+
</ul>
|
|
354
|
+
<% end %>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
</details>
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
<details>
|
|
363
|
+
<summary>Order Page Sidebar</summary>
|
|
364
|
+
|
|
365
|
+
`order_page_sidebar`
|
|
366
|
+
|
|
367
|
+
<img src="/images/developer/admin/order_page_sidebar_partials.png" />
|
|
368
|
+
|
|
369
|
+
#### Variables
|
|
370
|
+
|
|
371
|
+
- **`order`** (`Spree::Order`) — The [Spree::Order](https://github.com/spree/spree/blob/main/core/app/models/spree/order.rb) object.
|
|
372
|
+
|
|
373
|
+
Injects code into the order page sidebar. This partial has access to the `order` variable.
|
|
374
|
+
|
|
375
|
+
</details>
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
### Customers
|
|
379
|
+
|
|
380
|
+
<details>
|
|
381
|
+
<summary>Customers Actions</summary>
|
|
382
|
+
|
|
383
|
+
`users_actions`
|
|
384
|
+
|
|
385
|
+
Injects code into the page actions area (top right of the page) for the customers list page. This is useful for adding custom buttons, export options, or other actions.
|
|
386
|
+
|
|
387
|
+
```erb
|
|
388
|
+
<%= link_to "Sync with CRM", sync_customers_path, class: "btn btn-secondary" %>
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
</details>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
<details>
|
|
395
|
+
<summary>Customers Header</summary>
|
|
396
|
+
|
|
397
|
+
`users_header`
|
|
398
|
+
|
|
399
|
+
Injects code between the page header and the main content area for the customers list page. This is useful for adding notifications, alerts, or additional information.
|
|
400
|
+
|
|
401
|
+
```erb
|
|
402
|
+
<div class="alert alert-info">
|
|
403
|
+
<strong>Note:</strong> Customer data is synced with CRM every hour.
|
|
404
|
+
</div>
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
</details>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
<details>
|
|
411
|
+
<summary>Customers Filters</summary>
|
|
412
|
+
|
|
413
|
+
`users_filters`
|
|
414
|
+
|
|
415
|
+
#### Variables
|
|
416
|
+
|
|
417
|
+
- **`f`** (`ActionView::Helpers::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
418
|
+
|
|
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
|
+
|
|
421
|
+
```erb
|
|
422
|
+
<%= f.spree_select :custom_field_eq, [["VIP", "vip"], ["Regular", "regular"]], { include_blank: true }, { data: { filters_target: :input } } %>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
> **TIP:** * Use [ransack](/developer/core-concepts/search-filtering) search syntax for filter field names
|
|
426
|
+
> * Include `data: { filters_target: :input }` for proper integration with the Stimulus Filters controller
|
|
427
|
+
|
|
428
|
+
</details>
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
### Stock Items
|
|
432
|
+
|
|
433
|
+
<details>
|
|
434
|
+
<summary>Stock Items Actions</summary>
|
|
435
|
+
|
|
436
|
+
`stock_items_actions`
|
|
437
|
+
|
|
438
|
+
Injects code into the page actions area for the stock items list page.
|
|
439
|
+
|
|
440
|
+
```erb
|
|
441
|
+
<%= link_to "Export to WMS", export_stock_to_wms_path, class: "btn btn-secondary" %>
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
</details>
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
<details>
|
|
448
|
+
<summary>Stock Items Header</summary>
|
|
449
|
+
|
|
450
|
+
`stock_items_header`
|
|
451
|
+
|
|
452
|
+
Injects code between the page header and the main content area for the stock items list page.
|
|
453
|
+
|
|
454
|
+
```erb
|
|
455
|
+
<div class="alert alert-warning">
|
|
456
|
+
<strong>Warning:</strong> Low stock items require attention.
|
|
457
|
+
</div>
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
</details>
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
<details>
|
|
464
|
+
<summary>Stock Items Filters</summary>
|
|
465
|
+
|
|
466
|
+
`stock_items_filters`
|
|
467
|
+
|
|
468
|
+
#### Variables
|
|
469
|
+
|
|
470
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
471
|
+
|
|
472
|
+
Injects code into the stock items list filters.
|
|
473
|
+
|
|
474
|
+
```erb
|
|
475
|
+
<%= f.spree_number_field :count_on_hand_lt,
|
|
476
|
+
label: "Stock Below",
|
|
477
|
+
data: { filters_target: :input } %>
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
> **TIP:** Use [ransack](/developer/core-concepts/search-filtering) search syntax for filter field names (e.g., `_lt` for "less than").
|
|
481
|
+
|
|
482
|
+
</details>
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
### Admin Users
|
|
486
|
+
|
|
487
|
+
<details>
|
|
488
|
+
<summary>Admin Users Actions</summary>
|
|
489
|
+
|
|
490
|
+
`admin_users_actions`
|
|
491
|
+
|
|
492
|
+
Injects code into the page actions area for the admin users list page.
|
|
493
|
+
|
|
494
|
+
```erb
|
|
495
|
+
<%= link_to "Export Users", export_admin_users_path, class: "btn btn-secondary" %>
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
</details>
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
<details>
|
|
502
|
+
<summary>Admin Users Header</summary>
|
|
503
|
+
|
|
504
|
+
`admin_users_header`
|
|
505
|
+
|
|
506
|
+
Injects code between the page header and the main content area for the admin users list page.
|
|
507
|
+
|
|
508
|
+
```erb
|
|
509
|
+
<div class="alert alert-info">
|
|
510
|
+
<strong>Security:</strong> Review admin access regularly.
|
|
511
|
+
</div>
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
</details>
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
### Classifications
|
|
518
|
+
|
|
519
|
+
<details>
|
|
520
|
+
<summary>Classifications Actions</summary>
|
|
521
|
+
|
|
522
|
+
`classifications_actions`
|
|
523
|
+
|
|
524
|
+
Injects code into the page actions area for the classifications list page.
|
|
525
|
+
|
|
526
|
+
```erb
|
|
527
|
+
<%= link_to "Bulk Update", bulk_update_classifications_path, class: "btn btn-secondary" %>
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
</details>
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
<details>
|
|
534
|
+
<summary>Classifications Header</summary>
|
|
535
|
+
|
|
536
|
+
`classifications_header`
|
|
537
|
+
|
|
538
|
+
Injects code between the page header and the main content area for the classifications list page.
|
|
539
|
+
|
|
540
|
+
```erb
|
|
541
|
+
<div class="alert alert-info">
|
|
542
|
+
<strong>Tip:</strong> Use drag and drop to reorder classifications.
|
|
543
|
+
</div>
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
</details>
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
### Coupon Codes
|
|
550
|
+
|
|
551
|
+
<details>
|
|
552
|
+
<summary>Coupon Codes Actions</summary>
|
|
553
|
+
|
|
554
|
+
`coupon_codes_actions`
|
|
555
|
+
|
|
556
|
+
Injects code into the page actions area for the coupon codes list page.
|
|
557
|
+
|
|
558
|
+
```erb
|
|
559
|
+
<%= link_to "Generate Bulk Codes", bulk_generate_coupons_path, class: "btn btn-secondary" %>
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
</details>
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
<details>
|
|
566
|
+
<summary>Coupon Codes Header</summary>
|
|
567
|
+
|
|
568
|
+
`coupon_codes_header`
|
|
569
|
+
|
|
570
|
+
Injects code between the page header and the main content area for the coupon codes list page.
|
|
571
|
+
|
|
572
|
+
```erb
|
|
573
|
+
<div class="alert alert-warning">
|
|
574
|
+
<strong>Notice:</strong> Expired codes will be automatically cleaned up.
|
|
575
|
+
</div>
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
</details>
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
### Custom Domains
|
|
582
|
+
|
|
583
|
+
<details>
|
|
584
|
+
<summary>Custom Domains Actions</summary>
|
|
585
|
+
|
|
586
|
+
`custom_domains_actions`
|
|
587
|
+
|
|
588
|
+
Injects code into the page actions area for the custom domains list page.
|
|
589
|
+
|
|
590
|
+
```erb
|
|
591
|
+
<%= link_to "Verify All Domains", verify_all_domains_path, class: "btn btn-secondary" %>
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
</details>
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
<details>
|
|
598
|
+
<summary>Custom Domains Header</summary>
|
|
599
|
+
|
|
600
|
+
`custom_domains_header`
|
|
601
|
+
|
|
602
|
+
Injects code between the page header and the main content area for the custom domains list page.
|
|
603
|
+
|
|
604
|
+
```erb
|
|
605
|
+
<div class="alert alert-info">
|
|
606
|
+
<strong>SSL:</strong> SSL certificates are automatically managed.
|
|
607
|
+
</div>
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
</details>
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
### Customer Returns
|
|
614
|
+
|
|
615
|
+
<details>
|
|
616
|
+
<summary>Customer Returns Actions</summary>
|
|
617
|
+
|
|
618
|
+
`customer_returns_actions`
|
|
619
|
+
|
|
620
|
+
Injects code into the page actions area for the customer returns list page.
|
|
621
|
+
|
|
622
|
+
```erb
|
|
623
|
+
<%= link_to "Export Returns Report", export_returns_path, class: "btn btn-secondary" %>
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
</details>
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
<details>
|
|
630
|
+
<summary>Customer Returns Header</summary>
|
|
631
|
+
|
|
632
|
+
`customer_returns_header`
|
|
633
|
+
|
|
634
|
+
Injects code between the page header and the main content area for the customer returns list page.
|
|
635
|
+
|
|
636
|
+
```erb
|
|
637
|
+
<div class="alert alert-info">
|
|
638
|
+
<strong>Processing:</strong> Returns are processed within 3-5 business days.
|
|
639
|
+
</div>
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
</details>
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
<details>
|
|
646
|
+
<summary>Customer Returns Filters</summary>
|
|
647
|
+
|
|
648
|
+
`customer_returns_filters`
|
|
649
|
+
|
|
650
|
+
#### Variables
|
|
651
|
+
|
|
652
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
653
|
+
|
|
654
|
+
Injects code into the customer returns list filters.
|
|
655
|
+
|
|
656
|
+
```erb
|
|
657
|
+
<%= f.spree_select :reason_eq,
|
|
658
|
+
[["Damaged", "damaged"], ["Wrong Item", "wrong_item"]],
|
|
659
|
+
{ include_blank: true, label: "Return Reason" },
|
|
660
|
+
{ data: { filters_target: :input } } %>
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
> **TIP:** Use [ransack](/developer/core-concepts/search-filtering) search syntax for filter field names (e.g., `_eq` for "equals").
|
|
664
|
+
|
|
665
|
+
</details>
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
### Digital Assets
|
|
669
|
+
|
|
670
|
+
<details>
|
|
671
|
+
<summary>Digital Assets Actions</summary>
|
|
672
|
+
|
|
673
|
+
`digital_assets_actions`
|
|
674
|
+
|
|
675
|
+
Injects code into the page actions area for the digital assets list page.
|
|
676
|
+
|
|
677
|
+
```erb
|
|
678
|
+
<%= link_to "Bulk Upload", bulk_upload_assets_path, class: "btn btn-secondary" %>
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
</details>
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
<details>
|
|
685
|
+
<summary>Digital Assets Header</summary>
|
|
686
|
+
|
|
687
|
+
`digital_assets_header`
|
|
688
|
+
|
|
689
|
+
Injects code between the page header and the main content area for the digital assets list page.
|
|
690
|
+
|
|
691
|
+
```erb
|
|
692
|
+
<div class="alert alert-info">
|
|
693
|
+
<strong>Storage:</strong> Assets are stored in cloud storage with CDN.
|
|
694
|
+
</div>
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
</details>
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
### Exports
|
|
701
|
+
|
|
702
|
+
<details>
|
|
703
|
+
<summary>Exports Actions</summary>
|
|
704
|
+
|
|
705
|
+
`exports_actions`
|
|
706
|
+
|
|
707
|
+
Injects code into the page actions area for the exports list page.
|
|
708
|
+
|
|
709
|
+
```erb
|
|
710
|
+
<%= link_to "Schedule Export", new_scheduled_export_path, class: "btn btn-secondary" %>
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
</details>
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
<details>
|
|
717
|
+
<summary>Exports Header</summary>
|
|
718
|
+
|
|
719
|
+
`exports_header`
|
|
720
|
+
|
|
721
|
+
Injects code between the page header and the main content area for the exports list page.
|
|
722
|
+
|
|
723
|
+
```erb
|
|
724
|
+
<div class="alert alert-info">
|
|
725
|
+
<strong>Retention:</strong> Export files are kept for 30 days.
|
|
726
|
+
</div>
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
</details>
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
### Gift Cards
|
|
733
|
+
|
|
734
|
+
<details>
|
|
735
|
+
<summary>Gift Cards Actions</summary>
|
|
736
|
+
|
|
737
|
+
`gift_cards_actions`
|
|
738
|
+
|
|
739
|
+
Injects code into the page actions area for the gift cards list page.
|
|
740
|
+
|
|
741
|
+
```erb
|
|
742
|
+
<%= link_to "Bulk Generate", bulk_generate_gift_cards_path, class: "btn btn-secondary" %>
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
</details>
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
<details>
|
|
749
|
+
<summary>Gift Cards Header</summary>
|
|
750
|
+
|
|
751
|
+
`gift_cards_header`
|
|
752
|
+
|
|
753
|
+
Injects code between the page header and the main content area for the gift cards list page.
|
|
754
|
+
|
|
755
|
+
```erb
|
|
756
|
+
<div class="alert alert-info">
|
|
757
|
+
<strong>Security:</strong> Gift card codes are encrypted at rest.
|
|
758
|
+
</div>
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
</details>
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
<details>
|
|
765
|
+
<summary>Gift Cards Filters</summary>
|
|
766
|
+
|
|
767
|
+
`gift_cards_filters`
|
|
768
|
+
|
|
769
|
+
#### Variables
|
|
770
|
+
|
|
771
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
772
|
+
|
|
773
|
+
Injects code into the gift cards list filters.
|
|
774
|
+
|
|
775
|
+
```erb
|
|
776
|
+
<%= f.spree_number_field :balance_gt,
|
|
777
|
+
label: "Balance Greater Than",
|
|
778
|
+
step: 0.01,
|
|
779
|
+
data: { filters_target: :input } %>
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
> **TIP:** Use [ransack](/developer/core-concepts/search-filtering) search syntax for filter field names (e.g., `_gt` for "greater than").
|
|
783
|
+
|
|
784
|
+
</details>
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
### Integrations
|
|
788
|
+
|
|
789
|
+
<details>
|
|
790
|
+
<summary>Integrations Actions</summary>
|
|
791
|
+
|
|
792
|
+
`integrations_actions`
|
|
793
|
+
|
|
794
|
+
Injects code into the page actions area for the integrations list page.
|
|
795
|
+
|
|
796
|
+
```erb
|
|
797
|
+
<%= link_to "Test All Connections", test_integrations_path, class: "btn btn-secondary" %>
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
</details>
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
<details>
|
|
804
|
+
<summary>Integrations Header</summary>
|
|
805
|
+
|
|
806
|
+
`integrations_header`
|
|
807
|
+
|
|
808
|
+
Injects code between the page header and the main content area for the integrations list page.
|
|
809
|
+
|
|
810
|
+
```erb
|
|
811
|
+
<div class="alert alert-warning">
|
|
812
|
+
<strong>Status:</strong> Check integration health regularly.
|
|
813
|
+
</div>
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
</details>
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
### Invitations
|
|
820
|
+
|
|
821
|
+
<details>
|
|
822
|
+
<summary>Invitations Actions</summary>
|
|
823
|
+
|
|
824
|
+
`invitations_actions`
|
|
825
|
+
|
|
826
|
+
Injects code into the page actions area for the invitations list page.
|
|
827
|
+
|
|
828
|
+
```erb
|
|
829
|
+
<%= link_to "Resend All Pending", resend_pending_invitations_path, class: "btn btn-secondary" %>
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
</details>
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
<details>
|
|
836
|
+
<summary>Invitations Header</summary>
|
|
837
|
+
|
|
838
|
+
`invitations_header`
|
|
839
|
+
|
|
840
|
+
Injects code between the page header and the main content area for the invitations list page.
|
|
841
|
+
|
|
842
|
+
```erb
|
|
843
|
+
<div class="alert alert-info">
|
|
844
|
+
<strong>Expiry:</strong> Invitations expire after 7 days.
|
|
845
|
+
</div>
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
</details>
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
### Option Types
|
|
852
|
+
|
|
853
|
+
<details>
|
|
854
|
+
<summary>Option Types Actions</summary>
|
|
855
|
+
|
|
856
|
+
`option_types_actions`
|
|
857
|
+
|
|
858
|
+
Injects code into the page actions area for the option types list page.
|
|
859
|
+
|
|
860
|
+
```erb
|
|
861
|
+
<%= link_to "Import Options", import_option_types_path, class: "btn btn-secondary" %>
|
|
862
|
+
```
|
|
863
|
+
|
|
864
|
+
</details>
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
<details>
|
|
868
|
+
<summary>Option Types Header</summary>
|
|
869
|
+
|
|
870
|
+
`option_types_header`
|
|
871
|
+
|
|
872
|
+
Injects code between the page header and the main content area for the option types list page.
|
|
873
|
+
|
|
874
|
+
```erb
|
|
875
|
+
<div class="alert alert-info">
|
|
876
|
+
<strong>Variants:</strong> Option types are used to create product variants.
|
|
877
|
+
</div>
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
</details>
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
### Pages
|
|
884
|
+
|
|
885
|
+
<details>
|
|
886
|
+
<summary>Pages Actions</summary>
|
|
887
|
+
|
|
888
|
+
`pages_actions`
|
|
889
|
+
|
|
890
|
+
Injects code into the page actions area for the pages list page.
|
|
891
|
+
|
|
892
|
+
```erb
|
|
893
|
+
<%= link_to "Export Content", export_pages_path, class: "btn btn-secondary" %>
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
</details>
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
<details>
|
|
900
|
+
<summary>Pages Header</summary>
|
|
901
|
+
|
|
902
|
+
`pages_header`
|
|
903
|
+
|
|
904
|
+
Injects code between the page header and the main content area for the pages list page.
|
|
905
|
+
|
|
906
|
+
```erb
|
|
907
|
+
<div class="alert alert-info">
|
|
908
|
+
<strong>SEO:</strong> Remember to optimize page content for search engines.
|
|
909
|
+
</div>
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
</details>
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
### Payment Methods
|
|
916
|
+
|
|
917
|
+
<details>
|
|
918
|
+
<summary>Payment Methods Actions</summary>
|
|
919
|
+
|
|
920
|
+
`payment_methods_actions`
|
|
921
|
+
|
|
922
|
+
Injects code into the page actions area for the payment methods list page.
|
|
923
|
+
|
|
924
|
+
```erb
|
|
925
|
+
<%= link_to "Test All Gateways", test_payment_gateways_path, class: "btn btn-secondary" %>
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
</details>
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
<details>
|
|
932
|
+
<summary>Payment Methods Header</summary>
|
|
933
|
+
|
|
934
|
+
`payment_methods_header`
|
|
935
|
+
|
|
936
|
+
Injects code between the page header and the main content area for the payment methods list page.
|
|
937
|
+
|
|
938
|
+
```erb
|
|
939
|
+
<div class="alert alert-warning">
|
|
940
|
+
<strong>Configuration:</strong> Ensure all payment methods are properly configured.
|
|
941
|
+
</div>
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
</details>
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
### Post Categories
|
|
948
|
+
|
|
949
|
+
<details>
|
|
950
|
+
<summary>Post Categories Actions</summary>
|
|
951
|
+
|
|
952
|
+
`post_categories_actions`
|
|
953
|
+
|
|
954
|
+
Injects code into the page actions area for the post categories list page.
|
|
955
|
+
|
|
956
|
+
```erb
|
|
957
|
+
<%= link_to "Reorder Categories", reorder_post_categories_path, class: "btn btn-secondary" %>
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
</details>
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
<details>
|
|
964
|
+
<summary>Post Categories Header</summary>
|
|
965
|
+
|
|
966
|
+
`post_categories_header`
|
|
967
|
+
|
|
968
|
+
Injects code between the page header and the main content area for the post categories list page.
|
|
969
|
+
|
|
970
|
+
```erb
|
|
971
|
+
<div class="alert alert-info">
|
|
972
|
+
<strong>Organization:</strong> Use categories to organize your blog posts.
|
|
973
|
+
</div>
|
|
974
|
+
```
|
|
975
|
+
|
|
976
|
+
</details>
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
### Posts
|
|
980
|
+
|
|
981
|
+
<details>
|
|
982
|
+
<summary>Posts Actions</summary>
|
|
983
|
+
|
|
984
|
+
`posts_actions`
|
|
985
|
+
|
|
986
|
+
Injects code into the page actions area for the posts list page.
|
|
987
|
+
|
|
988
|
+
```erb
|
|
989
|
+
<%= link_to "Schedule Posts", schedule_posts_path, class: "btn btn-secondary" %>
|
|
990
|
+
```
|
|
991
|
+
|
|
992
|
+
</details>
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
<details>
|
|
996
|
+
<summary>Posts Header</summary>
|
|
997
|
+
|
|
998
|
+
`posts_header`
|
|
999
|
+
|
|
1000
|
+
Injects code between the page header and the main content area for the posts list page.
|
|
1001
|
+
|
|
1002
|
+
```erb
|
|
1003
|
+
<div class="alert alert-info">
|
|
1004
|
+
<strong>Publishing:</strong> Posts can be scheduled for future publication.
|
|
1005
|
+
</div>
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
</details>
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
<details>
|
|
1012
|
+
<summary>Posts Filters</summary>
|
|
1013
|
+
|
|
1014
|
+
`posts_filters`
|
|
1015
|
+
|
|
1016
|
+
#### Variables
|
|
1017
|
+
|
|
1018
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1019
|
+
|
|
1020
|
+
Injects code into the posts list filters.
|
|
1021
|
+
|
|
1022
|
+
```erb
|
|
1023
|
+
<%= f.spree_select :published_eq,
|
|
1024
|
+
[["Published", true], ["Draft", false]],
|
|
1025
|
+
{ include_blank: true, label: "Publication Status" },
|
|
1026
|
+
{ data: { filters_target: :input } } %>
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
> **TIP:** Use [ransack](/developer/core-concepts/search-filtering) search syntax for filter field names.
|
|
1030
|
+
|
|
1031
|
+
</details>
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
### Promotions
|
|
1035
|
+
|
|
1036
|
+
<details>
|
|
1037
|
+
<summary>Promotions Actions</summary>
|
|
1038
|
+
|
|
1039
|
+
`promotions_actions`
|
|
1040
|
+
|
|
1041
|
+
Injects code into the page actions area for the promotions list page.
|
|
1042
|
+
|
|
1043
|
+
```erb
|
|
1044
|
+
<%= link_to "Clone Selected", clone_promotions_path, class: "btn btn-secondary" %>
|
|
1045
|
+
```
|
|
1046
|
+
|
|
1047
|
+
</details>
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
<details>
|
|
1051
|
+
<summary>Promotions Header</summary>
|
|
1052
|
+
|
|
1053
|
+
`promotions_header`
|
|
1054
|
+
|
|
1055
|
+
Injects code between the page header and the main content area for the promotions list page.
|
|
1056
|
+
|
|
1057
|
+
```erb
|
|
1058
|
+
<div class="alert alert-info">
|
|
1059
|
+
<strong>Scheduling:</strong> Promotions can be scheduled to start and end automatically.
|
|
1060
|
+
</div>
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
</details>
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
<details>
|
|
1067
|
+
<summary>Promotions Filters</summary>
|
|
1068
|
+
|
|
1069
|
+
`promotions_filters`
|
|
1070
|
+
|
|
1071
|
+
#### Variables
|
|
1072
|
+
|
|
1073
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1074
|
+
|
|
1075
|
+
Injects code into the promotions list filters.
|
|
1076
|
+
|
|
1077
|
+
```erb
|
|
1078
|
+
<%= f.spree_select :active_eq,
|
|
1079
|
+
[["Active", true], ["Inactive", false]],
|
|
1080
|
+
{ include_blank: true, label: "Active Status" },
|
|
1081
|
+
{ data: { filters_target: :input } } %>
|
|
1082
|
+
```
|
|
1083
|
+
|
|
1084
|
+
> **TIP:** Use [ransack](/developer/core-concepts/search-filtering) search syntax for filter field names.
|
|
1085
|
+
|
|
1086
|
+
</details>
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
### Properties
|
|
1090
|
+
|
|
1091
|
+
<details>
|
|
1092
|
+
<summary>Properties Actions</summary>
|
|
1093
|
+
|
|
1094
|
+
`properties_actions`
|
|
1095
|
+
|
|
1096
|
+
Injects code into the page actions area for the properties list page.
|
|
1097
|
+
|
|
1098
|
+
```erb
|
|
1099
|
+
<%= link_to "Import Properties", import_properties_path, class: "btn btn-secondary" %>
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
</details>
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
<details>
|
|
1106
|
+
<summary>Properties Header</summary>
|
|
1107
|
+
|
|
1108
|
+
`properties_header`
|
|
1109
|
+
|
|
1110
|
+
Injects code between the page header and the main content area for the properties list page.
|
|
1111
|
+
|
|
1112
|
+
```erb
|
|
1113
|
+
<div class="alert alert-info">
|
|
1114
|
+
<strong>Usage:</strong> Properties are used to add custom attributes to products.
|
|
1115
|
+
</div>
|
|
1116
|
+
```
|
|
1117
|
+
|
|
1118
|
+
</details>
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
### Refund Reasons
|
|
1122
|
+
|
|
1123
|
+
<details>
|
|
1124
|
+
<summary>Refund Reasons Actions</summary>
|
|
1125
|
+
|
|
1126
|
+
`refund_reasons_actions`
|
|
1127
|
+
|
|
1128
|
+
Injects code into the page actions area for the refund reasons list page.
|
|
1129
|
+
|
|
1130
|
+
```erb
|
|
1131
|
+
<%= link_to "Export Reasons", export_refund_reasons_path, class: "btn btn-secondary" %>
|
|
1132
|
+
```
|
|
1133
|
+
|
|
1134
|
+
</details>
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
<details>
|
|
1138
|
+
<summary>Refund Reasons Header</summary>
|
|
1139
|
+
|
|
1140
|
+
`refund_reasons_header`
|
|
1141
|
+
|
|
1142
|
+
Injects code between the page header and the main content area for the refund reasons list page.
|
|
1143
|
+
|
|
1144
|
+
```erb
|
|
1145
|
+
<div class="alert alert-info">
|
|
1146
|
+
<strong>Analytics:</strong> Track refund reasons to identify common issues.
|
|
1147
|
+
</div>
|
|
1148
|
+
```
|
|
1149
|
+
|
|
1150
|
+
</details>
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
### Reimbursement Types
|
|
1154
|
+
|
|
1155
|
+
<details>
|
|
1156
|
+
<summary>Reimbursement Types Actions</summary>
|
|
1157
|
+
|
|
1158
|
+
`reimbursement_types_actions`
|
|
1159
|
+
|
|
1160
|
+
Injects code into the page actions area for the reimbursement types list page.
|
|
1161
|
+
|
|
1162
|
+
```erb
|
|
1163
|
+
<%= link_to "Configure Defaults", configure_reimbursement_defaults_path, class: "btn btn-secondary" %>
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
</details>
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
<details>
|
|
1170
|
+
<summary>Reimbursement Types Header</summary>
|
|
1171
|
+
|
|
1172
|
+
`reimbursement_types_header`
|
|
1173
|
+
|
|
1174
|
+
Injects code between the page header and the main content area for the reimbursement types list page.
|
|
1175
|
+
|
|
1176
|
+
```erb
|
|
1177
|
+
<div class="alert alert-info">
|
|
1178
|
+
<strong>Processing:</strong> Define how customers are reimbursed for returns.
|
|
1179
|
+
</div>
|
|
1180
|
+
```
|
|
1181
|
+
|
|
1182
|
+
</details>
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
### Reports
|
|
1186
|
+
|
|
1187
|
+
<details>
|
|
1188
|
+
<summary>Reports Actions</summary>
|
|
1189
|
+
|
|
1190
|
+
`reports_actions`
|
|
1191
|
+
|
|
1192
|
+
Injects code into the page actions area for the reports list page.
|
|
1193
|
+
|
|
1194
|
+
```erb
|
|
1195
|
+
<%= link_to "Schedule Report", schedule_report_path, class: "btn btn-secondary" %>
|
|
1196
|
+
```
|
|
1197
|
+
|
|
1198
|
+
</details>
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
<details>
|
|
1202
|
+
<summary>Reports Header</summary>
|
|
1203
|
+
|
|
1204
|
+
`reports_header`
|
|
1205
|
+
|
|
1206
|
+
Injects code between the page header and the main content area for the reports list page.
|
|
1207
|
+
|
|
1208
|
+
```erb
|
|
1209
|
+
<div class="alert alert-info">
|
|
1210
|
+
<strong>Automation:</strong> Reports can be scheduled to run automatically.
|
|
1211
|
+
</div>
|
|
1212
|
+
```
|
|
1213
|
+
|
|
1214
|
+
</details>
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
### Return Authorization Reasons
|
|
1218
|
+
|
|
1219
|
+
<details>
|
|
1220
|
+
<summary>Return Authorization Reasons Actions</summary>
|
|
1221
|
+
|
|
1222
|
+
`return_authorization_reasons_actions`
|
|
1223
|
+
|
|
1224
|
+
Injects code into the page actions area for the return authorization reasons list page.
|
|
1225
|
+
|
|
1226
|
+
```erb
|
|
1227
|
+
<%= link_to "Export Reasons", export_return_reasons_path, class: "btn btn-secondary" %>
|
|
1228
|
+
```
|
|
1229
|
+
|
|
1230
|
+
</details>
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
<details>
|
|
1234
|
+
<summary>Return Authorization Reasons Header</summary>
|
|
1235
|
+
|
|
1236
|
+
`return_authorization_reasons_header`
|
|
1237
|
+
|
|
1238
|
+
Injects code between the page header and the main content area for the return authorization reasons list page.
|
|
1239
|
+
|
|
1240
|
+
```erb
|
|
1241
|
+
<div class="alert alert-info">
|
|
1242
|
+
<strong>Policy:</strong> Define clear return reasons to streamline the process.
|
|
1243
|
+
</div>
|
|
1244
|
+
```
|
|
1245
|
+
|
|
1246
|
+
</details>
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
### Return Authorizations
|
|
1250
|
+
|
|
1251
|
+
<details>
|
|
1252
|
+
<summary>Return Authorizations Actions</summary>
|
|
1253
|
+
|
|
1254
|
+
`return_authorizations_actions`
|
|
1255
|
+
|
|
1256
|
+
Injects code into the page actions area for the return authorizations list page.
|
|
1257
|
+
|
|
1258
|
+
```erb
|
|
1259
|
+
<%= link_to "Bulk Process", bulk_process_returns_path, class: "btn btn-secondary" %>
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
</details>
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
<details>
|
|
1266
|
+
<summary>Return Authorizations Header</summary>
|
|
1267
|
+
|
|
1268
|
+
`return_authorizations_header`
|
|
1269
|
+
|
|
1270
|
+
Injects code between the page header and the main content area for the return authorizations list page.
|
|
1271
|
+
|
|
1272
|
+
```erb
|
|
1273
|
+
<div class="alert alert-info">
|
|
1274
|
+
<strong>Processing:</strong> Returns are processed in order of submission.
|
|
1275
|
+
</div>
|
|
1276
|
+
```
|
|
1277
|
+
|
|
1278
|
+
</details>
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
### Roles
|
|
1282
|
+
|
|
1283
|
+
<details>
|
|
1284
|
+
<summary>Roles Actions</summary>
|
|
1285
|
+
|
|
1286
|
+
`roles_actions`
|
|
1287
|
+
|
|
1288
|
+
Injects code into the page actions area for the roles list page.
|
|
1289
|
+
|
|
1290
|
+
```erb
|
|
1291
|
+
<%= link_to "Export Permissions", export_role_permissions_path, class: "btn btn-secondary" %>
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
</details>
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
<details>
|
|
1298
|
+
<summary>Roles Header</summary>
|
|
1299
|
+
|
|
1300
|
+
`roles_header`
|
|
1301
|
+
|
|
1302
|
+
Injects code between the page header and the main content area for the roles list page.
|
|
1303
|
+
|
|
1304
|
+
```erb
|
|
1305
|
+
<div class="alert alert-warning">
|
|
1306
|
+
<strong>Security:</strong> Review role permissions regularly for security.
|
|
1307
|
+
</div>
|
|
1308
|
+
```
|
|
1309
|
+
|
|
1310
|
+
</details>
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
### Shipping Categories
|
|
1314
|
+
|
|
1315
|
+
<details>
|
|
1316
|
+
<summary>Shipping Categories Actions</summary>
|
|
1317
|
+
|
|
1318
|
+
`shipping_categories_actions`
|
|
1319
|
+
|
|
1320
|
+
Injects code into the page actions area for the shipping categories list page.
|
|
1321
|
+
|
|
1322
|
+
```erb
|
|
1323
|
+
<%= link_to "Calculate Rates", calculate_shipping_rates_path, class: "btn btn-secondary" %>
|
|
1324
|
+
```
|
|
1325
|
+
|
|
1326
|
+
</details>
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
<details>
|
|
1330
|
+
<summary>Shipping Categories Header</summary>
|
|
1331
|
+
|
|
1332
|
+
`shipping_categories_header`
|
|
1333
|
+
|
|
1334
|
+
Injects code between the page header and the main content area for the shipping categories list page.
|
|
1335
|
+
|
|
1336
|
+
```erb
|
|
1337
|
+
<div class="alert alert-info">
|
|
1338
|
+
<strong>Organization:</strong> Use categories to group products with similar shipping requirements.
|
|
1339
|
+
</div>
|
|
1340
|
+
```
|
|
1341
|
+
|
|
1342
|
+
</details>
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
### Shipping Methods
|
|
1346
|
+
|
|
1347
|
+
<details>
|
|
1348
|
+
<summary>Shipping Methods Actions</summary>
|
|
1349
|
+
|
|
1350
|
+
`shipping_methods_actions`
|
|
1351
|
+
|
|
1352
|
+
Injects code into the page actions area for the shipping methods list page.
|
|
1353
|
+
|
|
1354
|
+
```erb
|
|
1355
|
+
<%= link_to "Test Integrations", test_shipping_integrations_path, class: "btn btn-secondary" %>
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
</details>
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
<details>
|
|
1362
|
+
<summary>Shipping Methods Header</summary>
|
|
1363
|
+
|
|
1364
|
+
`shipping_methods_header`
|
|
1365
|
+
|
|
1366
|
+
Injects code between the page header and the main content area for the shipping methods list page.
|
|
1367
|
+
|
|
1368
|
+
```erb
|
|
1369
|
+
<div class="alert alert-info">
|
|
1370
|
+
<strong>Configuration:</strong> Ensure shipping methods are properly configured for all zones.
|
|
1371
|
+
</div>
|
|
1372
|
+
```
|
|
1373
|
+
|
|
1374
|
+
</details>
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
### Stock Locations
|
|
1378
|
+
|
|
1379
|
+
<details>
|
|
1380
|
+
<summary>Stock Locations Actions</summary>
|
|
1381
|
+
|
|
1382
|
+
`stock_locations_actions`
|
|
1383
|
+
|
|
1384
|
+
Injects code into the page actions area for the stock locations list page.
|
|
1385
|
+
|
|
1386
|
+
```erb
|
|
1387
|
+
<%= link_to "Sync Inventory", sync_all_locations_path, class: "btn btn-secondary" %>
|
|
1388
|
+
```
|
|
1389
|
+
|
|
1390
|
+
</details>
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
<details>
|
|
1394
|
+
<summary>Stock Locations Header</summary>
|
|
1395
|
+
|
|
1396
|
+
`stock_locations_header`
|
|
1397
|
+
|
|
1398
|
+
Injects code between the page header and the main content area for the stock locations list page.
|
|
1399
|
+
|
|
1400
|
+
```erb
|
|
1401
|
+
<div class="alert alert-info">
|
|
1402
|
+
<strong>Management:</strong> Stock locations help manage inventory across multiple warehouses.
|
|
1403
|
+
</div>
|
|
1404
|
+
```
|
|
1405
|
+
|
|
1406
|
+
</details>
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
### Stock Transfers
|
|
1410
|
+
|
|
1411
|
+
<details>
|
|
1412
|
+
<summary>Stock Transfers Actions</summary>
|
|
1413
|
+
|
|
1414
|
+
`stock_transfers_actions`
|
|
1415
|
+
|
|
1416
|
+
Injects code into the page actions area for the stock transfers list page.
|
|
1417
|
+
|
|
1418
|
+
```erb
|
|
1419
|
+
<%= link_to "Bulk Transfer", bulk_stock_transfer_path, class: "btn btn-secondary" %>
|
|
1420
|
+
```
|
|
1421
|
+
|
|
1422
|
+
</details>
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
<details>
|
|
1426
|
+
<summary>Stock Transfers Header</summary>
|
|
1427
|
+
|
|
1428
|
+
`stock_transfers_header`
|
|
1429
|
+
|
|
1430
|
+
Injects code between the page header and the main content area for the stock transfers list page.
|
|
1431
|
+
|
|
1432
|
+
```erb
|
|
1433
|
+
<div class="alert alert-info">
|
|
1434
|
+
<strong>Tracking:</strong> All stock transfers are logged for audit purposes.
|
|
1435
|
+
</div>
|
|
1436
|
+
```
|
|
1437
|
+
|
|
1438
|
+
</details>
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
<details>
|
|
1442
|
+
<summary>Stock Transfers Filters</summary>
|
|
1443
|
+
|
|
1444
|
+
`stock_transfers_filters`
|
|
1445
|
+
|
|
1446
|
+
#### Variables
|
|
1447
|
+
|
|
1448
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1449
|
+
|
|
1450
|
+
Injects code into the stock transfers list filters.
|
|
1451
|
+
|
|
1452
|
+
```erb
|
|
1453
|
+
<%= f.spree_select :status_eq,
|
|
1454
|
+
[["Pending", "pending"], ["Completed", "completed"]],
|
|
1455
|
+
{ include_blank: true, label: "Transfer Status" },
|
|
1456
|
+
{ data: { filters_target: :input } } %>
|
|
1457
|
+
```
|
|
1458
|
+
|
|
1459
|
+
> **TIP:** Use [ransack](/developer/core-concepts/search-filtering) search syntax for filter field names.
|
|
1460
|
+
|
|
1461
|
+
</details>
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
### Store Credit Categories
|
|
1465
|
+
|
|
1466
|
+
<details>
|
|
1467
|
+
<summary>Store Credit Categories Actions</summary>
|
|
1468
|
+
|
|
1469
|
+
`store_credit_categories_actions`
|
|
1470
|
+
|
|
1471
|
+
Injects code into the page actions area for the store credit categories list page.
|
|
1472
|
+
|
|
1473
|
+
```erb
|
|
1474
|
+
<%= link_to "Set Default Category", set_default_credit_category_path, class: "btn btn-secondary" %>
|
|
1475
|
+
```
|
|
1476
|
+
|
|
1477
|
+
</details>
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
<details>
|
|
1481
|
+
<summary>Store Credit Categories Header</summary>
|
|
1482
|
+
|
|
1483
|
+
`store_credit_categories_header`
|
|
1484
|
+
|
|
1485
|
+
Injects code between the page header and the main content area for the store credit categories list page.
|
|
1486
|
+
|
|
1487
|
+
```erb
|
|
1488
|
+
<div class="alert alert-info">
|
|
1489
|
+
<strong>Organization:</strong> Use categories to organize different types of store credits.
|
|
1490
|
+
</div>
|
|
1491
|
+
```
|
|
1492
|
+
|
|
1493
|
+
</details>
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
### Store Credits
|
|
1497
|
+
|
|
1498
|
+
<details>
|
|
1499
|
+
<summary>Store Credits Actions</summary>
|
|
1500
|
+
|
|
1501
|
+
`store_credits_actions`
|
|
1502
|
+
|
|
1503
|
+
Injects code into the page actions area for the store credits list page.
|
|
1504
|
+
|
|
1505
|
+
```erb
|
|
1506
|
+
<%= link_to "Bulk Issue Credits", bulk_issue_credits_path, class: "btn btn-secondary" %>
|
|
1507
|
+
```
|
|
1508
|
+
|
|
1509
|
+
</details>
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
<details>
|
|
1513
|
+
<summary>Store Credits Header</summary>
|
|
1514
|
+
|
|
1515
|
+
`store_credits_header`
|
|
1516
|
+
|
|
1517
|
+
Injects code between the page header and the main content area for the store credits list page.
|
|
1518
|
+
|
|
1519
|
+
```erb
|
|
1520
|
+
<div class="alert alert-info">
|
|
1521
|
+
<strong>Management:</strong> Store credits can be issued for returns, promotions, or customer service.
|
|
1522
|
+
</div>
|
|
1523
|
+
```
|
|
1524
|
+
|
|
1525
|
+
</details>
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
### Tax Categories
|
|
1529
|
+
|
|
1530
|
+
<details>
|
|
1531
|
+
<summary>Tax Categories Actions</summary>
|
|
1532
|
+
|
|
1533
|
+
`tax_categories_actions`
|
|
1534
|
+
|
|
1535
|
+
Injects code into the page actions area for the tax categories list page.
|
|
1536
|
+
|
|
1537
|
+
```erb
|
|
1538
|
+
<%= link_to "Update Tax Rates", update_all_tax_rates_path, class: "btn btn-secondary" %>
|
|
1539
|
+
```
|
|
1540
|
+
|
|
1541
|
+
</details>
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
<details>
|
|
1545
|
+
<summary>Tax Categories Header</summary>
|
|
1546
|
+
|
|
1547
|
+
`tax_categories_header`
|
|
1548
|
+
|
|
1549
|
+
Injects code between the page header and the main content area for the tax categories list page.
|
|
1550
|
+
|
|
1551
|
+
```erb
|
|
1552
|
+
<div class="alert alert-warning">
|
|
1553
|
+
<strong>Compliance:</strong> Ensure tax categories comply with local regulations.
|
|
1554
|
+
</div>
|
|
1555
|
+
```
|
|
1556
|
+
|
|
1557
|
+
</details>
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
### Tax Rates
|
|
1561
|
+
|
|
1562
|
+
<details>
|
|
1563
|
+
<summary>Tax Rates Actions</summary>
|
|
1564
|
+
|
|
1565
|
+
`tax_rates_actions`
|
|
1566
|
+
|
|
1567
|
+
Injects code into the page actions area for the tax rates list page.
|
|
1568
|
+
|
|
1569
|
+
```erb
|
|
1570
|
+
<%= link_to "Import Tax Updates", import_tax_updates_path, class: "btn btn-secondary" %>
|
|
1571
|
+
```
|
|
1572
|
+
|
|
1573
|
+
</details>
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
<details>
|
|
1577
|
+
<summary>Tax Rates Header</summary>
|
|
1578
|
+
|
|
1579
|
+
`tax_rates_header`
|
|
1580
|
+
|
|
1581
|
+
Injects code between the page header and the main content area for the tax rates list page.
|
|
1582
|
+
|
|
1583
|
+
```erb
|
|
1584
|
+
<div class="alert alert-warning">
|
|
1585
|
+
<strong>Updates:</strong> Tax rates should be reviewed and updated regularly.
|
|
1586
|
+
</div>
|
|
1587
|
+
```
|
|
1588
|
+
|
|
1589
|
+
</details>
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
### Taxonomies
|
|
1593
|
+
|
|
1594
|
+
<details>
|
|
1595
|
+
<summary>Taxonomies Actions</summary>
|
|
1596
|
+
|
|
1597
|
+
`taxonomies_actions`
|
|
1598
|
+
|
|
1599
|
+
Injects code into the page actions area for the taxonomies list page.
|
|
1600
|
+
|
|
1601
|
+
```erb
|
|
1602
|
+
<%= link_to "Rebuild Tree", rebuild_taxonomy_tree_path, class: "btn btn-secondary" %>
|
|
1603
|
+
```
|
|
1604
|
+
|
|
1605
|
+
</details>
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
<details>
|
|
1609
|
+
<summary>Taxonomies Header</summary>
|
|
1610
|
+
|
|
1611
|
+
`taxonomies_header`
|
|
1612
|
+
|
|
1613
|
+
Injects code between the page header and the main content area for the taxonomies list page.
|
|
1614
|
+
|
|
1615
|
+
```erb
|
|
1616
|
+
<div class="alert alert-info">
|
|
1617
|
+
<strong>Navigation:</strong> Taxonomies are used to create product category navigation.
|
|
1618
|
+
</div>
|
|
1619
|
+
```
|
|
1620
|
+
|
|
1621
|
+
</details>
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
### Themes
|
|
1625
|
+
|
|
1626
|
+
<details>
|
|
1627
|
+
<summary>Themes Actions</summary>
|
|
1628
|
+
|
|
1629
|
+
`themes_actions`
|
|
1630
|
+
|
|
1631
|
+
Injects code into the page actions area for the themes list page.
|
|
1632
|
+
|
|
1633
|
+
```erb
|
|
1634
|
+
<%= link_to "Preview All", preview_all_themes_path, class: "btn btn-secondary" %>
|
|
1635
|
+
```
|
|
1636
|
+
|
|
1637
|
+
</details>
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
<details>
|
|
1641
|
+
<summary>Themes Header</summary>
|
|
1642
|
+
|
|
1643
|
+
`themes_header`
|
|
1644
|
+
|
|
1645
|
+
Injects code between the page header and the main content area for the themes list page.
|
|
1646
|
+
|
|
1647
|
+
```erb
|
|
1648
|
+
<div class="alert alert-info">
|
|
1649
|
+
<strong>Customization:</strong> Themes control the visual appearance of your storefront.
|
|
1650
|
+
</div>
|
|
1651
|
+
```
|
|
1652
|
+
|
|
1653
|
+
</details>
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
### Webhooks Subscribers
|
|
1657
|
+
|
|
1658
|
+
<details>
|
|
1659
|
+
<summary>Webhooks Subscribers Actions</summary>
|
|
1660
|
+
|
|
1661
|
+
`webhooks_subscribers_actions`
|
|
1662
|
+
|
|
1663
|
+
Injects code into the page actions area for the webhooks subscribers list page.
|
|
1664
|
+
|
|
1665
|
+
```erb
|
|
1666
|
+
<%= link_to "Test All Webhooks", test_all_webhooks_path, class: "btn btn-secondary" %>
|
|
1667
|
+
```
|
|
1668
|
+
|
|
1669
|
+
</details>
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
<details>
|
|
1673
|
+
<summary>Webhooks Subscribers Header</summary>
|
|
1674
|
+
|
|
1675
|
+
`webhooks_subscribers_header`
|
|
1676
|
+
|
|
1677
|
+
Injects code between the page header and the main content area for the webhooks subscribers list page.
|
|
1678
|
+
|
|
1679
|
+
```erb
|
|
1680
|
+
<div class="alert alert-warning">
|
|
1681
|
+
<strong>Monitoring:</strong> Monitor webhook delivery status and failures.
|
|
1682
|
+
</div>
|
|
1683
|
+
```
|
|
1684
|
+
|
|
1685
|
+
</details>
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
### Zones
|
|
1689
|
+
|
|
1690
|
+
<details>
|
|
1691
|
+
<summary>Zones Actions</summary>
|
|
1692
|
+
|
|
1693
|
+
`zones_actions`
|
|
1694
|
+
|
|
1695
|
+
Injects code into the page actions area for the zones list page.
|
|
1696
|
+
|
|
1697
|
+
```erb
|
|
1698
|
+
<%= link_to "Import Zones", import_zones_path, class: "btn btn-secondary" %>
|
|
1699
|
+
```
|
|
1700
|
+
|
|
1701
|
+
</details>
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
<details>
|
|
1705
|
+
<summary>Zones Header</summary>
|
|
1706
|
+
|
|
1707
|
+
`zones_header`
|
|
1708
|
+
|
|
1709
|
+
Injects code between the page header and the main content area for the zones list page.
|
|
1710
|
+
|
|
1711
|
+
```erb
|
|
1712
|
+
<div class="alert alert-info">
|
|
1713
|
+
<strong>Geography:</strong> Zones define geographic regions for shipping and taxation.
|
|
1714
|
+
</div>
|
|
1715
|
+
```
|
|
1716
|
+
|
|
1717
|
+
</details>
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
### Products
|
|
1721
|
+
|
|
1722
|
+
<details>
|
|
1723
|
+
<summary>Products Actions</summary>
|
|
1724
|
+
|
|
1725
|
+
`products_actions`
|
|
1726
|
+
|
|
1727
|
+
Injects code into the page actions area (top right of the page) for the products list page. This is useful for adding custom buttons, export options, or other actions.
|
|
1728
|
+
|
|
1729
|
+
```erb
|
|
1730
|
+
<%= link_to "Sync with PIM", sync_products_path, class: "btn btn-secondary" %>
|
|
1731
|
+
```
|
|
1732
|
+
|
|
1733
|
+
</details>
|
|
1734
|
+
|
|
1735
|
+
|
|
1736
|
+
<details>
|
|
1737
|
+
<summary>Products Header</summary>
|
|
1738
|
+
|
|
1739
|
+
`products_header`
|
|
1740
|
+
|
|
1741
|
+
Injects code between the page header and the main content area for the products list page. This is useful for adding notifications, alerts, or additional information.
|
|
1742
|
+
|
|
1743
|
+
```erb
|
|
1744
|
+
<div class="alert alert-info">
|
|
1745
|
+
<strong>Inventory:</strong> Product inventory is synced with warehouse systems every 15 minutes.
|
|
1746
|
+
</div>
|
|
1747
|
+
```
|
|
1748
|
+
|
|
1749
|
+
</details>
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
<details>
|
|
1753
|
+
<summary>Products Filters</summary>
|
|
1754
|
+
|
|
1755
|
+
`products_filters`
|
|
1756
|
+
|
|
1757
|
+
<img src="/images/developer/admin/products_filters.png" />
|
|
1758
|
+
|
|
1759
|
+
#### Variables
|
|
1760
|
+
|
|
1761
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1762
|
+
|
|
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
|
+
|
|
1765
|
+
To add a new filter field, you can use the following code:
|
|
1766
|
+
|
|
1767
|
+
```erb
|
|
1768
|
+
<%= f.spree_text_field :q_name_cont, data: { filters_target: :input } %>
|
|
1769
|
+
```
|
|
1770
|
+
|
|
1771
|
+
> **TIP:** * `q_name_cont` is the name of the filter field. For filtering we're using [ransack](/developer/core-concepts/search-filtering) gem, so the name of the filter field is the name of the attribute we're filtering by.
|
|
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
|
+
|
|
1774
|
+
</details>
|
|
1775
|
+
|
|
1776
|
+
|
|
1777
|
+
<details>
|
|
1778
|
+
<summary>Products Page Dropdown</summary>
|
|
1779
|
+
|
|
1780
|
+
`product_dropdown`
|
|
1781
|
+
|
|
1782
|
+
<img src="/images/developer/admin/product_dropdown.png" />
|
|
1783
|
+
|
|
1784
|
+
Injects code into the products page dropdown. This partial has access to the `product` variable.
|
|
1785
|
+
|
|
1786
|
+
To add an additional dropdown item, you can use the following code:
|
|
1787
|
+
|
|
1788
|
+
```erb
|
|
1789
|
+
<%= link_to "View Product in WMS", "https://wms.com/products/#{product.id}", class: "dropdown-item", target: "_blank" %>
|
|
1790
|
+
```
|
|
1791
|
+
|
|
1792
|
+
> **INFO:** Your code will be placed before the dropdown divider.
|
|
1793
|
+
|
|
1794
|
+
</details>
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
<details>
|
|
1798
|
+
<summary>Products Page Form</summary>
|
|
1799
|
+
|
|
1800
|
+
`product_form`
|
|
1801
|
+
|
|
1802
|
+
<img src="/images/developer/admin/product_form.png" />
|
|
1803
|
+
|
|
1804
|
+
#### Variables
|
|
1805
|
+
|
|
1806
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1807
|
+
|
|
1808
|
+
- **`product`** (`Spree::Product`) — The [Spree::Product](https://github.com/spree/spree/blob/main/core/app/models/spree/product.rb) object.
|
|
1809
|
+
|
|
1810
|
+
Injects code into the product form. This partial has access to the `f` variable, which is the form builder for the product form, and the `product` variable.
|
|
1811
|
+
|
|
1812
|
+
To add a new section to the product form, you can use the following code:
|
|
1813
|
+
|
|
1814
|
+
```erb
|
|
1815
|
+
<div class="card mb-6">
|
|
1816
|
+
<div class="card-header">
|
|
1817
|
+
<h5 class="card-title">ERP Integration</h5>
|
|
1818
|
+
</div>
|
|
1819
|
+
<div class="card-body">
|
|
1820
|
+
<%= f.spree_text_field :erp_product_id %>
|
|
1821
|
+
</div>
|
|
1822
|
+
</div>
|
|
1823
|
+
```
|
|
1824
|
+
|
|
1825
|
+
> **INFO:** The partial will be displayed for both new product form and edit product form.
|
|
1826
|
+
|
|
1827
|
+
> **TIP:** If you want to display the partial only on the edit product form, you can use the following code:
|
|
1828
|
+
>
|
|
1829
|
+
> ```erb
|
|
1830
|
+
<% if product.persisted? %>
|
|
1831
|
+
<%# ... your code ... %>
|
|
1832
|
+
<% end %>
|
|
1833
|
+
```
|
|
1834
|
+
>
|
|
1835
|
+
> And similarly for the new product form.
|
|
1836
|
+
>
|
|
1837
|
+
> ```erb
|
|
1838
|
+
<% if product.new_record? %>
|
|
1839
|
+
<%# ... your code ... %>
|
|
1840
|
+
<% end %>
|
|
1841
|
+
```
|
|
1842
|
+
|
|
1843
|
+
</details>
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
<details>
|
|
1847
|
+
<summary>Products Page Sidebar</summary>
|
|
1848
|
+
|
|
1849
|
+
`product_form_sidebar`
|
|
1850
|
+
|
|
1851
|
+
<img src="/images/developer/admin/product_form_sidebar.png" />
|
|
1852
|
+
|
|
1853
|
+
#### Variables
|
|
1854
|
+
|
|
1855
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1856
|
+
|
|
1857
|
+
- **`product`** (`Spree::Product`) — The [Spree::Product](https://github.com/spree/spree/blob/main/core/app/models/spree/product.rb) object.
|
|
1858
|
+
|
|
1859
|
+
Injects code into the product form sidebar. This partial has access to the `f` variable, which is the form builder for the product form, and the `product` variable.
|
|
1860
|
+
|
|
1861
|
+
To add a new section to the product form sidebar, you can use the following code:
|
|
1862
|
+
|
|
1863
|
+
```erb
|
|
1864
|
+
<div class="card mb-6">
|
|
1865
|
+
<div class="card-header">
|
|
1866
|
+
<h5 class="card-title">ERP Integration</h5>
|
|
1867
|
+
</div>
|
|
1868
|
+
<div class="card-body">
|
|
1869
|
+
<%= f.spree_text_field :erp_product_id %>
|
|
1870
|
+
</div>
|
|
1871
|
+
</div>
|
|
1872
|
+
```
|
|
1873
|
+
|
|
1874
|
+
> **INFO:** The partial will be displayed for both new product form and edit product form.
|
|
1875
|
+
|
|
1876
|
+
> **TIP:** If you want to display the partial only on the edit product form, you can use the following code:
|
|
1877
|
+
>
|
|
1878
|
+
> ```erb
|
|
1879
|
+
<% if product.persisted? %>
|
|
1880
|
+
<%# ... your code ... %>
|
|
1881
|
+
<% end %>
|
|
1882
|
+
```
|
|
1883
|
+
>
|
|
1884
|
+
> And similarly for the new product form.
|
|
1885
|
+
>
|
|
1886
|
+
> ```erb
|
|
1887
|
+
<% if product.new_record? %>
|
|
1888
|
+
<%# ... your code ... %>
|
|
1889
|
+
<% end %>
|
|
1890
|
+
```
|
|
1891
|
+
|
|
1892
|
+
</details>
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
### Shipping Methods
|
|
1896
|
+
|
|
1897
|
+
<details>
|
|
1898
|
+
<summary>Shipping Methods Form</summary>
|
|
1899
|
+
|
|
1900
|
+
`shipping_method_form`
|
|
1901
|
+
|
|
1902
|
+
#### Variables
|
|
1903
|
+
|
|
1904
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1905
|
+
|
|
1906
|
+
- **`shipping_method`** (`Spree::ShippingMethod`) — The [Spree::ShippingMethod](https://github.com/spree/spree/blob/main/core/app/models/spree/shipping_method.rb) object.
|
|
1907
|
+
|
|
1908
|
+
Injects code into the shipping method form. This partial has access to the `f` variable, which is the form builder for the shipping method form, and the `shipping_method` variable.
|
|
1909
|
+
|
|
1910
|
+
To add a new section to the shipping method form, you can use the following code:
|
|
1911
|
+
|
|
1912
|
+
```erb
|
|
1913
|
+
<div class="card mb-6">
|
|
1914
|
+
<div class="card-header">
|
|
1915
|
+
<h5 class="card-title">ERP Integration</h5>
|
|
1916
|
+
</div>
|
|
1917
|
+
<div class="card-body">
|
|
1918
|
+
<%= f.spree_text_field :erp_shipping_method_id %>
|
|
1919
|
+
</div>
|
|
1920
|
+
</div>
|
|
1921
|
+
```
|
|
1922
|
+
|
|
1923
|
+
</details>
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
### Store Settings
|
|
1927
|
+
|
|
1928
|
+
<details>
|
|
1929
|
+
<summary>Store Settings Form</summary>
|
|
1930
|
+
|
|
1931
|
+
`store_form`
|
|
1932
|
+
|
|
1933
|
+
<img src="/images/developer/admin/store_form.png" />
|
|
1934
|
+
|
|
1935
|
+
#### Variables
|
|
1936
|
+
|
|
1937
|
+
- **`f`** (`Spree::Admin::FormBuilder`) — The [Spree::Admin::FormBuilder](/developer/admin/form-builder) object.
|
|
1938
|
+
|
|
1939
|
+
- **`store`** (`Spree::Store`) — The [Spree::Store](https://github.com/spree/spree/blob/main/core/app/models/spree/store.rb) object.
|
|
1940
|
+
|
|
1941
|
+
Injects code into the store settings form. This partial has access to the `f` variable, which is the form builder for the store form, and the `store` variable.
|
|
1942
|
+
|
|
1943
|
+
To add a new section to the store form, you can use the following code:
|
|
1944
|
+
|
|
1945
|
+
```erb
|
|
1946
|
+
<div class="card mb-6">
|
|
1947
|
+
<div class="card-header">
|
|
1948
|
+
<h5 class="card-title">ERP Integration</h5>
|
|
1949
|
+
</div>
|
|
1950
|
+
<div class="card-body">
|
|
1951
|
+
<%= f.spree_text_field :erp_store_id %>
|
|
1952
|
+
</div>
|
|
1953
|
+
</div>
|
|
1954
|
+
```
|
|
1955
|
+
|
|
1956
|
+
</details>
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
## Related Documentation
|
|
1960
|
+
|
|
1961
|
+
- [Admin Navigation](/developer/admin/navigation) - Add custom menu items to the admin
|
|
1962
|
+
- [Admin Tables](/developer/admin/tables) - Customize admin list views
|
|
1963
|
+
- [Form Builder](/developer/admin/form-builder) - Build admin forms with Spree's form helpers
|
|
1964
|
+
- [Customization Quickstart](/developer/customization/quickstart) - Overview of all customization options
|