@spree/docs 0.1.176 → 0.1.178

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