How it works
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_partials
.
Let’s say you want to add a new footer to the admin dashboard. You’ll need to generate a template in your application:
-
Ensure you have the proper directory to store your templates:
-
Create a new partial template file (partial templates file names start with underscore)
-
Add your own code to the partial
-
Register your partial in
config/initializers/spree.rb
The key is the name of the injection point, eg.body_end_partials
.Remember to use the correct path to your partial and skip the_
prefix. -
Restart your web server and you should see your new footer.
Making further changes to the partial template will not require you to restart the web server. They will be picked up automatically.
Admin Dashboard injection points
Here’s a list of all places you can inject your custom code:Layout
<head>
<head>
head_partials
Injects code into the <head>
tag<body>
<body>
body_start_partials
Injects code into the <body>
tag, before the main content</body>
</body>
body_end_partials
Injects code into the <body>
tag, after the main contentDashboard
Analytics
Analytics
dashboard_analytics_partials

Sidebar
Sidebar
Orders
Orders Actions
Orders Actions
orders_actions_partials
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.Orders Header
Orders Header
orders_header_partials
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.Orders Filters
Orders Filters
orders_filters_partials

Variables
f
variable, which is the form builder for the filters, eg.q_number_cont
- The name of the filter field. For filtering we’re using ransack gem, so the name of the filter field is the name of the attribute we’re filtering by. Learn more about ransack search syntax.form-control
- A bootstrap class for styling the input field.data: { filters_target: :input }
- Needed for the Stimulus Filters controller to work.
Order Page Dropdown
Order Page Dropdown
order_page_dropdown_partials

Variables
order
variable.To add an additional dropdown item, you can use the following code:dropdown-item
is a bootstrap class for styling the dropdown itemtarget: "_blank"
is used to open the link in a new tab
Order Page Header
Order Page Header
order_page_header_partials

Variables
...
button, you can use the following code:
...
button, you can use the following code: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).Order Page Body
Order Page Body
order_page_body_partials

