Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Update 4.5-to-4.6.mdx doc with additional fixes and hints (#12029)

Łukasz Adamczyk42994e05dce2
diff --git a/docs/api-reference/storefront.yaml b/docs/api-reference/storefront.yaml
index 7188381e39..f8378623b6 100644
--- a/docs/api-reference/storefront.yaml
+++ b/docs/api-reference/storefront.yaml
@@ -984,7 +984,7 @@ paths:
System will automatically invalidate previous (non-finalized) payments (excluding store credit / gift card payments).
- [More details on payment system](https://docs.spreecommerce.org/developer/core-concepts/payments)
+ [More details on payment system](/developer/core-concepts/payments)
operationId: create-payment
responses:
'200':
@@ -1271,7 +1271,7 @@ paths:
/api/v2/storefront/store:
get:
summary: Return the current Store
- description: 'Returns the current Store. [Read more about Stores](https://docs.spreecommerce.org/developer/core-concepts/stores)'
+ description: 'Returns the current Store. [Read more about Stores](/developer/core-concepts/stores)'
tags:
- Stores
operationId: show-current-store
@@ -1287,7 +1287,7 @@ paths:
- bearerAuth: []
/api/v2/storefront/taxons:
get:
- description: 'Returns a list of Taxons. [Read more about Taxons](https://docs.spreecommerce.org/developer/core-concepts/products#taxons-and-taxonomies)'
+ description: 'Returns a list of Taxons. [Read more about Taxons](/developer/core-concepts/products#taxons-and-taxonomies)'
tags:
- Taxons
operationId: taxons-list
@@ -1974,7 +1974,7 @@ components:
- city
- country_iso
Cart:
- description: 'The Cart provides a central place to collect information about an order, including line items, adjustments, payments, addresses, and shipments. [Read more in Spree docs](https://docs.spreecommerce.org/developer/core-concepts/orders)'
+ description: 'The Cart provides a central place to collect information about an order, including line items, adjustments, payments, addresses, and shipments. [Read more in Spree docs](/developer/core-concepts/orders)'
type: object
title: Cart
x-internal: false
@@ -2042,7 +2042,7 @@ components:
- confirm
- complete
description: |-
- State of the Cart in the Checkout flow. Please see <a href="https://docs.spreecommerce.org/developer/core-concepts/orders#the-order-state-machine">
+ State of the Cart in the Checkout flow. Please see <a href="/developer/core-concepts/orders#the-order-state-machine">
The Order State machine
</a> for a full list with description.
email:
@@ -2107,7 +2107,7 @@ components:
- shipped
- null
description: |-
- Overall state of the Shipments. Please see <a href="https://docs.spreecommerce.org/developer/core-concepts/orders#order-shipment-states-1">
+ Overall state of the Shipments. Please see <a href="/developer/core-concepts/orders#order-shipment-states-1">
Order Shipments states
</a> for a full list with description.
nullable: true
@@ -2121,7 +2121,7 @@ components:
- void
- null
description: |-
- Overall state of the Payments. Please see <a href="https://docs.spreecommerce.org/developer/core-concepts/orders#order-payment-states">
+ Overall state of the Payments. Please see <a href="/developer/core-concepts/orders#order-payment-states">
Order Payments states
</a> for a full list with description.
nullable: true
@@ -2363,7 +2363,7 @@ components:
- relationships
Country:
title: Country
- description: 'Countries within Spree are used as a container for states. Countries can be zone members, and also link to an address. The difference between one country and another on an address record can determine which tax rates and shipping methods are used for the order.[Read more about Countries in Spree](https://docs.spreecommerce.org/developer/core-concepts/addresses#countries)'
+ description: 'Countries within Spree are used as a container for states. Countries can be zone members, and also link to an address. The difference between one country and another on an address record can determine which tax rates and shipping methods are used for the order.[Read more about Countries in Spree](/developer/core-concepts/addresses#countries)'
type: object
x-internal: false
properties:
@@ -3347,7 +3347,7 @@ components:
- shipped
- canceled
description: |-
- Status of the Shipment. For a list of all available statuses please refer: <a href="https://docs.spreecommerce.org/developer/core-concepts/shipments" target="_blank" rel="noopener">
+ Status of the Shipment. For a list of all available statuses please refer: <a href="/developer/core-concepts/shipments" target="_blank" rel="noopener">
Shipment section in Spree Guides
</a>
shipped_at:
diff --git a/docs/developer/advanced/existing_app_tutorial.mdx b/docs/developer/advanced/existing_app_tutorial.mdx
index 0ba85c2cde..5e5af47b49 100644
--- a/docs/developer/advanced/existing_app_tutorial.mdx
+++ b/docs/developer/advanced/existing_app_tutorial.mdx
@@ -69,7 +69,7 @@ The different parts of Spree (API, Admin) will be mounted there as well, eg. `ht
### Use your existing authentication
-[Spree Auth Devise](https://github.com/spree/spree\_auth\_devise) is the default authentication that comes with Spree but you can swap it for your own, please [follow this guide](../customization/authentication)
+[Spree Auth Devise](https://github.com/spree/spree_auth_devise) is the default authentication that comes with Spree but you can swap it for your own, please [follow this guide](../customization/authentication)
### Hello, Spree Commerce
diff --git a/docs/developer/contributing/creating-an-extension.mdx b/docs/developer/contributing/creating-an-extension.mdx
index 0e7aa643b4..758f3d53c8 100644
--- a/docs/developer/contributing/creating-an-extension.mdx
+++ b/docs/developer/contributing/creating-an-extension.mdx
@@ -31,7 +31,7 @@ cd spree_simple_sales
## Adding a Sale Price to Variants
-The first thing we need to do is create a migration that adds a sale\_price column to [variants](/developer/core-concepts/products#variants).
+The first thing we need to do is create a migration that adds a sale_price column to [variants](/developer/core-concepts/products#variants).
We can do this with the following command:
@@ -78,7 +78,7 @@ bundle exec rails g spree_simple_sales:install
Now we need to extend `Spree::HomeController` and add an action that selects "on sale" products.
- Note for the sake of this example that \`Spree::HomeController\` is only included in spree\_frontend so you need to make it a dependency on your extensions \*.gemspec file.
+ Note for the sake of this example that \`Spree::HomeController\` is only included in spree_frontend so you need to make it a dependency on your extensions \*.gemspec file.
Make sure you are in the `spree_simple_sales` root directory and run the following command to create the directory structure for our controller decorator:
diff --git a/docs/developer/contributing/updating-extensions.mdx b/docs/developer/contributing/updating-extensions.mdx
index 3d3e507346..9b100aa76b 100644
--- a/docs/developer/contributing/updating-extensions.mdx
+++ b/docs/developer/contributing/updating-extensions.mdx
@@ -7,7 +7,7 @@ description: How to upgrade your Spree extension to work with Spree 4
Zeitwerk is the [new default code autoloader in Rails 6](https://weblog.rubyonrails.org/2019/2/22/zeitwerk-integration-in-rails-6-beta-2/).
-This doesn't work well with the old approach to decorators \(files that name ends with decorator.rb, eg. `app/models/spree/order_decorator.rb`\) using [class\_eval](https://www.jimmycuadra.com/posts/metaprogramming-ruby-class-eval-and-instance-eval/).
+This doesn't work well with the old approach to decorators \(files that name ends with decorator.rb, eg. `app/models/spree/order_decorator.rb`\) using [class_eval](https://www.jimmycuadra.com/posts/metaprogramming-ruby-class-eval-and-instance-eval/).
To fix this we need to convert all `class_eval` decorators to modules and use [Module.prepend](https://medium.com/@leo_hetsch/ruby-modules-include-vs-prepend-vs-extend-f09837a5b073). Also we need to name them properly according to [Zeitwerk naming rules](https://github.com/fxn/zeitwerk#file-structure)
@@ -45,11 +45,11 @@ Spree::Order.prepend(YourExtensionName::OrderDecorator)
## Fixing Deface Overrides
-Please remember to prepare versioned overrides for both Spree 3.x and 4.x, eg. [https://github.com/spree-contrib/spree\_static\_content/commit/e4b9e4900024235158d0ec1a48a100b4732348ef](https://github.com/spree-contrib/spree_static_content/commit/e4b9e4900024235158d0ec1a48a100b4732348ef)
+Please remember to prepare versioned overrides for both Spree 3.x and 4.x, eg. [https://github.com/spree-contrib/spree_static_content/commit/e4b9e4900024235158d0ec1a48a100b4732348ef](https://github.com/spree-contrib/spree_static_content/commit/e4b9e4900024235158d0ec1a48a100b4732348ef)
Spree 4 uses Bootstrap 4 and many partials and HTML structure changed compared to Spree 3.x.
-Also - **remember to add deface gem to gemspec** as deface itself was removed as a dependency of Spree. eg. [https://github.com/spree/spree\_auth\_devise/commit/d729689ca87d8586e541ffcc865ef1e0a5a79fe4](https://github.com/spree/spree_auth_devise/commit/d729689ca87d8586e541ffcc865ef1e0a5a79fe4)
+Also - **remember to add deface gem to gemspec** as deface itself was removed as a dependency of Spree. eg. [https://github.com/spree/spree_auth_devise/commit/d729689ca87d8586e541ffcc865ef1e0a5a79fe4](https://github.com/spree/spree_auth_devise/commit/d729689ca87d8586e541ffcc865ef1e0a5a79fe4)
## Migrate to Spree Dev Tools
@@ -61,11 +61,11 @@ s.add_development_dependency 'spree_dev_tools'
Replace `spec_helper.rb` contents with:
-[https://github.com/spree/spree/blob/777a284b4c70e69d32a05ffa61bbe3905d8f1297/cmd/lib/spree\_cmd/templates/extension/spec/spec\_helper.rb](https://github.com/spree/spree/blob/777a284b4c70e69d32a05ffa61bbe3905d8f1297/cmd/lib/spree_cmd/templates/extension/spec/spec_helper.rb)
+[https://github.com/spree/spree/blob/777a284b4c70e69d32a05ffa61bbe3905d8f1297/cmd/lib/spree_cmd/templates/extension/spec/spec_helper.rb](https://github.com/spree/spree/blob/777a284b4c70e69d32a05ffa61bbe3905d8f1297/cmd/lib/spree_cmd/templates/extension/spec/spec_helper.rb)
Example migrations:
-* [https://github.com/spree/spree\_gateway/pull/357](https://github.com/spree/spree_gateway/pull/357)
+* [https://github.com/spree/spree_gateway/pull/357](https://github.com/spree/spree_gateway/pull/357)
* [https://github.com/spree-contrib/spree-product-assembly/pull/200](https://github.com/spree-contrib/spree-product-assembly/pull/200)
-* [https://github.com/spree/spree\_auth\_devise/pull/487](https://github.com/spree/spree_auth_devise/pull/487)
+* [https://github.com/spree/spree_auth_devise/pull/487](https://github.com/spree/spree_auth_devise/pull/487)
diff --git a/docs/developer/core-concepts/payments.mdx b/docs/developer/core-concepts/payments.mdx
index 4da0baef38..3a26456dbf 100644
--- a/docs/developer/core-concepts/payments.mdx
+++ b/docs/developer/core-concepts/payments.mdx
@@ -75,7 +75,7 @@ You can decide which Payment Method will appear on which Store. This allows you
## Payment Processing
-Payment processing in Spree supports many different gateways, but also attempts to comply with the API provided by the [active\_merchant](https://github.com/shopify/active_merchant) gem where possible.
+Payment processing in Spree supports many different gateways, but also attempts to comply with the API provided by the [active_merchant](https://github.com/shopify/active_merchant) gem where possible.
### Gateway Options
@@ -150,9 +150,9 @@ payment.log_entries
If the `purchase!` route is taken and is successful, the payment is marked as `completed`. If it fails, it is marked as `failed`. If the `authorize` method is successful, the payment is transitioned to the `pending` state so that it can be manually captured later by calling the `capture!` method. If it is unsuccessful, it is also transitioned to the `failed` state.
- Once a payment has been saved, it also updates the order. This may trigger the \`payment\_state\` to change, which would reflect the current payment state of the order. The possible states are: \* \`balance\_due\`: Indicates that payment is required for this order \* \`failed\`: Indicates that the last payment for the order failed \* \`credit\_owed\`: This order has been paid for in excess of its total \* \`paid\`: This order has been paid for in full.
+ Once a payment has been saved, it also updates the order. This may trigger the \`payment_state\` to change, which would reflect the current payment state of the order. The possible states are: \* \`balance_due\`: Indicates that payment is required for this order \* \`failed\`: Indicates that the last payment for the order failed \* \`credit_owed\`: This order has been paid for in excess of its total \* \`paid\`: This order has been paid for in full.
- You may want to keep tabs on the number of orders with a \`payment\_state\` of \`failed\`. A sudden increase in the number of such orders could indicate a problem with your credit card gateway and most likely indicates a serious problem affecting customer satisfaction. You should check the latest \`log\_entries\` for the most recent payments in the store if this is happening.
+ You may want to keep tabs on the number of orders with a \`payment_state\` of \`failed\`. A sudden increase in the number of such orders could indicate a problem with your credit card gateway and most likely indicates a serious problem affecting customer satisfaction. You should check the latest \`log_entries\` for the most recent payments in the store if this is happening.
### Log Entries
@@ -194,7 +194,7 @@ Access to a number of payment gateways is handled with the usage of the [Spree G
With the `spree_gateway` gem included in your application's `Gemfile`, these gateways will be selectable in the admin backend for payment methods.
<Info>
- These are just some of the gateways which are supported by the Active Merchant gem. You can see a [list of all the Active Merchant gateways on that project's GitHub page](https://github.com/activemerchant/active\_merchant\#supported-payment-gateways).
+ These are just some of the gateways which are supported by the Active Merchant gem. You can see a [list of all the Active Merchant gateways on that project's GitHub page](https://github.com/activemerchant/active_merchant\#supported-payment-gateways).
</Info>
## Adding your custom Payment Method
diff --git a/docs/developer/core-concepts/products.mdx b/docs/developer/core-concepts/products.mdx
index b3d6ca4b56..adef649f5c 100644
--- a/docs/developer/core-concepts/products.mdx
+++ b/docs/developer/core-concepts/products.mdx
@@ -239,7 +239,7 @@ There are also other helpful methods available such as:
</AccordionGroup>
<Info>
-Spree behind the scenes uses [Ruby Money gem](https://github.com/RubyMoney/money) with some [additional](https://github.com/spree/spree/blob/master/core/app/models/concerns/spree/display\_money.rb) [tweaks](https://github.com/spree/spree/blob/master/core/lib/spree/money.rb).
+Spree behind the scenes uses [Ruby Money gem](https://github.com/RubyMoney/money) with some [additional](https://github.com/spree/spree/blob/master/core/app/models/concerns/spree/display_money.rb) [tweaks](https://github.com/spree/spree/blob/master/core/lib/spree/money.rb).
</Info>
## Prototypes
@@ -260,7 +260,7 @@ When working with Taxonomies there are two key terms to understand:
By default, both Taxons and Taxonomies are ordered by their `position` attribute.
<Note>
-Taxons use the [Nested set model](http://en.wikipedia.org/wiki/Nested\_set\_model) for their hierarchy. The `lft` and `rgt` columns in the `spree_taxons` table represent the locations within the hierarchy of the item. This logic is handled by the [awesome nested set](https://github.com/collectiveidea/awesome\_nested\_set) gem.
+Taxons use the [Nested set model](http://en.wikipedia.org/wiki/Nested_set_model) for their hierarchy. The `lft` and `rgt` columns in the `spree_taxons` table represent the locations within the hierarchy of the item. This logic is handled by the [awesome nested set](https://github.com/collectiveidea/awesome_nested_set) gem.
</Note>
Taxons link to products through an intermediary model called `Classification`. This model exists so that when a product is deleted, all of the links from that product to its taxons are deleted automatically. A similar action takes place when a taxon is deleted; all of the links to products are deleted automatically.
diff --git a/docs/developer/core-concepts/promotions.mdx b/docs/developer/core-concepts/promotions.mdx
index 3944a1f675..ebb1940b4b 100644
--- a/docs/developer/core-concepts/promotions.mdx
+++ b/docs/developer/core-concepts/promotions.mdx
@@ -90,7 +90,7 @@ Here's a list of all the rules that come with Spree:
</Accordion>
</AccordionGroup>
-Rules are used by Spree to determine if a promotion is applicable to an order and can be matched in one of two ways: all of the rules must match, or one rule must match. This is determined by the `match_policy` attribute on the `Promotion` object. As you will see in the Admin, you can set the match\_policy to be "any" or "all" of the rules associated with the Promotion. When set to "any" the Promotion will be considered eligible if any one of the rules applies, when set to "all" it will be eligible only if all the rules apply.
+Rules are used by Spree to determine if a promotion is applicable to an order and can be matched in one of two ways: all of the rules must match, or one rule must match. This is determined by the `match_policy` attribute on the `Promotion` object. As you will see in the Admin, you can set the match_policy to be "any" or "all" of the rules associated with the Promotion. When set to "any" the Promotion will be considered eligible if any one of the rules applies, when set to "all" it will be eligible only if all the rules apply.
## Extending Promotions
diff --git a/docs/developer/core-concepts/shipments.mdx b/docs/developer/core-concepts/shipments.mdx
index 2bdb23310d..05184661d9 100644
--- a/docs/developer/core-concepts/shipments.mdx
+++ b/docs/developer/core-concepts/shipments.mdx
@@ -70,7 +70,7 @@ To achieve this setup you need the following configuration:
| Name | Zone | Calculator |
| ---: | ---: | ---: |
| USPS Ground | US | Flexi Rate\($5,$2\) |
-| FedEx | EU\_VAT | FlatRate-per-item\($10\) |
+| FedEx | EU_VAT | FlatRate-per-item\($10\) |
### Advanced Setup
@@ -194,7 +194,7 @@ After entering a shipping address, the system displays the available shipping op
The customer must choose a shipping method for each shipment before proceeding to the next stage. At the confirmation step, the shipping cost will be shown and included in the order's total.
- You can enable collection of extra \_shipping instructions\_ by setting the option \`Spree::Config.shipping\_instructions\` to \`true\`. This is set to \`false\` by default. See \[Shipping Instructions\]\(\#shipping-instructions\) below.
+ You can enable collection of extra _shipping instructions_ by setting the option \`Spree::Config.shipping_instructions\` to \`true\`. This is set to \`false\` by default. See \[Shipping Instructions\]\(\#shipping-instructions\) below.
### What the Order's Administrator Sees
@@ -212,7 +212,7 @@ There are a few Spree extensions which provide additional shipping methods, incl
For more detailed information, check out the section on [Calculators](calculators).
-Your calculator should accept an array of `LineItem` objects and return a cost. It can look at any reachable data, but typically uses the address, the order and the information from variants which are contained in the line\_items.
+Your calculator should accept an array of `LineItem` objects and return a cost. It can look at any reachable data, but typically uses the address, the order and the information from variants which are contained in the line_items.
## Product Configuration
diff --git a/docs/developer/core-concepts/stores.mdx b/docs/developer/core-concepts/stores.mdx
index 487408189e..a20dc6b8dd 100644
--- a/docs/developer/core-concepts/stores.mdx
+++ b/docs/developer/core-concepts/stores.mdx
@@ -11,7 +11,7 @@ The `Spree::Store` model is the center of the Spree ecosystem. Each Spree instal
* Store C, `another-brand.com`
<Frame type="glass" caption="Spree multi-store setup">
-![](/images/mulit\_store\_978x2.png)
+![](/images/mulit_store_978x2.png)
</Frame>
### Store attributes
@@ -43,12 +43,12 @@ The `Spree::Store` model is the center of the Spree ecosystem. Each Spree instal
Spree will try to determine the current store based on the current URL. If the URL does not match any of the stores in the database, Spree will fall back to the default store.
-All Spree controllers or any other controllers that include [Spree::Core::ControllerHelpers::Store](https://github.com/spree/spree/blob/master/core/lib/spree/core/controller\_helpers/store.rb) have access to the `current_store` method which returns the `Store` matching the current URL.
+All Spree controllers or any other controllers that include [Spree::Core::ControllerHelpers::Store](https://github.com/spree/spree/blob/master/core/lib/spree/core/controller_helpers/store.rb) have access to the `current_store` method which returns the `Store` matching the current URL.
All parts of Spree (API v1, API v2, Storefront, Admin Panel) have this implemented. This method is also available in views and JSON serializers.
<Info>
-Under the hood `current_store` calls [Spree::Stores::FindCurrent.new(url: url).execute](https://github.com/spree/spree/blob/master/core/app/finders/spree/stores/find\_current.rb).
+Under the hood `current_store` calls [Spree::Stores::FindCurrent.new(url: url).execute](https://github.com/spree/spree/blob/master/core/app/finders/spree/stores/find_current.rb).
This logic can be easily overwritten by setting
diff --git a/docs/developer/customization/admin-panel.mdx b/docs/developer/customization/admin-panel.mdx
index 196cf83519..0d7d22a445 100644
--- a/docs/developer/customization/admin-panel.mdx
+++ b/docs/developer/customization/admin-panel.mdx
@@ -1,14 +1,14 @@
# Admin Panel
-Starting with Spree 4.7, we've introduced a new way of customizing the admin panel, that enables extensions to modify the admin panel UI without depending on the Deface gem. For Spree 4.6 and earlier, please see how to use [deface\_overrides\_tutorial.md](../advanced/deface\_overrides\_tutorial.md "mention") overrides.
+Starting with Spree 4.7, we've introduced a new way of customizing the admin panel, that enables extensions to modify the admin panel UI without depending on the Deface gem. For Spree 4.6 and earlier, please see how to use [deface_overrides_tutorial.md](../advanced/deface_overrides_tutorial.md "mention") overrides.
### Customizing the main menu
When extending Spree with custom features, it's common to add new options to the menu on the left-hand side.
-The menu is built with [`Spree::Admin::MainMenu::Section`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/section.rb) and [`Spree::Admin::MainMenu::Item`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/item.rb) objects.
+The menu is built with [`Spree::Admin::MainMenu::Section`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/main_menu/section.rb) and [`Spree::Admin::MainMenu::Item`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/main_menu/item.rb) objects.
-Additionally, there are two builder classes [`Spree::Admin::MainMenu::SectionBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/section\_builder.rb) and [`Spree::Admin::MainMenu::ItemBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/item\_builder.rb) that make it easier to build more complex sections.
+Additionally, there are two builder classes [`Spree::Admin::MainMenu::SectionBuilder`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/main_menu/section_builder.rb) and [`Spree::Admin::MainMenu::ItemBuilder`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/main_menu/item_builder.rb) that make it easier to build more complex sections.
The menu is available under `Rails.application.config.spree_backend.main_menu` and can be modified by both extensions as well as the Rails application code.
@@ -28,7 +28,7 @@ Rails.application.config.after_initialize do
end
```
-For a more extensive example, take a look at how the [default menu is built](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/main\_menu/default\_configuration\_builder.rb).
+For a more extensive example, take a look at how the [default menu is built](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/main_menu/default_configuration_builder.rb).
### Customizing tabs
@@ -36,7 +36,7 @@ In some cases you may need to add a new tab to a page for editing Orders, Produc
![](/images/Screenshot 2023-10-31 at 18.57.13.png)
-These tabs are built with [`Spree::Admin::Tabs::Tab`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/tabs/tab.rb). You can also use [`Spree::Admin::Tabs::TabBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/tabs/tab\_builder.rb) class to construct new Tab objects. The tabs are attached to `Rails.application.config.spree_backend.tabs` and can be modified via an initializer.
+These tabs are built with [`Spree::Admin::Tabs::Tab`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/tabs/tab.rb). You can also use [`Spree::Admin::Tabs::TabBuilder`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/tabs/tab_builder.rb) class to construct new Tab objects. The tabs are attached to `Rails.application.config.spree_backend.tabs` and can be modified via an initializer.
#### Example: adding an additional tab to the product edit admin page
@@ -55,7 +55,7 @@ end
A common case for extensions is to add a new action button in the admin panel.
-Action buttons are built with [`Spree::Admin::Actions::Action`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/actions/action.rb) or with a dedicated [`Spree::Admin::Actions::ActionBuilder`](https://github.com/spree/spree\_backend/blob/main/app/models/spree/admin/actions/action\_builder.rb) class. The action buttons are attached to `Rails.application.config.spree_backend.actions` and can be modified with an initializer.
+Action buttons are built with [`Spree::Admin::Actions::Action`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/actions/action.rb) or with a dedicated [`Spree::Admin::Actions::ActionBuilder`](https://github.com/spree/spree_backend/blob/main/app/models/spree/admin/actions/action_builder.rb) class. The action buttons are attached to `Rails.application.config.spree_backend.actions` and can be modified with an initializer.
**Example: adding a new button to the order page**
diff --git a/docs/developer/customization/api_v2.mdx b/docs/developer/customization/api_v2.mdx
index a06f844d72..4782f27b63 100644
--- a/docs/developer/customization/api_v2.mdx
+++ b/docs/developer/customization/api_v2.mdx
@@ -23,7 +23,7 @@ You can easily swap OOTB Spree serializers with your own thanks to [Spree Depend
Generally it's recommended to use [Properties](/developer/core-concepts/products#product-properties) and [OptionTypes/Option Values](/developer/core-concepts/products#option-types-and-option-values) for custom attributes and not to modify the Spree database schema
</Note>
-Let's say you want to customize the Storefront API's [Product serializer](https://github.com/spree/spree/blob/master/api/app/serializers/spree/v2/storefront/product\_serializer.rb) to include you custom database column `my_newcustom_attribute` that you've added to the `spree_products` database table.
+Let's say you want to customize the Storefront API's [Product serializer](https://github.com/spree/spree/blob/master/api/app/serializers/spree/v2/storefront/product_serializer.rb) to include you custom database column `my_newcustom_attribute` that you've added to the `spree_products` database table.
Let's start with creating a new serializer file in your project's `app/serializers` directory, that is `app/serializers/my_product_serializer.rb`:
diff --git a/docs/developer/customization/checkout.mdx b/docs/developer/customization/checkout.mdx
index 9893d47245..8028cd690d 100644
--- a/docs/developer/customization/checkout.mdx
+++ b/docs/developer/customization/checkout.mdx
@@ -14,7 +14,7 @@ The customization of the flow of the checkout can be done by using Spree's `chec
The Spree checkout process consists of the following steps. With the exception of the Registration step, each of these steps corresponds to a state of the [Order object](/developer/core-concepts/orders):
-* Registration \(Optional - only if using [spree\_auth\_devise](https://github.com/spree/spree_auth_devise) extension, can be toggled through the `Spree::Auth::Config[:registration_step]` configuration setting\)
+* Registration \(Optional - only if using [spree_auth_devise](https://github.com/spree/spree_auth_devise) extension, can be toggled through the `Spree::Auth::Config[:registration_step]` configuration setting\)
* Address Information
* Delivery Options \(Shipping Method\)
* Payment
@@ -53,7 +53,7 @@ The address fields include a select box for choosing state/province. The list of
The default "seed" data for Spree only includes the U.S. states. It's easy enough to add states or provinces for other countries but beyond the scope of the Spree project to maintain such a list.
- The state field can be disabled entirely by using the \`Spree::Config\[:address\_requires\_state\]\` preference. You can also allow for an "alternate phone" field by using the \`Spree::Config\[:alternative\_shipping\_phone\]\` and \`Spree::Config\[:alternative\_shipping\]\` fields.
+ The state field can be disabled entirely by using the \`Spree::Config\[:address_requires_state\]\` preference. You can also allow for an "alternate phone" field by using the \`Spree::Config\[:alternative_shipping_phone\]\` and \`Spree::Config\[:alternative_shipping\]\` fields.
The list of countries that appear in the country select box can also be configured. Spree will list all countries by default, but you can configure exactly which countries you would like to appear. The list can be limited to a specific set of countries by [setting the Store's checkout zone](/developer/core-concepts/stores#checkout-configuration). Spree assumes that the list of billing and shipping countries will be the same. You can always change this logic via an extension if this does not suit your needs.
@@ -87,13 +87,13 @@ The following is a detailed summary of the checkout architecture. A complete und
### The Order Model and State Machine
-The `Spree::Order` state machine is the foundation of the checkout process. Spree makes use of the [state\_machines](https://github.com/state-machines/state_machines) gem in the `Spree::Order` model as well as in several other places \(such as `Spree::Shipment` and `Spree::InventoryUnit`.\)
+The `Spree::Order` state machine is the foundation of the checkout process. Spree makes use of the [state_machines](https://github.com/state-machines/state_machines) gem in the `Spree::Order` model as well as in several other places \(such as `Spree::Shipment` and `Spree::InventoryUnit`.\)
-The default checkout flow for the `Spree::Order` model is defined in `app/models/spree/order/checkout.rb` of spree\_core.
+The default checkout flow for the `Spree::Order` model is defined in `app/models/spree/order/checkout.rb` of spree_core.
An `Spree::Order` object has an initial state of 'cart'. From there any number of events transition the `Spree::Order` to different states. Spree does not have a separate model or database table for the shopping cart. What the user considers a "shopping cart" is actually an in-progress `Spree::Order`. An order is considered in-progress, or incomplete when its `completed_at` attribute is `nil`. Incomplete orders can be easily filtered during reporting and it's also simple enough to write a quick script to periodically purge incomplete orders from the system. The end result is a simplified data model along with the ability for store owners to search and report on incomplete/abandoned orders.
- For more information on the state machines gem please see the \[README\]\(https://github.com/state-machines/state\_machines\)
+ For more information on the state machines gem please see the \[README\]\(https://github.com/state-machines/state_machines\)
## Checkout Customization
@@ -101,7 +101,7 @@ It is possible to override the default checkout workflow to meet your store's ne
### Adding Logic Before or After a Particular Step
-The [state\_machines](https://github.com/state-machines/state_machines) gem allows you to implement callbacks before or after transitioning to a particular step. These callbacks work similarly to [Active Record Callbacks](http://guides.rubyonrails.org/active_record_callbacks.html) in that you can specify a method or block of code to be executed prior to or after a transition. If the method executed in a before\_transition returns false, then the transition will not execute.
+The [state_machines](https://github.com/state-machines/state_machines) gem allows you to implement callbacks before or after transitioning to a particular step. These callbacks work similarly to [Active Record Callbacks](http://guides.rubyonrails.org/active_record_callbacks.html) in that you can specify a method or block of code to be executed prior to or after a transition. If the method executed in a before_transition returns false, then the transition will not execute.
So, for example, if you wanted to verify that the user provides a valid zip code before transitioning to the delivery step, you would first implement a `valid_zip_code?` method, and then tell the state machine to run this method before that transition, placing this code in a file called `app/models/spree/order_decorator.rb`:
diff --git a/docs/developer/customization/deface_overrides_tutorial.mdx b/docs/developer/customization/deface_overrides_tutorial.mdx
index e8013876e3..4f06868cc0 100644
--- a/docs/developer/customization/deface_overrides_tutorial.mdx
+++ b/docs/developer/customization/deface_overrides_tutorial.mdx
@@ -89,18 +89,18 @@ Deface currently supports the following actions:
* :remove - Removes all elements that match the supplied selector
* :replace - Replaces all elements that match the supplied selector, with the content supplied
-* :replace\_contents - Replaces the contents of all elements that match the supplied selector
-* :surround - Surrounds all elements that match the supplied selector, expects replacement markup to contain &lt;%%= render\_original %&gt; placeholder
-* :surround\_contents - Surrounds the contents of all elements that match the supplied selector, expects replacement markup to contain &lt;%%= render\_original %&gt; placeholder
-* :insert\_after - Inserts after all elements that match the supplied selector
-* :insert\_before - Inserts before all elements that match the supplied selector
-* :insert\_top - Inserts inside all elements that match the supplied selector, as the first child
-* :insert\_bottom - Inserts inside all elements that match the supplied selector, as the last child
-* :set\_attributes - Sets attributes on all elements that match the supplied selector, replacing existing attribute value if present or adding if not. Expects :attributes option to be passed.
-* :add\_to\_attributes - Appends value to attributes on all elements that match the supplied selector, adds attribute if not present. Expects :attributes option to be passed.
-* :remove\_from\_attributes - Removes value from attributes on all elements that match the supplied selector. Expects :attributes option to be passed.
-
- Not all actions are applicable to all elements. For example, \`:insert\_top\` and \`:insert\_bottom\` expects a parent element with children.
+* :replace_contents - Replaces the contents of all elements that match the supplied selector
+* :surround - Surrounds all elements that match the supplied selector, expects replacement markup to contain &lt;%%= render_original %&gt; placeholder
+* :surround_contents - Surrounds the contents of all elements that match the supplied selector, expects replacement markup to contain &lt;%%= render_original %&gt; placeholder
+* :insert_after - Inserts after all elements that match the supplied selector
+* :insert_before - Inserts before all elements that match the supplied selector
+* :insert_top - Inserts inside all elements that match the supplied selector, as the first child
+* :insert_bottom - Inserts inside all elements that match the supplied selector, as the last child
+* :set_attributes - Sets attributes on all elements that match the supplied selector, replacing existing attribute value if present or adding if not. Expects :attributes option to be passed.
+* :add_to_attributes - Appends value to attributes on all elements that match the supplied selector, adds attribute if not present. Expects :attributes option to be passed.
+* :remove_from_attributes - Removes value from attributes on all elements that match the supplied selector. Expects :attributes option to be passed.
+
+ Not all actions are applicable to all elements. For example, \`:insert_top\` and \`:insert_bottom\` expects a parent element with children.
### Supplying content
diff --git a/docs/developer/customization/i18n.mdx b/docs/developer/customization/i18n.mdx
index b5b590bd13..cb7dfab6da 100644
--- a/docs/developer/customization/i18n.mdx
+++ b/docs/developer/customization/i18n.mdx
@@ -8,19 +8,17 @@ description: >-
extensions.
---
-# Internationalization
-
## Default Locale
Each [**Store**](/developer/core-concepts/stores) has their own `default_locale` attribute. Alongside that, you can also set `supported_locales` which will enable multi-language capabilities for that Store.
-For locales, we use symbols such as `en`,`es-MX` etc - full list of supported locales is available in the [Spree I18n GitHub repository](https://github.com/spree-contrib/spree\_i18n/tree/master/config/locales).
+For locales, we use symbols such as `en`,`es-MX` etc - full list of supported locales is available in the [Spree I18n GitHub repository](https://github.com/spree-contrib/spree_i18n/tree/master/config/locales).
## Default Currency
Each [**Store**](/developer/core-concepts/stores) has their own `default_currency` attribute. Alongside that, you can also set `supported_currencies` which will enable multi-currency capabilities for that Store.
-For currencies, we use [ISO 4217](https://en.wikipedia.org/wiki/ISO\_4217) symbols, eg. `USD` , `CAD`, `EUR`
+For currencies, we use [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) symbols, eg. `USD` , `CAD`, `EUR`
## Resource Translations
@@ -28,14 +26,14 @@ As of Spree 4.6, resources with user-facing content fields now have built in sup
| Resource | Translatable Fields |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Product | name, description, slug, meta\_description, meta\_keywords, meta\_title |
+| Product | name, description, slug, meta_description, meta_keywords, meta_title |
| Taxon | name, description, permalink |
| Taxonomy | name |
| Option Type | name, presentation |
| Option Value | name, presentation |
-| Property | name, presentation, filter\_param |
-| Product Property | value, filter\_param |
-| Store | name, meta\_description, meta\_keywords, seo\_title, facebook, twitter, instagram, customer\_support\_email, description, address, contact\_phone, new\_order\_notifications\_email |
+| Property | name, presentation, filter_param |
+| Product Property | value, filter_param |
+| Store | name, meta_description, meta_keywords, seo_title, facebook, twitter, instagram, customer_support_email, description, address, contact_phone, new_order_notifications_email |
Our translatable resources are configured with Mobility’s [Table Backend](https://github.com/shioyama/mobility#table-backend-like-globalize) storage strategy. The way this works is that each translatable resource has a corresponding translations table in the database, in which translation values are stored - for example, product translations are stored in `spree_product_translations`.
@@ -70,7 +68,7 @@ Spree::Product.joins(:taxons)
### Spree 4.5 and lower
-If you are using Spree version 4.5 or lower and are currently unable to upgrade, you need to install [Spree Globalize extension](https://github.com/spree-contrib/spree\_globalize) to enable translations. This extension uses [Globalize](https://github.com/globalize/globalize) library under the hood.
+If you are using Spree version 4.5 or lower and are currently unable to upgrade, you need to install [Spree Globalize extension](https://github.com/spree-contrib/spree_globalize) to enable translations. This extension uses [Globalize](https://github.com/globalize/globalize) library under the hood.
This gem will allow you to translate:
@@ -82,11 +80,11 @@ This gem will allow you to translate:
* Properties
* Shipping Methods
-## The spree\_i18n project
+## The spree_i18n project
-Spree now stores all of the translation information in a separate GitHub project known as [Spree I18n](https://github.com/spree/spree\_i18n). This is a stand alone project with a large number of volunteer committers who maintain the locale files. This is basically the same approach followed by the Rails project which keeps their localizations in [rails-i18n](https://github.com/svenfuchs/rails-i18n).
+Spree now stores all of the translation information in a separate GitHub project known as [Spree I18n](https://github.com/spree/spree_i18n). This is a stand alone project with a large number of volunteer committers who maintain the locale files. This is basically the same approach followed by the Rails project which keeps their localizations in [rails-i18n](https://github.com/svenfuchs/rails-i18n).
-The project is actually a Spree extension. This extension contains translations files. To translate models (provide translations for Products, Taxons, etc) you will need to install also [Spree Globalize](https://github.com/spree-contrib/spree\_globalize).
+The project is actually a Spree extension. This extension contains translations files. To translate models (provide translations for Products, Taxons, etc) you will need to install also [Spree Globalize](https://github.com/spree-contrib/spree_globalize).
### Translation Files
@@ -101,13 +99,13 @@ pt-BR:
All translations for Spree are "namespaced" within the `spree` key so that they don't conflict with translations from other parts of the parent application.
-Please submit Pull Requests or issues directly to [Spree I18n](https://github.com/spree/spree\_i18n) for missing translations.
+Please submit Pull Requests or issues directly to [Spree I18n](https://github.com/spree/spree_i18n) for missing translations.
### Localization Files
Spree maintains its localization information in a YAML file using a naming convention similar to that of the Rails project. Each of the localization filenames contains a prefix representing the language code of the locale. For example, the Russian translation is contained in `config/locales/ru.yml`.
-Spree has over 43 locale files and counting. See the \[GitHub Repository]\(https://github.com/spree/spree\_i18n/tree/master/config/locales) for a complete list.
+Spree has over 43 locale files and counting. See the \[GitHub Repository]\(https://github.com/spree/spree_i18n/tree/master/config/locales) for a complete list.
### Required Files
diff --git a/docs/developer/customization/logic.mdx b/docs/developer/customization/logic.mdx
index fa0bbbf4f1..7d797e6f36 100644
--- a/docs/developer/customization/logic.mdx
+++ b/docs/developer/customization/logic.mdx
@@ -14,7 +14,7 @@ It is highly recommended to use [Dependencies](dependencies) and [Extensions](..
All of Spree's business logic \(models, controllers, helpers, etc\) can easily be extended or overridden to meet your exact requirements using standard Ruby idioms.
-Standard practice for including such changes in your application or extension is to create a file within the relevant **app/models/spree** or **app/controllers/spree** directory with the original class name with **\_decorator** appended.
+Standard practice for including such changes in your application or extension is to create a file within the relevant **app/models/spree** or **app/controllers/spree** directory with the original class name with **_decorator** appended.
## Extending Models
diff --git a/docs/developer/customization/preferences.mdx b/docs/developer/customization/preferences.mdx
index 5c35621075..9d1fee5f89 100644
--- a/docs/developer/customization/preferences.mdx
+++ b/docs/developer/customization/preferences.mdx
@@ -276,8 +276,8 @@ end
In the above configuration file, three preferences have been defined:
* theme
-* show\_splash\_page
-* number\_of\_articles
+* show_splash_page
+* number_of_articles
It is recommended to create the configuration file in the `lib/` directory.
diff --git a/docs/developer/customization/storefront.mdx b/docs/developer/customization/storefront.mdx
index 3384bd1d5e..f7d84e4e19 100644
--- a/docs/developer/customization/storefront.mdx
+++ b/docs/developer/customization/storefront.mdx
@@ -419,7 +419,7 @@ This same method can be used to override JavaScript files provided by third-part
### Sitemap
-We highly recommend adding a sitemap to your site. It might affect how Google bot crawls your store pages. There is an official extension called [Spree Sitemap](https://github.com/spree-contrib/spree\_sitemap) for that exact purpose.
+We highly recommend adding a sitemap to your site. It might affect how Google bot crawls your store pages. There is an official extension called [Spree Sitemap](https://github.com/spree-contrib/spree_sitemap) for that exact purpose.
1. Per region, language or currency
2. Click the **Edit** button (indicated with a pencil icon) for the right store
diff --git a/docs/developer/getting-started/quickstart.mdx b/docs/developer/getting-started/quickstart.mdx
index 69d9fd8bde..46e27ee5a8 100644
--- a/docs/developer/getting-started/quickstart.mdx
+++ b/docs/developer/getting-started/quickstart.mdx
@@ -81,7 +81,7 @@ Feel free to explore your store. You can do so because Spree comes with a defaul
Upon successful authentication, you should see the admin screen:
- ![](/images/admin\_panel\_978-2x.jpg)
+ ![](/images/admin_panel_978-2x.jpg)
Feel free to explore some of the Admin Panel features that Spree has to offer and to verify that your installation is working properly.
</Accordion>
diff --git a/docs/developer/security/authentication_and_authorization.mdx b/docs/developer/security/authentication_and_authorization.mdx
index 229dbbca30..a7e3636792 100644
--- a/docs/developer/security/authentication_and_authorization.mdx
+++ b/docs/developer/security/authentication_and_authorization.mdx
@@ -6,7 +6,7 @@ order: 2
# Authentication & authorization
-If you install spree\_auth\_devise when setting up your app, we use a third party authentication library for Ruby known as [Devise](https://github.com/plataformatec/devise). This library provides a host of useful functionality that is in turn available to Spree, including the following features:
+If you install spree_auth_devise when setting up your app, we use a third party authentication library for Ruby known as [Devise](https://github.com/plataformatec/devise). This library provides a host of useful functionality that is in turn available to Spree, including the following features:
* Authentication
* Strong password encryption \(with the ability to specify your own algorithms\)
@@ -16,7 +16,7 @@ If you install spree\_auth\_devise when setting up your app, we use a third part
## Devise Configuration
- A default Spree install comes with the \[Spree Auth Devise\]\(https://github.com/spree/spree\_auth\_devise\) gem, which provides authentication for Spree using Devise. This section of the guide covers the default setup. If you're using your own authentication, please consult the manual for that authentication engine.
+ A default Spree install comes with the \[Spree Auth Devise\]\(https://github.com/spree/spree_auth_devise\) gem, which provides authentication for Spree using Devise. This section of the guide covers the default setup. If you're using your own authentication, please consult the manual for that authentication engine.
We have configured Devise to handle only what is needed to authenticate with a Spree site. The following details cover the default configurations:
diff --git a/docs/developer/security/pci_compliance.mdx b/docs/developer/security/pci_compliance.mdx
index 6c1818fbc0..27601af331 100644
--- a/docs/developer/security/pci_compliance.mdx
+++ b/docs/developer/security/pci_compliance.mdx
@@ -1,6 +1,6 @@
# PCI Compliance
-All store owners wishing to process credit card transactions should be familiar with [PCI Compliance](http://en.wikipedia.org/wiki/Pci\_compliance). [Spree Gateway Stripe integration](https://github.com/spree/spree\_gateway) and [Spree Braintree vzero](https://github.com/spree-contrib/spree\_braintree\_vzero) are PCI-compliant.
+All store owners wishing to process credit card transactions should be familiar with [PCI Compliance](http://en.wikipedia.org/wiki/Pci_compliance). [Spree Gateway Stripe integration](https://github.com/spree/spree_gateway) and [Spree Braintree vzero](https://github.com/spree-contrib/spree_braintree_vzero) are PCI-compliant.
### Using payment tokens
@@ -8,6 +8,6 @@ We do not transmit or store Credit Card numbers. Instead we're using payment pro
### 3-D Secure and Strong Customer Authentication support
-[Spree Gateway Stripe integration](https://github.com/spree/spree\_gateway) supports [Strong Customer Authentication (SCA)](https://stripe.com/en-pl/guides/strong-customer-authentication) out of the box. Remember to use S**tripe Elements** gateway with **Payment Intents** option enabled.
+[Spree Gateway Stripe integration](https://github.com/spree/spree_gateway) supports [Strong Customer Authentication (SCA)](https://stripe.com/en-pl/guides/strong-customer-authentication) out of the box. Remember to use S**tripe Elements** gateway with **Payment Intents** option enabled.
-[Spree Braintree vzero](https://github.com/spree-contrib/spree\_braintree\_vzero) extension supports [3D Secure 2.0](https://developers.braintreepayments.com/guides/3d-secure/overview).
+[Spree Braintree vzero](https://github.com/spree-contrib/spree_braintree_vzero) extension supports [3D Secure 2.0](https://developers.braintreepayments.com/guides/3d-secure/overview).
diff --git a/docs/developer/upgrades/3.0-to-3.1.mdx b/docs/developer/upgrades/3.0-to-3.1.mdx
index bfb1d44637..e9994c7e03 100644
--- a/docs/developer/upgrades/3.0-to-3.1.mdx
+++ b/docs/developer/upgrades/3.0-to-3.1.mdx
@@ -5,24 +5,12 @@ order: 9
description: 'This guide covers upgrading a 3.0 Spree store, to a 3.1 store'
---
-## Upgrade Rails
+## Update gems
-For this Spree release, you will need to upgrade your Rails version to at least 4.2.6.
-
-```ruby
-gem 'rails', '~> 4.2.6'
-```
-
-## Upgrade Spree
-
-For best results, use the spree gem in version 3.1:
-
-```ruby
-gem 'spree', '~> 3.1'
+```bash
+bundle update
```
-Run `bundle update spree`.
-
## Copy and run migrations
Copy over the migrations from Spree \(and any other engine\) and run them using these commands:
@@ -32,23 +20,6 @@ rake railties:install:migrations
rake db:migrate
```
-## Spree Auth Devise & Spree Gateway
-
-If you are using Spree Gateway and/or Spree Auth Devise you should also upgrade them:
-
-```ruby
-gem 'spree_auth_devise', '~> 3.1'
-gem 'spree_gateway', '~> 3.1'
-```
-
-For Spree Auth Devise run installer:
-
-```bash
-rails g spree:auth:install
-```
-
-\(you don't have to override config/initializers/devise.rb\)
-
## Additional information
### Make sure to v1 namespace custom rabl templates & overrides.
@@ -67,9 +38,9 @@ Becomes:
extends 'spree/api/v1/zones/show'
```
-### Remove Spree::Config.check\_for\_spree\_alerts
+### Remove `Spree::Config.check_for_spree_alerts`
-If you were disabling the alert checks you'll now want to remove this preference as it's no longer used.
+If you were disabling the alert checks you'll now want to remove this preference from `config/initializers/spree.rb` as it's no longer used.
## Read the release notes
diff --git a/docs/developer/upgrades/3.1-to-3.2.mdx b/docs/developer/upgrades/3.1-to-3.2.mdx
index f6f4681347..b1ef9971c7 100644
--- a/docs/developer/upgrades/3.1-to-3.2.mdx
+++ b/docs/developer/upgrades/3.1-to-3.2.mdx
@@ -7,30 +7,12 @@ description: 'This guide covers upgrading a 3.1 Spree store, to a 3.2 store.'
### Update your Rails version to 5.0
-Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-2-to-rails-5-0) to upgrade your store.
+Spree 3.1 requires Rails 4.2 at a minimum. Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-2-to-rails-5-0) to upgrade your application.
-### Update Gemfile
+### Update gems
-```ruby
-gem 'spree', '~> 3.2'
-gem 'spree_auth_devise', '~> 3.2'
-gem 'spree_gateway', '~> 3.2'
-```
-
-### Update your extensions
-
-We're changing how extensions dependencies work. Previously you had to match the extension branch to the Spree branch. Starting from now `master` branch of all `spree-contrib` extensions should work with Spree &gt;= `3.1` and &lt; `4.0`. Please change your extensions in Gemfile eg.:
-
-from:
-
-```ruby
-gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero', branch: '3-1-stable'
-```
-
-to:
-
-```ruby
-gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero'
+```bash
+bundle update
```
### Run `bundle update`
diff --git a/docs/developer/upgrades/3.2-to-3.3.mdx b/docs/developer/upgrades/3.2-to-3.3.mdx
index 33c1a8082b..033bf66eda 100644
--- a/docs/developer/upgrades/3.2-to-3.3.mdx
+++ b/docs/developer/upgrades/3.2-to-3.3.mdx
@@ -7,34 +7,14 @@ description: 'This guide covers upgrading a 3.2 Spree store, to a 3.3 store.'
### Update your Rails version to 5.1
-Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-5-0-to-rails-5-1) to upgrade your store.
+Spree 3.3 requires Rails 5.1 at a minimum. Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-5-0-to-rails-5-1) to upgrade your application.
-### Update Gemfile
+### Update gems
-```ruby
-gem 'spree', '~> 3.3'
-gem 'spree_auth_devise', '~> 3.3'
-gem 'spree_gateway', '~> 3.3'
-```
-
-### Update your extensions
-
-We're changing how extensions dependencies work. Previously you had to match the extension branch to the Spree branch. Starting from Spree 3.2 release date `master` branch of all `spree-contrib` extensions should work with Spree &gt;= `3.1` and &lt; `4.0`. Please change your extensions in Gemfile eg.:
-
-from:
-
-```ruby
-gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero', branch: '3-1-stable'
-```
-
-to:
-
-```ruby
-gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero'
+```bash
+bundle update
```
-### Run `bundle update`
-
### Install missing migrations
```bash
@@ -77,7 +57,7 @@ gem 'aws-sdk', '>= 2.0'
and run `bundle update aws-sdk`
-In your paperclip configuration, you also need to specify `s3_region` attribute eg. [https://github.com/spree/spree/blame/master/guides/content/developer/customization/s3\_storage.md\#L27](https://github.com/spree/spree/blame/master/guides/content/developer/customization/s3_storage#L27)
+In your paperclip configuration, you also need to specify `s3_region` attribute eg. [https://github.com/spree/spree/blame/master/guides/content/developer/customization/s3_storage.md\#L27](https://github.com/spree/spree/blame/master/guides/content/developer/customization/s3_storage#L27)
See also [RubyThursday episode](https://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5) walkthrough of upgrading paperclip in your project.
diff --git a/docs/developer/upgrades/3.3-to-3.4.mdx b/docs/developer/upgrades/3.3-to-3.4.mdx
index d8afca45d0..538e0d02fa 100644
--- a/docs/developer/upgrades/3.3-to-3.4.mdx
+++ b/docs/developer/upgrades/3.3-to-3.4.mdx
@@ -5,16 +5,12 @@ order: 6
description: 'This guide covers upgrading a 3.3 Spree store, to a 3.4 store.'
---
-### Update Gemfile
+### Update gems
-```ruby
-gem 'spree', '~> 3.4'
-gem 'spree_auth_devise', '~> 3.3'
-gem 'spree_gateway', '~> 3.3'
+```bash
+bundle update
```
-### Run `bundle update`
-
### Install missing migrations
```bash
diff --git a/docs/developer/upgrades/3.4-to-3.5.mdx b/docs/developer/upgrades/3.4-to-3.5.mdx
index 6934c582ed..b4c9957f72 100644
--- a/docs/developer/upgrades/3.4-to-3.5.mdx
+++ b/docs/developer/upgrades/3.4-to-3.5.mdx
@@ -5,16 +5,12 @@ order: 5
description: 'This guide covers upgrading a 3.4 Spree store, to a 3.5 store.'
---
-### Update Gemfile
+### Update gems
-```ruby
-gem 'spree', '~> 3.5'
-gem 'spree_auth_devise', '~> 3.3'
-gem 'spree_gateway', '~> 3.3'
+```bash
+bundle update
```
-### Run `bundle update`
-
### Install missing migrations
```bash
@@ -33,27 +29,16 @@ If you were previously using Analytics Trackers feature you need to install it a
1. Add [Spree Analytics Trackers](https://github.com/spree-contrib/spree_analytics_trackers) to your `Gemfile`:
-```ruby
-gem 'spree_analytics_trackers', github: 'spree-contrib/spree_analytics_trackers'
-```
-
-1. Install the gem using Bundler:
-
```bash
-bundle install
+bundle add spree_analytics_trackers
```
-1. Copy and run migrations:
+2. Copy and run migrations:
```bash
bundle exec rails g spree_analytics_trackers:install
```
-You're good to go!
-
## Read the release notes
For information about changes contained within this release, please read the [3.5.0 Release Notes](https://github.com/spree/spree/releases/tag/v3.5.0).
-
-
-
diff --git a/docs/developer/upgrades/3.5-to-3.6.mdx b/docs/developer/upgrades/3.5-to-3.6.mdx
index f1e451a274..fb53ca9b6f 100644
--- a/docs/developer/upgrades/3.5-to-3.6.mdx
+++ b/docs/developer/upgrades/3.5-to-3.6.mdx
@@ -5,21 +5,17 @@ order: 4
description: 'This guide covers upgrading a 3.5 Spree application, to a 3.6 application.'
---
-### Update Gemfile
+## Update your Rails version to 5.2
-```ruby
-gem 'spree', '~> 3.6'
-gem 'spree_auth_devise', '~> 3.3'
-gem 'spree_gateway', '~> 3.3'
-```
-
-### Update your Rails version to 5.2
+Spree 3.6 requires Rails 5.2 at a minimum. Please follow the [official Rails guide](http://guides.rubyonrails.org/5_2_release_notes.html#upgrading-to-rails-5-2) to upgrade your application.
-Please follow the [official Rails guide](http://guides.rubyonrails.org/5_2_release_notes.html#upgrading-to-rails-5-2) to upgrade your store.
+## Update gems
-### Run `bundle update`
+```bash
+bundle update
+```
-### Migrate to ActiveStorage \(optional\)
+### (Optional) Migrate to ActiveStorage (optional)
Please follow the [official paperclip guide](https://github.com/thoughtbot/paperclip/blob/master/MIGRATING) if you want to use ActiveStorage instead of paperclip.
diff --git a/docs/developer/upgrades/3.6-to-3.7.mdx b/docs/developer/upgrades/3.6-to-3.7.mdx
index 48fed88dd2..ded9fa9124 100644
--- a/docs/developer/upgrades/3.6-to-3.7.mdx
+++ b/docs/developer/upgrades/3.6-to-3.7.mdx
@@ -5,15 +5,13 @@ order: 3
description: 'This guide covers upgrading a 3.6 Spree application, to version 3.7.'
---
-## Update Gemfile
+## Update gems
-```ruby
-gem 'spree', '~> 3.7'
-gem 'spree_auth_devise', '~> 3.5'
-gem 'spree_gateway', '~> 3.4'
-```
+Run
-## Run `bundle update`
+```bash
+bundle update
+```
## Install missing migrations
diff --git a/docs/developer/upgrades/3.7-to-4.0.mdx b/docs/developer/upgrades/3.7-to-4.0.mdx
index e59be6603c..3b8f507829 100644
--- a/docs/developer/upgrades/3.7-to-4.0.mdx
+++ b/docs/developer/upgrades/3.7-to-4.0.mdx
@@ -14,9 +14,14 @@ If you're on an older version than 3.7 please follow previous upgrade guides and
3. [upgrade 3.6 to 3.7](3.6-to-3.7)
</Note>
-## Update your Ruby version to 2.5
+## Update your Ruby version to 2.5 or later
-Spree 4.0 requires Ruby 2.5 o you need to bump the ruby version in your project's `Gemfile` and `.ruby-version` files.
+Spree 4.0 requires Ruby 2.5 so you need to change the ruby version in your project's `Gemfile` and `.ruby-version` files. And of course you need to install Ruby 2.5 or later. If you're using RVM you can do it like this:
+
+```bash
+rvm install 2.5
+rvm use 2.5
+```
## Migrate from Paperclip to ActiveStorage
@@ -34,9 +39,9 @@ If you're using the [Address Book](https://github.com/spree-contrib/spree_addres
1. Remove this line from `Gemfile`
- ```ruby
- gem 'spree_address_book', github: 'spree-contrib/spree_address_book'
- ```
+ ```bash
+ bundle remove spree_address_book
+ ```
2. Remove this line from `vendor/assets/javascripts/spree/frontend/all.js`
@@ -50,6 +55,20 @@ If you're using the [Address Book](https://github.com/spree-contrib/spree_addres
//= require spree/frontend/spree_address_book
```
+## Update your `Gemfile`
+
+```ruby
+gem 'spree', '~> 4.0'
+gem 'spree_auth_devise', '~> 4.0'
+gem 'spree_gateway', '~> 3.6'
+```
+
+and run
+
+```bash
+bundle update
+```
+
## Replace `class_eval` with `Module.prepend` \(only for Rails 6\)
Rails 6.0 ships with a [new code autoloader called Zeitwerk](https://medium.com/@fxn/zeitwerk-a-new-code-loader-for-ruby-ae7895977e73) which has some [strict rules in terms of file naming and contents](https://github.com/fxn/zeitwerk#file-structure). If you used `class_eval` to extend and modify Spree classes you will need to rewrite those with `Module.prepend`. Eg.
@@ -119,16 +138,6 @@ As we know this is a big portion of work you can still use Bootstrap 3 for your
[Follow the official Bootstrap 3 to 4 migration guide](https://getbootstrap.com/docs/4.0/migration/)
-## Update Gemfile
-
-```ruby
-gem 'spree', '~> 4.0'
-gem 'spree_auth_devise', '~> 4.0'
-gem 'spree_gateway', '~> 3.6'
-```
-
-## Run `bundle update`
-
## Install missing migrations
```bash
diff --git a/docs/developer/upgrades/4.0-to-4.1.mdx b/docs/developer/upgrades/4.0-to-4.1.mdx
index 361d514681..43115df139 100644
--- a/docs/developer/upgrades/4.0-to-4.1.mdx
+++ b/docs/developer/upgrades/4.0-to-4.1.mdx
@@ -13,14 +13,13 @@ If you're on an older version than 4.0 please follow previous upgrade guides and
3. [upgrade 3.7 to 4.0](3.7-to-4.0)
</Note>
-## Update Gemfile
+## Update gems
-```ruby
-gem 'spree', '~> 4.1'
-gem 'spree_gateway', '~> 3.9'
-```
+Run the following command to update your gems to 4.1:
-## Run `bundle update`
+```bash
+bundle update
+```
## Install missing migrations
@@ -34,7 +33,7 @@ rake railties:install:migrations
rails db:migrate
```
-## Decide what to do next
+## Storefront upgrade
You have two options:
@@ -47,13 +46,7 @@ Spree 4.1 comes with a completely new mobile-first ultra-fast Storefront powered
To replace your current frontend with the new Spree UI follow these steps:
-1. Update Spree Auth Devise to 4.1 in your `Gemfile`
-
- ```ruby
- gem 'spree_auth_devise', '~> 4.1'
- ```
-
-2. In your project root directory run:
+1. In your project root directory run:
```bash
rails g spree:frontend:copy_storefront
@@ -62,8 +55,8 @@ To replace your current frontend with the new Spree UI follow these steps:
**WARNING** this will overwrite your current project templates, it's required for the new UI, so if you'll be asked by the generator what to do please choose **A** to proceed
3. Next, you will need to copy over two files:
- * [spree\_storefront.rb](https://raw.githubusercontent.com/spree/spree/master/core/lib/generators/spree/install/templates/config/initializers/spree_storefront.rb) to `config/initializers/spree_storefront.rb`
- * [spree\_storefront.yml](https://raw.githubusercontent.com/spree/spree/master/core/lib/generators/spree/install/templates/config/spree_storefront.yml) to `config/spree_storefront.yml`
+ * [spree_storefront.rb](https://raw.githubusercontent.com/spree/spree/master/core/lib/generators/spree/install/templates/config/initializers/spree_storefront.rb) to `config/initializers/spree_storefront.rb`
+ * [spree_storefront.yml](https://raw.githubusercontent.com/spree/spree/master/core/lib/generators/spree/install/templates/config/spree_storefront.yml) to `config/spree_storefront.yml`
4. If you overwrote any `spree_frontend` [controllers](https://github.com/spree/spree/tree/master/frontend/app/controllers) you will need to either remove your local copies or move your custom logic to [decorators](/developer/customization#extending-controllers)
5. The same goes for [helpers](https://github.com/spree/spree/tree/master/frontend/app/helpers/spree)
6. You will also need to remove this line:
@@ -78,27 +71,19 @@ To replace your current frontend with the new Spree UI follow these steps:
If you wish to not move to the new Storefront UI it's still an option. Just proceed with the steps described below.
-1. Keep Spree Auth Devise at the version you're currently using
-
- If you're using Spree Auth Devise gem you need to lock it at 4.0.0 in your `Gemfile`:
-
- ```ruby
- gem 'spree_auth_devise', '~> 4.0'
- ```
-
-2. Copy over all views from Spree 4.0
+1. Copy over all views from Spree 4.0
Copy overviews from: [https://github.com/spree/spree/tree/4-0-stable/frontend/app/views](https://github.com/spree/spree/tree/4-0-stable/frontend/app/views) to your application views directory: `app/views`
**WARNING** remember to not overwrite your customizations!
-3. Copy over all Stylesheets from Spree 4.0
+2. Copy over all Stylesheets from Spree 4.0
Copy over stylesheets from: [https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/stylesheets](https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/stylesheets) to `app/stylesheets`
**WARNING** remember to not overwrite your customizations!
-4. Copy over all JavaScript from Spree 4.0
+3. Copy over all JavaScript from Spree 4.0
Copy over stylesheets from: [https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/javascripts](https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/javascripts) to `app/javascripts`
diff --git a/docs/developer/upgrades/4.1-to-4.2.mdx b/docs/developer/upgrades/4.1-to-4.2.mdx
index 7df5060f3d..c173a41e6d 100644
--- a/docs/developer/upgrades/4.1-to-4.2.mdx
+++ b/docs/developer/upgrades/4.1-to-4.2.mdx
@@ -13,13 +13,12 @@ If you're on an older version than 4.1 please follow previous upgrade guides and
2. [upgrade 4.0 to 4.1](4.0-to-4.1)
</Note>
-## Update Gemfile
+## Update gems
-```ruby
-gem 'spree', '~> 4.2'
-gem 'spree_auth_devise', '~> 4.3'
-gem 'spree_gateway', '~> 3.9'
-gem 'spree_i18n', '~> 5'
+Run the following command to update your gems to 4.2:
+
+```bash
+bundle update
```
## Remove SpreeMultiCurrency \(optional\)
@@ -27,6 +26,11 @@ gem 'spree_i18n', '~> 5'
If you used that gem in the past you need to remove it. Multi-Currency is now incorporated into Spree core and you cannot use that gem anymore.
1. Remove `spree_multi_currency` from your `Gemfile`
+
+ ```bash
+ bundle remove spree_multi_currency
+ ```
+
2. Remove these preferences from your Spree initializer \(`config/initializers/spree.rb`\):
* `allow_currency_change`
* `show_currency_selector`
@@ -40,20 +44,12 @@ All international configuration is now kept on the `Store` model in the database
If you used `spree_i18n` gem before please remove any `SpreeI18n::Config`references from your `config/initializers/spree.rb` file.
-## \(Optional\) Add `deface` gem \(optional\)
+## \(Optional\) Add `deface` gem
If you used [Deface overrides](../../advanced/deface_overrides_tutorial#organizing-overrides) you will need to include `deface` in your `Gemfile` as it was removed from Spree / Spree Auth Devise / Spree Gateway dependencies.
-Simply add it to your `Gemfile`:
-
-```ruby
-gem 'deface'
-```
-
-## Update gems
-
```bash
-bundle update
+bundle add deface
```
## Fix RMA migration
@@ -73,21 +69,13 @@ class AddStockLocationToRMA < ActiveRecord::Migration[4.2]
## Install missing migrations
```bash
-rake railties:install:migrations
+bin/rake railties:install:migrations
```
## Run migrations
```bash
-rails db:migrate
-```
-
-## Upgrade all of your Spree extensions to the newest versions
-
-To avoid errors and compatibility issues, please update all of your Spree extension gems to the newest versions which usually includes fixes for the new Spree release, eg.
-
-```bash
-bundle update spree_related_products
+bin/rails db:migrate
```
## Other things to remember
@@ -104,16 +92,16 @@ Only if you've added new Admin Panel pages with Select2 dropdown - [this guide w
If you're using Spree default Storefront \(`spree_frontend` gem\) make sure to update your templates, especially:
-* [app/views/spree/shared/\_head.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_head.html.erb)
-* [app/views/spree/shared/\_locale\_and\_currency.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_locale_and_currency.html.erb)
-* [app/views/spree/shared/\_link\_to\_account.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_link_to_account.html.erb)
-* [app/views/spree/shared/\_internationalization\_options.html.erb](https://github.com/spree/spree/blob/master/frontend/app/views/spree/shared/_internationalization_options.html.erb)
-* [app/views/spree/shared/\_locale\_dropdown.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_locale_dropdown.html.erb)
-* [app/views/spree/shared/\_currency\_dropdown.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_currency_dropdown.html.erb)
-* [app/views/spree/shared/\_mobile\_navigation.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_mobile_navigation.html.erb)
-* [app/views/spree/shared/\_mobile\_internationalization\_options.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_mobile_internationalization_options.html.erb)
-* [app/views/spree/shared/\_nav\_bar.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_nav_bar.html.erb)
-* [app/views/spree/shared/\_line\_item.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_line_item.html.erb)
+* [app/views/spree/shared/_head.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_head.html.erb)
+* [app/views/spree/shared/_locale_and_currency.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_locale_and_currency.html.erb)
+* [app/views/spree/shared/_link_to_account.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_link_to_account.html.erb)
+* [app/views/spree/shared/_internationalization_options.html.erb](https://github.com/spree/spree/blob/master/frontend/app/views/spree/shared/_internationalization_options.html.erb)
+* [app/views/spree/shared/_locale_dropdown.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_locale_dropdown.html.erb)
+* [app/views/spree/shared/_currency_dropdown.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_currency_dropdown.html.erb)
+* [app/views/spree/shared/_mobile_navigation.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_mobile_navigation.html.erb)
+* [app/views/spree/shared/_mobile_internationalization_options.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_mobile_internationalization_options.html.erb)
+* [app/views/spree/shared/_nav_bar.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_nav_bar.html.erb)
+* [app/views/spree/shared/_line_item.html.erb](https://github.com/spree/spree/blob/4-2-stable/frontend/app/views/spree/shared/_line_item.html.erb)
Or simply run `bundle exec rails g spree:frontend:copy_storefront`
diff --git a/docs/developer/upgrades/4.2-to-4.3.mdx b/docs/developer/upgrades/4.2-to-4.3.mdx
index 367cac712f..8a9cfb05fa 100644
--- a/docs/developer/upgrades/4.2-to-4.3.mdx
+++ b/docs/developer/upgrades/4.2-to-4.3.mdx
@@ -16,17 +16,28 @@ If you're on an older version than 4.1 please follow previous upgrade guides and
## Update Gemfile
-```ruby
-gem 'spree', '>= 4.3'
+Since Spree 4.3 `spree` gem doesn't include `spree_emails`, `spree_backend` and `spree_frontend` gems. It only consists of Spree Core and Spree API.
+
+You need to add them to your Gemfile if you want to use them.
+
+```bash
+bundle add spree_emails spree_backend spree_frontend
```
## Remove gems merged into Spree Core
+These gems were merged into Spree Core in version 4.3. All of their functionality is now included in the `spree` gem so you can remove them.
+
### \(Optional\) Remove SpreeMultiDomain
If you used that gem in the past you need to remove it. Multi-Store is now incorporated into Spree core and you cannot use that gem anymore.
1. Remove `spree_multi_domain` from your `Gemfile`
+
+ ```bash
+ bundle remove spree_multi_domain
+ ```
+
2. Remove `//= require spree/frontend/spree_multi_domain` from `vendor/assets/javascripts/spree/frontend/all.js`
3. Remove `//= require spree/backend/spree_multi_domain` from `vendor/assets/javascripts/spree/backend/all.js`
@@ -34,47 +45,16 @@ If you used that gem in the past you need to remove it. Multi-Store is now incor
Spree 4.3 includes TinyMCE 5 editor built-in. It's not recommended to use `spree_editor` gem anymore.
-### \(Optional\) Remove Spree Static Content
-
-Spree 4.3 includes a built-in CMS. It's not recommended to use `spree_static_content`
-
-## Add Spree modules
-
-Spree 4.3 was split into separate modules which aren't included in the `spree` package anymore.
-
-### \(Optional\) Add `spree_frontend` gem
-
-If you use the default Spree Storefront you need to add it to your `Gemfile`.
-
-Note: If you are using `spree_auth_devise`, make sure `spree_frontend` precedes it in your Gemfile.
-
-```ruby
-gem 'spree_frontend', '>= 4.3'
-```
-
-### \(Optional\) Add `spree_backend` gem
-
-If you use the default Spree Admin Panel you need to add it to your `Gemfile`. Make sure it comes before `spree_auth_devise`.
-
-Note: If you are using `spree_auth_devise`, make sure `spree_backend` precedes it in your Gemfile.
-
-
-```ruby
-gem 'spree_backend', '>= 4.3'
+```bash
+bundle remove spree_editor
```
-### \(Optional\) Add `spree_emails` gem
-
-Transactional emails once part of `spree_core` were extracted into their own gem called `spree_emails`. If you would like to still use this feature you'll need to include this new gem in your `Gemfile`.
-
-```ruby
-gem 'spree_emails', '>= 4.3'
-```
+### \(Optional\) Remove Spree Static Content
-## Update gems
+Spree 4.3 includes a built-in CMS. It's not recommended to use `spree_static_content`
```bash
-bundle update
+bundle remove spree_static_content
```
## Install missing migrations
@@ -93,7 +73,7 @@ bin/rails db:migrate
### Upgrade Sprockets to v4
-In your project create `app/assets/config/manifest.jss` file with contents:
+In your project create `app/assets/config/manifest.jss` file with contents:
```ruby
//= link_tree ../images
@@ -101,41 +81,22 @@ In your project create `app/assets/config/manifest.jss` file with contents:
//= link_directory ../stylesheets .css
```
-More [on this topic](https://github.com/rails/sprockets/blob/master/UPGRADING#manifestjs).
-
-### Update Spree Auth Devise and Spree Gateway
-
-```bash
-bundle update spree_gateway spree_auth_devise
-```
+More [on this topic](https://github.com/rails/sprockets/blob/main/UPGRADING.md#manifestjs).
### Admin Panel fix
-If you've developed custom features for your Admin Panel, please replace
+If you've developed custom features for your Admin Panel, please replace any occurrences of
```ruby
render partial: 'spree/shared/error_messages'
```
-with
+to
```ruby
render partial: 'spree/admin/shared/error_messages'
```
-## Upgrade all of your Spree extensions to the newest versions
-
-To avoid errors and compatibility issues, please update all of your Spree extension gems to the newest versions which usually include fixes for the new Spree release, eg.
-
-```bash
-bundle update spree_related_products
-```
-
## Read the release notes
For information about changes contained within this release, please read the [Release notes](https://github.com/spree/spree/releases/v4.3.0).
-
-## More info
-
-If you have any questions or suggestions feel free to [contact us via email](https://spreecommerce.org/contact) or through [Spree slack channels](http://slack.spreecommerce.org/)
-
diff --git a/docs/developer/upgrades/4.3-to-4.4.mdx b/docs/developer/upgrades/4.3-to-4.4.mdx
index 9efbdc123b..a2fd340a5f 100644
--- a/docs/developer/upgrades/4.3-to-4.4.mdx
+++ b/docs/developer/upgrades/4.3-to-4.4.mdx
@@ -11,14 +11,20 @@ If you're on an older version than 4.3 please follow previous upgrade guides and
3. [upgrade 4.2 to 4.3](4.2-to-4.3)
</Note>
-## Update Gemfile
+## Update Gems
-```ruby
-gem 'spree', '~> 4.4'
+Run the following command to update your gems to 4.4:
+
+```bash
+bundle update
```
+to install the new gems.
+
## Remove gems merged into Spree Core
+These gems were merged into Spree Core in version 4.4. All of their functionality is now included in the `spree` gem so you can remove them.
+
### (Optional) Remove Spree Digital
If you used that gem in the past you need to remove it. Digital products are now incorporated into Spree core and you cannot use that gem anymore.
@@ -65,37 +71,34 @@ gem 'spree_backend', '~> 4.4'
bundle update
```
-### Install `jsbundling-rails` gem
+### Run install generators
-`spree_backend` 4.4 uses [Hotwire (Turbo and Stimulus)](https://hotwired.dev/) and requires some javascript bundling provided by the excellent [jsbundling-rails](https://github.com/rails/jsbundling-rails) gem developed by the Rails core team.
-
-This requires that you have both Node and yarn installed on your system.
+This will copy some files from `spree_backend` to your application.
```bash
-bin/rails javascript:install:esbuild
+bin/rails g spree:backend:install
```
-### Install `@spree/dashboard` NPM package
-
-JavaScript required by the `spree_backend` gem is distributed as [a NPM package](https://www.npmjs.com/package/@spree/dashboard).
+If you're using `spree_frontend` you need to run the frontend install generator as well:
```bash
-bin/rails g spree:backend:install
+bin/rails g spree:frontend:install
```
-From now on when you run your app locally you need to use `bin/dev` instead of `bin/rails s`.
-
### Make sure that Node is available in your cloud environment
On Heroku, you need to add the node buildpack - [https://devcenter.heroku.com/articles/buildpacks#using-multiple-buildpacks](https://devcenter.heroku.com/articles/buildpacks#using-multiple-buildpacks)
## Additional fixes and hints
-### Add ActiveJob queues
+### Add Spree ActiveJob queues to your Sidekiq config
+
+Spree uses ActiveJob for processing long running operations to not interrupt your web server performance.
-Spree uses ActiveJob for processing long running operations to not interrupt your web server performance. You need to update your `config/sidekiq.yml` file if you're using the Sidekiq gem.
+If you're using [Sidekiq](https://github.com/mperham/sidekiq) you need to update your `config/sidekiq.yml` file and 2 new queues:
-Make sure that `spree_stock_location_stock_items` and `spree_webhooks` queues are there. You can check [spree\_starter's config](https://github.com/spree/spree\_starter/blob/main/config/sidekiq.yml) as a guideline.
+* `spree_stock_location_stock_items`
+* `spree_webhooks`
### Disabling webhooks
@@ -135,7 +138,7 @@ Spree::Dependencies.address_update_service
## Read the release notes
-For information about changes contained within this release, please read the [CHANGELOG](https://github.com/spree/spree/releases).
+For information about changes contained within this release, please read the [CHANGELOG](https://github.com/spree/spree/releases/tag/v4.4.0).
## More info
diff --git a/docs/developer/upgrades/4.4-to-4.5.mdx b/docs/developer/upgrades/4.4-to-4.5.mdx
index eaf8252266..d067c1013e 100644
--- a/docs/developer/upgrades/4.4-to-4.5.mdx
+++ b/docs/developer/upgrades/4.4-to-4.5.mdx
@@ -13,15 +13,19 @@ If you're on an older version than 4.4 please follow previous upgrade guides and
## Upgrade Rails
-Rails 6.0 is no longer supported - if you haven’t already, you’ll need to upgrade to **Rails 6.1 or 7.0**. The effort to upgrade to Rails 6.1 is relatively low, but brings a lot of improvements around ActiveStorage and handling of CDNs. See the Rails docs [for upgrading from 6.0 to 6.1](https://edgeguides.rubyonrails.org/upgrading\_ruby\_on\_rails.html#upgrading-from-rails-6-0-to-rails-6-1), and for [upgrading from 6.1 to 7.0](https://edgeguides.rubyonrails.org/upgrading\_ruby\_on\_rails.html#upgrading-from-rails-6-1-to-rails-7-0).
+Rails 6.0 is no longer supported - if you haven’t already, you’ll need to upgrade to **Rails 6.1 or 7.0**.
+
+The effort to upgrade to Rails 6.1 is relatively low, but brings a lot of improvements around ActiveStorage and handling of CDNs. See the Rails docs [for upgrading from 6.0 to 6.1](https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-6-0-to-rails-6-1), and for [upgrading from 6.1 to 7.0](https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-6-1-to-rails-7-0).
If using Rails 7, you will need to [install libvips](https://www.libvips.org/install.html) on your cloud environment, as Rails 7 uses vips as its default variant processor. You can still use imagemagick, but you’ll need to manually set it in your [Rails config](https://edgeapi.rubyonrails.org/classes/ActiveStorage/Variant.html).
-## Update Spree Config
+### Rails 7 specific changes
+
+#### Update Spree Config
If you're upgrading your app to Rails 7, you'll need to make a slight update to your spree config initializer. In `config/initializers/spree.rb`, wrap the `Spree.config` block in a `Rails.application.config.after_initialize` block, like so:
-```
+```ruby
Rails.application.config.after_initialize do
Spree.config do |config|
# config settings initialized here
@@ -31,18 +35,18 @@ end
If you don't perform this update to the code, you may expect to get the following error:
-```shell
+```ruby
/lib/spree/core/preferences/store.rb:96:in `should_persist?':
uninitialized constant Spree::Preference (NameError)
```
-## Update other initializers
+#### Update other initializers
-Just like with Spree::Config, you may need to [update other intializers in your application, that use autoloadable constants](https://rubyonrails.org/2021/9/3/autoloading-in-rails-7-get-ready).
+Just like with `Spree::Config`, you may need to [update other intializers in your application, that use autoloadable constants](https://rubyonrails.org/2021/9/3/autoloading-in-rails-7-get-ready).
For example, if you use `spree_auth_devise`, you'll need to update `config/initializers/devise.rb` and wrap the configuration in `Rails.application.config.after_initialize` block:
-```
+```ruby
Rails.application.config.after_initialize do
if defined?(Spree::Auth)
Spree::Auth::Config.signout_after_password_change = false
@@ -50,34 +54,18 @@ Rails.application.config.after_initialize do
end
```
-## Update Gemfile
-
-```ruby
-gem 'spree', '> 4.5'
-```
-
-Update all other spree gems used in your application to 4.5.0 or version compatible with 4.5:
-
-```ruby
-gem 'spree_sample', '~> 4.5'
-gem 'spree_emails', '~> 4.5'
-gem 'spree_frontend', '>= 4.5'
-gem 'spree_backend', '>= 4.5'
-gem 'spree_gateway', '~> 3.10'
-gem 'spree_auth_devise', '>= 4.5'
-gem 'spree_i18n', '~> 5.1'
-```
+## Update gems
-If your application depends on the Spree v1 API, you'll have to include it as a gem, as it has been extracted from the spree gem:
+Run the following command to update your gems to 4.4:
-```ruby
-gem 'spree_api_v1'
+```bash
+bundle update
```
-## Update gems
+Legacy REST API v1 was extracted from the spree gem in 4.4. If your application depends on the Spree v1 API, you'll have to include it as a gem in your `Gemfile`:
```bash
-bundle update
+bundle add spree_api_v1
```
## Install missing migrations
@@ -97,14 +85,9 @@ bin/rails db:migrate
If using [Spree Frontend](https://github.com/spree/spree_rails_frontend), run the following additional commands to get everything set up correctly with the updated gems:
```bash
-bin/rails javascript:install:esbuild
-bin/rails turbo:install
bin/rails g spree:frontend:install
-yarn build
```
-And that's a wrap! :tada:
-
## Read the release notes
For information about changes contained within this release, please read the [Spree 4.5.0 Release Notes](https://github.com/spree/spree/releases/tag/v4.5.0).
diff --git a/docs/developer/upgrades/4.5-to-4.6.mdx b/docs/developer/upgrades/4.5-to-4.6.mdx
index ca20331dea..3a7daa2891 100644
--- a/docs/developer/upgrades/4.5-to-4.6.mdx
+++ b/docs/developer/upgrades/4.5-to-4.6.mdx
@@ -11,36 +11,26 @@ If you're on an older version than 4.5 please follow previous upgrade guides and
3. [upgrade 4.4 to 4.5](4.4-to-4.5)
</Note>
-## Update Gemfile
-
-```ruby
-gem 'spree', '>= 4.6'
-```
+## Update gems
-Update all other spree gems used in your application to 4.6.0 or version compatible with 4.6:
+Run the following command to update your gems to 4.6:
-```ruby
-gem 'spree_sample', '~> 4.6'
-gem 'spree_emails', '~> 4.6'
-gem 'spree_frontend', '>= 4.6'
-gem 'spree_backend', '>= 4.6'
-gem 'spree_gateway', '~> 3.10'
-gem 'spree_auth_devise', '>= 4.5'
-gem 'spree_i18n', '~> 5.1'
+```bash
+bundle update
```
-## (Optional) Remove spree\_globalize
+## (Optional) Remove spree_globalize
-If your application used the spree\_globalize extension, you can remove it from your Gemfile, as translations are now supported out-of-the-box with the [Mobility](https://github.com/shioyama/mobility) gem.
+If your application used the spree_globalize extension, you can remove it from your Gemfile, as translations are now supported out-of-the-box with the [Mobility](https://github.com/shioyama/mobility) gem.
-We've configured Mobility to use [a strategy that uses a separate table to store translations](https://dejimata.com/2017/3/3/translating-with-mobility#strategy-2), just like how spree\_globalize did. This means, you won't need to make any changes to the database structure or migrate data.
+We've configured Mobility to use [a strategy that uses a separate table to store translations](https://dejimata.com/2017/3/3/translating-with-mobility#strategy-2), just like how spree_globalize did. This means, you won't need to make any changes to the database structure or migrate data.
During the upgrade process, you may need to review your custom queries that rely on translations, as there are minor differences in how Mobility handles them. Spree 4.6 includes a few [built-in concerns](../../customization/i18n) to make it easier to work with translatable models.
-## Update gems
+Run the following command to remove spree_globalize from your Gemfile:
```bash
-bundle update
+bundle remove spree_globalize
```
## Install missing migrations
@@ -55,24 +45,76 @@ bin/rake railties:install:migrations
bin/rails db:migrate
```
-Note: If you didn't use spree\_globalize before, this will install migrations that move some columns from spree\_products, spree\_taxons, to dedicated translation tables -> spree\_products\_translations, spree\_taxons\_translations etc.
+<Note>
+If you didn't use `spree_globalize` before, this will install migrations that move some columns from `spree_products`, `spree_taxons`, to dedicated translation tables such as `spree_products_translations`, `spree_taxons_translations` etc.
If you're using raw SQL queries (either in the application code, or running in external tools), you may need to review the new structure and update your queries accordingly.
+</Note>
-## Run Additional Commands for Frontend
+### Run install generators
-If using [Spree Frontend](https://github.com/spree/spree_rails_frontend), run the following additional commands to get everything set up correctly with the updated gems:
+This will copy some files from `spree_backend` to your application.
+
+```bash
+bin/rails g spree:backend:install
+```
+
+If you're using `spree_frontend` you need to run the frontend install generator as well:
```bash
-bin/rails javascript:install:esbuild
-bin/rails turbo:install
bin/rails g spree:frontend:install
-yarn build
```
-And that's a wrap! :tada:
+## Additional fixes and hints
+
+### Update migrations for translation tables with additional columns
+
+If you want to translate more fields in [translated resources](/developer/customization/i18n#resource-translations), you have to alter copied migrations or add new ones.
+We're using the [Spree::TranslationMigrations](https://github.com/spree/spree/blob/main/core/lib/spree/translation_migrations.rb) to help with migrating data.
+
+### Add or update the behavior of the translated model
+
+Each translated resource has a corresponding `Translation` model, see [here](https://github.com/spree/spree/blob/v4.6.5/core/app/models/spree/product.rb#L44) for reference.
+If you want to add some more behavior to the translation, you need to do it within the `Translation.class_eval` block.
+
+If you overwrote Spree models in your application, you have to define this block yourself. Apart from that, please include these modules:
+- `Spree::TranslatableResource` - required for all translated models
+- `Spree::TranslatableResourceSlug` - required for translated models with slugs/permalinks
+
+[Read more](/developer/customization/i18n#resource-translations-implementation) how Spree handles resource translations.
+
+### Generating slugs with `friendly_id`
+
+Generating slugs/permalinks in `Spree::Product` and `Spree::Taxon` models is now based on the translated name. If you use the `history` plugin, [read on how to use it](https://github.com/shioyama/friendly_id-mobility?tab=readme-ov-file#slug-history) with the `mobility` gem.
+
+### Resource translations and encryption
+
+Currently, it's not possible to translate encrypted data. If you're already encrypting data that Spree translates, you need to remove that functionality.
+
+### Full text search with pg_search scopes
+
+If you use the [pg_search](https://github.com/Casecommons/pg_search) for the full text search in [translated resources](/developer/customization/i18n#resource-translations), you need to move your scopes to the translated model, eg. from the `Spree::Product` to the `Spree::Product::Translation`.
+
+If you still want to have the original scope, you need to rewrite it, from:
+
+```ruby
+pg_search_scope :search_by_name, against: :name
+```
+
+to:
+
+```ruby
+self::Translation.class_eval do
+ include PgSearch::Model
+ pg_search_scope :search_by_name, against: :name
+end
+
+scope :search_by_name, lambda { |query|
+ product_ids = Spree::Product::Translation.search_by_name(query).pluck(:spree_product_id)
+ where(id: product_ids)
+}
+```
## Read the release notes
For information about changes contained within this release, please read the [Spree 4.6.0 Release Notes](https://github.com/spree/spree/releases/tag/v4.6.0).
-
diff --git a/docs/developer/upgrades/4.6-to-4.7.mdx b/docs/developer/upgrades/4.6-to-4.7.mdx
index ad39d894e2..b473ba0deb 100644
--- a/docs/developer/upgrades/4.6-to-4.7.mdx
+++ b/docs/developer/upgrades/4.6-to-4.7.mdx
@@ -12,44 +12,21 @@ If you're on an older version than 4.6 please follow previous upgrade guides and
</Note>
<AccordionGroup>
- <Accordion title="1. Update Gemfile">
-
- ```ruby
- gem 'spree', '~> 4.7'
- ```
-
- Update all other spree gems used in your application to 4.7.0 or version compatible with 4.7:
-
- ```ruby
- gem 'spree_sample', '~> 4.7'
- gem 'spree_emails', '~> 4.7'
- gem 'spree_backend', '~> 4.7'
- gem 'spree_frontend', '~> 4.7'
- gem 'spree_gateway', '~> 3.10'
- gem 'spree_auth_devise', '~> 4.6'
- gem 'spree_i18n', '~> 5.3'
- ```
-
- <Warning>
- If your Gemfile includes spree\_frontend, make sure it's defined below spree\_backend. This is required for a proper initialization of the admin action buttons defined by spree\_frontend.
- </Warning>
- </Accordion>
-
- <Accordion title="2. Update gems">
+ <Accordion title="1. Update gems">
```bash
bundle update
```
</Accordion>
- <Accordion title="3. Install and run missing migrations">
+ <Accordion title="2. Install and run missing migrations">
```bash
bin/rake railties:install:migrations && bin/rails db:migrate
```
</Accordion>
- <Accordion title="4. Re-Run Spree Frontend install (Optional)">
+ <Accordion title="3. (Optional) Re-Run Spree Frontend install">
If you're using [Spree Frontend gem](https://github.com/spree/spree_rails_frontend), run the following additional commands to get everything set up correctly with the updated gems:
diff --git a/docs/developer/upgrades/one-dot-oh-to-one-dot-one.mdx b/docs/developer/upgrades/one-dot-oh-to-one-dot-one.mdx
deleted file mode 100644
index a82cead478..0000000000
--- a/docs/developer/upgrades/one-dot-oh-to-one-dot-one.mdx
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: 1.0 to 1.1
-section: upgrades
-hidden: true
-order: 16
-description: 'This guide covers upgrading a 1.0 Spree store, to a 1.1 store.'
----
-
-# 1.0 to 1.1
-
-## Overview
-
-This guide has been written from the perspective of a blank Spree 1.0 store with no extensions.
-
-If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 1.1 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-1-stable branch.
-
-## Upgrade Rails
-
-Spree 1.1 depends on any Rails 3.2 release after Rails 3.2.9. Ensure that you have that dependency specified in your Gemfile:
-
-```ruby
-gem 'rails', '~> 3.2.9'```
-
-Along with this, you may have to also update your assets group in the Gemfile:
-
-```ruby
-group :assets do
- gem 'sass-rails', '~> 3.2.5'
- gem 'coffee-rails', '~> 3.2.1'
- gem 'uglifier', '>= 1.0.3'
-end
-
-gem 'jquery-rails', '2.1.4'
-```
-
-For more information, please refer to the [Upgrading Ruby on Rails guide](http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-3-1-to-rails-3-2).
-
-## Upgrade Spree
-
-For best results, use the 1-1-stable branch from GitHub:
-
-```ruby
-gem 'spree', github: 'spree/spree', branch: '1-1-stable'```
-
-Run `bundle update spree`.
-
-## Copy and run migrations
-
-Copy over the migrations from Spree (and any other engine) and run them using
-these commands:
-
- rake railties:install:migrations
- rake db:migrate
-
-## Remove references to spree_api assets
-
-Spree API no longer provides any asset files, so references to these must be removed from:
-
-* app/assets/stylesheets/store/all.css
-* app/assets/stylesheets/admin/all.css
-* app/assets/javascripts/store/all.js
-* app/assets/javascripts/admin/all.js
-
-## Read the release notes
-
-For information about what has changed in this release, please read the [1.1.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_1_1_0.html).
-
-
-
diff --git a/docs/developer/upgrades/one-dot-one-to-one-dot-two.mdx b/docs/developer/upgrades/one-dot-one-to-one-dot-two.mdx
deleted file mode 100644
index 658bdf712f..0000000000
--- a/docs/developer/upgrades/one-dot-one-to-one-dot-two.mdx
+++ /dev/null
@@ -1,57 +0,0 @@
----
-title: 1.1 to 1.2
-section: upgrades
-order: 15
-hidden: true
-description: 'This guide covers upgrading a 1.1 Spree store, to a 1.2 store.'
----
-
-# 1.1 to 1.2
-
-## Overview
-
-This guide has been written from the perspective of a blank Spree 1.1 store with no extensions.
-
-If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 1.2 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-2-stable branch.
-
-## Upgrade Spree
-
-For best results, use the 1-2-stable branch from GitHub:
-
-```ruby
-gem 'spree', github: 'spree/spree', branch: '1-2-stable'```
-
-Run `bundle update spree`.
-
-## Authentication dependency
-
-In this release, the `spree_auth` component was moved out of the main set of
-gems into an extension, called `spree_auth_devise`. If you want to continue using Spree's authentication, then you will need to specify this extension as a dependency in your `Gemfile`:
-
-```ruby
-gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '1-2-stable'```
-
-Run `bundle install` to install this extension.
-
-### Rename current_user to current_spree_user
-
-To ensure that Spree does not conflict with any authentication provided by the application, Spree has renamed its `current_user` variable to `current_spree_user`. You should make this change wherever necessary within your application.
-
-Similar to this, any references to `@user` are now `@spree_user`.
-
-## Copy and run migrations
-
-Copy over the migrations from Spree (and any other engine) and run them using
-these commands:
-
- rake railties:install:migrations
- rake db:migrate
-
-This may copy over additional migrations from spree_auth_devise and run them as well.
-
-## Read the release notes
-
-For information about changes contained with this release, please read the [1.2.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_1_2_0.html).
-
-
-
diff --git a/docs/developer/upgrades/one-dot-three-to-two-dot-oh.mdx b/docs/developer/upgrades/one-dot-three-to-two-dot-oh.mdx
deleted file mode 100644
index 47fe485070..0000000000
--- a/docs/developer/upgrades/one-dot-three-to-two-dot-oh.mdx
+++ /dev/null
@@ -1,66 +0,0 @@
----
-title: 1.3 to 2.0
-section: upgrades
-order: 13
-hidden: true
-description: 'This guide covers upgrading a 1.3 Spree store, to a 2.0 store.'
----
-
-# 1.3 to 2.0
-
-## Overview
-
-This guide has been written from the perspective of a blank Spree 1.3 store with no extensions.
-
-If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.0 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-0-stable branch.
-
-Given that this is a major release, you may want to read through the [2.0.0 release notes](http://guides.spreecommerce.org/release_notes/spree_2_0_0.html) to see what has changed before proceeding with this upgrade.
-
-## Upgrade Spree
-
-For best results, use the 2-0-stable branch from GitHub:
-
-```ruby
-gem 'spree', github: 'spree/spree', branch: '2-0-stable'```
-
-Run `bundle update spree`.
-
-## Bump jquery-rails
-
-This version of Spree bumps the dependency for jquery-rails to this:
-
-```ruby
-gem 'jquery-rails', '3.0'```
-
-Ensure that you have a line such as this in your Gemfile to allow that dependency.
-
-## Remove middleware
-
-The two pieces of middleware previously inserted into `config/application.rb` have now been deprecated. Remove these two lines:
-
-```ruby
-config.middleware.use "Spree::Core::Middleware::RedirectLegacyProductUrl"
-config.middleware.use "Spree::Core::Middleware::SeoAssist"```
-
-## Rename assets
-
-In Spree 2, assets have been renamed.
-
-In `store/all.css` and `store/all.js`, you will need to rename the references from `spree_core` to `spree_frontend`. Similarly to this, in `admin/all.css` and `admin/all.js`, you will need to rename the references from `spree_core` to `spree_backend`.
-
-Additionally, remove references to `spree_promo` from these files. That component of Spree has now been merged with the Core component.
-
-## Copy and run migrations
-
-Copy over the migrations from Spree (and any other engine) and run them using
-these commands:
-
- rake railties:install:migrations
- rake db:migrate
-
-## Read the release notes
-
-For information about changes contained with this release, please read the [2.0.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_2_0_0.html).
-
-
-
diff --git a/docs/developer/upgrades/one-dot-two-to-one-dot-three.mdx b/docs/developer/upgrades/one-dot-two-to-one-dot-three.mdx
deleted file mode 100644
index c73adc191b..0000000000
--- a/docs/developer/upgrades/one-dot-two-to-one-dot-three.mdx
+++ /dev/null
@@ -1,88 +0,0 @@
----
-title: 1.2 to 1.3
-section: upgrades
-order: 14
-hidden: true
-description: 'This guide covers upgrading a 1.2 Spree store, to a 1.3 store.'
----
-
-# 1.2 to 1.3
-
-## Overview
-
-This guide has been written from the perspective of a blank Spree 1.2 store with no extensions.
-
-If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 1.3 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-3-stable branch.
-
-## Upgrade Spree
-
-For best results, use the 1-3-stable branch from GitHub:
-
-```ruby
-gem 'spree', github: 'spree/spree', branch: '1-3-stable'```
-
-Run `bundle update spree`.
-
-## Bump jquery-rails
-
-This version of Spree bumps the dependency for jquery-rails to this:
-
-```ruby
-gem 'jquery-rails', '2.2'```
-
-Ensure that you have a line such as this in your Gemfile to allow that dependency.
-
-## Copy and run migrations
-
-Copy over the migrations from Spree (and any other engine) and run them using
-these commands:
-
- rake railties:install:migrations
- rake db:migrate
-
-## Replace money usages
-
-In older versions of Spree, we had a helper method called `money` which
-occasionally formatted money amounts incorrectly. Specifically, if the `I18n.locale` was changed, currencies started to display in that amount, rather than the proper amount. An item that was once $100, would suddenly become 100¥ if the locale was switched to Japanese, for instance.
-
-In Spree 1.3, money handling
-has been reworked by a major contribution by the [Free Running
-Technologies](http://www.freerunningtech.com/) team. See [#2197](https://github.com/spree/spree/pull/2197) for details.
-
-Prices are now stored in a separate table, called `spree_prices`. This table tracks the variant, the price amount, and the currency. This allows for variants to have different prices in different currencies.
-
-Along with this, we introduced the `Spree::Money` class which is used to display amounts correctly. Where previously Spree would have done this:
-
-```erb
-<td><%%= money adjustment.amount %></td>```
-
-We now use this:
-
-```erb
-<td><%%= adjustment.display_amount.to_html %></td>```
-
-Alternatively, you can use `Spree::Money.new(amount)` to get a `Spree::Money` representation. Calling `to_html` on that object will format it neatly for HTML views, and calling `to_s` will format it nicely everywhere else.
-
-### Variant.active scope
-
-Along with these changes, the `Spree::Variant.active` scope now takes an argument for the currency. Whatever currency is specified will return variants in that currency. Previously it may have been enough to just do this:
-
-```ruby
-
-But now you must specify a currency:
-
-```ruby
-
-Or you can rely on the current currency within views:
-
-```ruby
[email protected](current_currency)```
-
-## Read the release notes
-
-For information about changes contained with this release, please read the [1.3.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_1_3_0.html).
-
-
-
diff --git a/docs/developer/upgrades/quickstart.mdx b/docs/developer/upgrades/quickstart.mdx
index 7f74b69d23..9aa1fd8ac3 100644
--- a/docs/developer/upgrades/quickstart.mdx
+++ b/docs/developer/upgrades/quickstart.mdx
@@ -31,7 +31,7 @@ New features, will likely contain API changes. The difference between Spree mino
## Security
-Our Security policy is [described here](https://docs.spreecommerce.org/security).
+Our Security policy is [described here](/developer/security).
When a release series is no longer supported, it's your own responsibility to deal with bugs and security issues. We may provide backports of some critical security fixes.