Variables
order
variable.To add a new section to the order page, you can use the following code:Order Page Sidebar
Order Page Sidebar
Customers
Customers Actions
Customers Actions
users_actions_partials
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.Customers Header
Customers Header
users_header_partials
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.Customers Filters
Customers Filters
users_filters_partials
Variables
f
variable, which is the form builder for the filters.- Use ransack search syntax for filter field names
- Include
data: { filters_target: :input }
for proper integration with the Stimulus Filters controller
Stock Items
Stock Items Actions
Stock Items Actions
stock_items_actions_partials
Injects code into the page actions area for the stock items list page.Stock Items Header
Stock Items Header
stock_items_header_partials
Injects code between the page header and the main content area for the stock items list page.Stock Items Filters
Stock Items Filters
stock_items_filters_partials
Variables
Admin Users
Admin Users Actions
Admin Users Actions
admin_users_actions_partials
Injects code into the page actions area for the admin users list page.Admin Users Header
Admin Users Header
admin_users_header_partials
Injects code between the page header and the main content area for the admin users list page.Classifications
Classifications Actions
Classifications Actions
classifications_actions_partials
Injects code into the page actions area for the classifications list page.Classifications Header
Classifications Header
classifications_header_partials
Injects code between the page header and the main content area for the classifications list page.Coupon Codes
Coupon Codes Actions
Coupon Codes Actions
coupon_codes_actions_partials
Injects code into the page actions area for the coupon codes list page.Coupon Codes Header
Coupon Codes Header
coupon_codes_header_partials
Injects code between the page header and the main content area for the coupon codes list page.Custom Domains
Custom Domains Actions
Custom Domains Actions
custom_domains_actions_partials
Injects code into the page actions area for the custom domains list page.Custom Domains Header
Custom Domains Header
custom_domains_header_partials
Injects code between the page header and the main content area for the custom domains list page.Customer Returns
Customer Returns Actions
Customer Returns Actions
customer_returns_actions_partials
Injects code into the page actions area for the customer returns list page.Customer Returns Header
Customer Returns Header
customer_returns_header_partials
Injects code between the page header and the main content area for the customer returns list page.Customer Returns Filters
Customer Returns Filters
customer_returns_filters_partials
Variables
Digital Assets
Digital Assets Actions
Digital Assets Actions
digital_assets_actions_partials
Injects code into the page actions area for the digital assets list page.Digital Assets Header
Digital Assets Header
digital_assets_header_partials
Injects code between the page header and the main content area for the digital assets list page.Exports
Exports Actions
Exports Actions
exports_actions_partials
Injects code into the page actions area for the exports list page.Exports Header
Exports Header
exports_header_partials
Injects code between the page header and the main content area for the exports list page.Gift Cards
Gift Cards Actions
Gift Cards Actions
gift_cards_actions_partials
Injects code into the page actions area for the gift cards list page.Gift Cards Header
Gift Cards Header
gift_cards_header_partials
Injects code between the page header and the main content area for the gift cards list page.Gift Cards Filters
Gift Cards Filters
gift_cards_filters_partials
Variables
Integrations
Integrations Actions
Integrations Actions
integrations_actions_partials
Injects code into the page actions area for the integrations list page.Integrations Header
Integrations Header
integrations_header_partials
Injects code between the page header and the main content area for the integrations list page.Invitations
Invitations Actions
Invitations Actions
invitations_actions_partials
Injects code into the page actions area for the invitations list page.Invitations Header
Invitations Header
invitations_header_partials
Injects code between the page header and the main content area for the invitations list page.OAuth Applications
OAuth Applications Actions
OAuth Applications Actions
oauth_applications_actions_partials
Injects code into the page actions area for the OAuth applications list page.OAuth Applications Header
OAuth Applications Header
oauth_applications_header_partials
Injects code between the page header and the main content area for the OAuth applications list page.Option Types
Option Types Actions
Option Types Actions
option_types_actions_partials
Injects code into the page actions area for the option types list page.Option Types Header
Option Types Header
option_types_header_partials
Injects code between the page header and the main content area for the option types list page.Pages
Pages Actions
Pages Actions
pages_actions_partials
Injects code into the page actions area for the pages list page.Pages Header
Pages Header
pages_header_partials
Injects code between the page header and the main content area for the pages list page.Payment Methods
Payment Methods Actions
Payment Methods Actions
payment_methods_actions_partials
Injects code into the page actions area for the payment methods list page.Payment Methods Header
Payment Methods Header
payment_methods_header_partials
Injects code between the page header and the main content area for the payment methods list page.Post Categories
Post Categories Actions
Post Categories Actions
post_categories_actions_partials
Injects code into the page actions area for the post categories list page.Post Categories Header
Post Categories Header
post_categories_header_partials
Injects code between the page header and the main content area for the post categories list page.Posts
Posts Actions
Posts Actions
posts_actions_partials
Injects code into the page actions area for the posts list page.Posts Header
Posts Header
posts_header_partials
Injects code between the page header and the main content area for the posts list page.Posts Filters
Posts Filters
posts_filters_partials
Variables
Promotions
Promotions Actions
Promotions Actions
promotions_actions_partials
Injects code into the page actions area for the promotions list page.Promotions Header
Promotions Header
promotions_header_partials
Injects code between the page header and the main content area for the promotions list page.Promotions Filters
Promotions Filters
promotions_filters_partials
Variables
Properties
Properties Actions
Properties Actions
properties_actions_partials
Injects code into the page actions area for the properties list page.Properties Header
Properties Header
properties_header_partials
Injects code between the page header and the main content area for the properties list page.Refund Reasons
Refund Reasons Actions
Refund Reasons Actions
refund_reasons_actions_partials
Injects code into the page actions area for the refund reasons list page.Refund Reasons Header
Refund Reasons Header
refund_reasons_header_partials
Injects code between the page header and the main content area for the refund reasons list page.Reimbursement Types
Reimbursement Types Actions
Reimbursement Types Actions
reimbursement_types_actions_partials
Injects code into the page actions area for the reimbursement types list page.Reimbursement Types Header
Reimbursement Types Header
reimbursement_types_header_partials
Injects code between the page header and the main content area for the reimbursement types list page.Reports
Reports Actions
Reports Actions
reports_actions_partials
Injects code into the page actions area for the reports list page.Reports Header
Reports Header
reports_header_partials
Injects code between the page header and the main content area for the reports list page.Return Authorization Reasons
Return Authorization Reasons Actions
Return Authorization Reasons Actions
Return Authorization Reasons Header
Return Authorization Reasons Header
Return Authorizations
Return Authorizations Actions
Return Authorizations Actions
Return Authorizations Header
Return Authorizations Header
Roles
Roles Actions
Roles Actions
roles_actions_partials
Injects code into the page actions area for the roles list page.Roles Header
Roles Header
roles_header_partials
Injects code between the page header and the main content area for the roles list page.Shipping Categories
Shipping Categories Actions
Shipping Categories Actions
shipping_categories_actions_partials
Injects code into the page actions area for the shipping categories list page.Shipping Categories Header
Shipping Categories Header
shipping_categories_header_partials
Injects code between the page header and the main content area for the shipping categories list page.Shipping Methods
Shipping Methods Actions
Shipping Methods Actions
shipping_methods_actions_partials
Injects code into the page actions area for the shipping methods list page.Shipping Methods Header
Shipping Methods Header
shipping_methods_header_partials
Injects code between the page header and the main content area for the shipping methods list page.Stock Locations
Stock Locations Actions
Stock Locations Actions
stock_locations_actions_partials
Injects code into the page actions area for the stock locations list page.Stock Locations Header
Stock Locations Header
stock_locations_header_partials
Injects code between the page header and the main content area for the stock locations list page.Stock Transfers
Stock Transfers Actions
Stock Transfers Actions
stock_transfers_actions_partials
Injects code into the page actions area for the stock transfers list page.Stock Transfers Header
Stock Transfers Header
stock_transfers_header_partials
Injects code between the page header and the main content area for the stock transfers list page.Stock Transfers Filters
Stock Transfers Filters
stock_transfers_filters_partials
Variables
Store Credit Categories
Store Credit Categories Actions
Store Credit Categories Actions
store_credit_categories_actions_partials
Injects code into the page actions area for the store credit categories list page.Store Credit Categories Header
Store Credit Categories Header
store_credit_categories_header_partials
Injects code between the page header and the main content area for the store credit categories list page.Store Credits
Store Credits Actions
Store Credits Actions
store_credits_actions_partials
Injects code into the page actions area for the store credits list page.Store Credits Header
Store Credits Header
store_credits_header_partials
Injects code between the page header and the main content area for the store credits list page.Tax Categories
Tax Categories Actions
Tax Categories Actions
tax_categories_actions_partials
Injects code into the page actions area for the tax categories list page.Tax Categories Header
Tax Categories Header
tax_categories_header_partials
Injects code between the page header and the main content area for the tax categories list page.Tax Rates
Tax Rates Actions
Tax Rates Actions
tax_rates_actions_partials
Injects code into the page actions area for the tax rates list page.Tax Rates Header
Tax Rates Header
tax_rates_header_partials
Injects code between the page header and the main content area for the tax rates list page.Taxonomies
Taxonomies Actions
Taxonomies Actions
taxonomies_actions_partials
Injects code into the page actions area for the taxonomies list page.Taxonomies Header
Taxonomies Header
taxonomies_header_partials
Injects code between the page header and the main content area for the taxonomies list page.Themes
Themes Actions
Themes Actions
themes_actions_partials
Injects code into the page actions area for the themes list page.Themes Header
Themes Header
themes_header_partials
Injects code between the page header and the main content area for the themes list page.Webhooks Subscribers
Webhooks Subscribers Actions
Webhooks Subscribers Actions
webhooks_subscribers_actions_partials
Injects code into the page actions area for the webhooks subscribers list page.Webhooks Subscribers Header
Webhooks Subscribers Header
webhooks_subscribers_header_partials
Injects code between the page header and the main content area for the webhooks subscribers list page.Zones
Zones Actions
Zones Actions
zones_actions_partials
Injects code into the page actions area for the zones list page.Zones Header
Zones Header
zones_header_partials
Injects code between the page header and the main content area for the zones list page.Products
Products Actions
Products Actions
products_actions_partials
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.Products Header
Products Header
products_header_partials
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.Products Filters
Products Filters
products_filters_partials

Variables
f
variable, which is the form builder for the filters.To add a new filter field, you can use the following code:q_name_cont
is the name of the filter field. For filtering we’re using ransack gem, so the name of the filter field is the name of the attribute we’re filtering by. Learn more about ransack search syntax.form-control
is a bootstrap class for styling the input field.data: { filters_target: :input }
is needed for the Stimulus Filters controller to work.
Products Page Dropdown
Products Page Dropdown
product_dropdown_partials

product
variable.To add an additional dropdown item, you can use the following code:Products Page Form
Products Page Form
product_form_partials

Variables
f
variable, which is the form builder for the product form, and the product
variable.To add a new section to the product form, you can use the following code:Products Page Sidebar
Products Page Sidebar
Shipping Methods
Shipping Methods Form
Shipping Methods Form
shipping_method_form_partials
Variables
f
variable, which is the form builder for the shipping method form, and the shipping_method
variable.To add a new section to the shipping method form, you can use the following code:Store Settings
Store Settings Form
Store Settings Form
store_form_partials

Variables
f
variable, which is the form builder for the store form, and the store
variable.To add a new section to the store form, you can use the following code: