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.

added upgrade guides

Damian Legawiec006eb3491afd
diff --git a/docs/developer/contributing/creating-an-extension.mdx b/docs/developer/contributing/creating-an-extension.mdx
index 0c9910165b..0e7aa643b4 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](/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:
@@ -93,13 +93,13 @@ module SpreeSimpleSales
module Spree
module HomeControllerDecorator
def sale
- @products = ::Spree::Product.joins(:variants_including_master).where('spree_variants.sale_price is not null').distinct
+ @products = Spree::Product.joins(:variants_including_master).where('spree_variants.sale_price is not null').distinct
end
end
end
end
-Spree::HomeController.prepend SpreeSimpleSales::Spree::HomeControllerDecorator
+Spree::HomeController.prepend SpreeSimpleSalesSpree::HomeControllerDecorator
```
This will select just the products that have a variant with a `sale_price` set.
@@ -156,13 +156,13 @@ module SpreeSimpleSales
module VariantDecorator
def price_in(currency)
return super unless sale_price.present?
- ::Spree::Price.new(variant_id: self.id, amount: self.sale_price, currency: currency)
+ Spree::Price.new(variant_id: self.id, amount: self.sale_price, currency: currency)
end
end
end
end
-Spree::Variant.prepend SpreeSimpleSales::Spree::VariantDecorator
+Spree::Variant.prepend SpreeSimpleSalesSpree::VariantDecorator
```
If there is a `sale_price` present on the product's master variant, we return that price. Otherwise, we call the original implementation of `price_in` \(using `return super`\).
diff --git a/docs/developer/contributing/updating-extensions.mdx b/docs/developer/contributing/updating-extensions.mdx
index bc0f44695e..3d3e507346 100644
--- a/docs/developer/contributing/updating-extensions.mdx
+++ b/docs/developer/contributing/updating-extensions.mdx
@@ -40,7 +40,7 @@ module YourExtensionName::OrderDecorator
end
end
-::Spree::Order.prepend(YourExtensionName::OrderDecorator)
+Spree::Order.prepend(YourExtensionName::OrderDecorator)
```
## Fixing Deface Overrides
diff --git a/docs/developer/core-concepts/shipments.mdx b/docs/developer/core-concepts/shipments.mdx
index e0c15eef7a..2bdb23310d 100644
--- a/docs/developer/core-concepts/shipments.mdx
+++ b/docs/developer/core-concepts/shipments.mdx
@@ -371,7 +371,7 @@ module Spree
module Stock
module CoordinatorDecorator do
def prioritize_packages(packages)
- prioritizer = Prioritizer.new(order, packages, ::Spree::Stock::CustomAdjuster)
+ prioritizer = Prioritizer.new(order, packages, Spree::Stock::CustomAdjuster)
prioritizer.prioritized_packages
end
end
diff --git a/docs/developer/customization/api_v2.mdx b/docs/developer/customization/api_v2.mdx
index cc6d94b9d9..a06f844d72 100644
--- a/docs/developer/customization/api_v2.mdx
+++ b/docs/developer/customization/api_v2.mdx
@@ -20,7 +20,7 @@ You can easily swap OOTB Spree serializers with your own thanks to [Spree Depend
#### Adding custom attributes
<Note>
-Generally it's recommended to use [Properties](/core-concepts/products#product-properties) and [OptionTypes/Option Values](/core-concepts/products#option-types-and-option-values) for custom attributes and not to modify the Spree database schema
+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.
diff --git a/docs/developer/customization/checkout.mdx b/docs/developer/customization/checkout.mdx
index a32784f181..9893d47245 100644
--- a/docs/developer/customization/checkout.mdx
+++ b/docs/developer/customization/checkout.mdx
@@ -12,7 +12,7 @@ The customization of the flow of the checkout can be done by using Spree's `chec
## Default Checkout Steps
-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](/core-concepts/orders):
+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\)
* Address Information
@@ -43,7 +43,7 @@ def check_registration
end
```
-The configuration of the guest checkout option is done via [Preferences](/core-concepts/preferences). Spree will allow guest checkout by default. Use the `allow_guest_checkout` preference to change the default setting.
+The configuration of the guest checkout option is done via [Preferences](/developer/core-concepts/preferences). Spree will allow guest checkout by default. Use the `allow_guest_checkout` preference to change the default setting.
### Address Information
@@ -55,7 +55,7 @@ The address fields include a select box for choosing state/province. The list of
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](/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.
+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.
### Delivery Options
@@ -73,7 +73,7 @@ If you do not want to use a gateway with payment profiles then you will need to
Spree discards the credit card number after this step is processed. If you do not have a gateway with payment profiles enabled then your card information will be lost before it's time to authorize the card.
-For more information about payments, please see the [Payments guide](/core-concepts/payments).
+For more information about payments, please see the [Payments guide](/developer/core-concepts/payments).
### Confirmation
diff --git a/docs/developer/customization/deface_overrides_tutorial.mdx b/docs/developer/customization/deface_overrides_tutorial.mdx
index 817468294c..e8013876e3 100644
--- a/docs/developer/customization/deface_overrides_tutorial.mdx
+++ b/docs/developer/customization/deface_overrides_tutorial.mdx
@@ -33,7 +33,7 @@ mkdir app/overrides
So we want to override `spree/admin/products/_form.html.erb`. Here is the part of the file we are going to add content to \(you can also view the [full file](https://github.com/spree/spree/blob/master/backend/app/views/spree/admin/products/_form.html.erb)\):
-```text
+```erb
<div class="right four columns omega" data-hook="admin_product_form_right">
<%= f.field_container :price do %>
<%= f.label :price, raw(Spree.t(:master_price) + required_span_tag) %>
@@ -120,7 +120,7 @@ As Spree views are changed over coming versions, the original HTML elements mayb
For example, spree/products/show.html.erb looks as follows:
-```text
+```erb
<div data-hook="product_show" itemscope itemtype="http://schema.org/Product">
<%% body_id = 'product-details' %>
<div class="columns six alpha" data-hook="product_left_part">
@@ -206,7 +206,7 @@ Deface evaluates all the selectors passed against the original erb view contents
Given the following Erb file:
-```text
+```erb
<%% if products.empty? %>
<%%= Spree.t(:no_products_found) %>
<%% elsif params.key?(:keywords) %>
diff --git a/docs/developer/customization/dependencies.mdx b/docs/developer/customization/dependencies.mdx
index 7e65e3f040..2998b85e38 100644
--- a/docs/developer/customization/dependencies.mdx
+++ b/docs/developer/customization/dependencies.mdx
@@ -14,23 +14,22 @@ With Dependencies, you can easily replace parts of Spree internals with your cus
To replace [serializers](https://github.com/jsonapi-serializer/jsonapi-serializer) or Services in a specific API endpoint you can create a simple decorator:
-Create a `app/controllers/my_store/spree/cart_controller_decorator.rb`
+Create a `app/controllers/spree/cart_controller_decorator.rb`
```ruby
- module MyStore
- module Spree
- module CartControllerDecorator
- def resource_serializer
- MyNewAwesomeCartSerializer
- end
-
- def add_item_service
- MyNewAwesomeAddItemToCart
- end
- end
+module Spree
+ module CartControllerDecorator
+ def resource_serializer
+ MyNewAwesomeCartSerializer
+ end
+
+ def add_item_service
+ MyNewAwesomeAddItemToCart
end
end
- Spree::Api::V2::Storefront::CartController.prepend MyStore::Spree::CartControllerDecorator
+
+ CartController.prepend(CartControllerDecorator)
+end
```
This will change the serializer in this API endpoint to `MyNewAwesomeCartSerializer` and also it will swap the default `add_item_service` to `MyNewAwesomeAddItemToCart`.
diff --git a/docs/developer/customization/i18n.mdx b/docs/developer/customization/i18n.mdx
index 025c043ac4..b5b590bd13 100644
--- a/docs/developer/customization/i18n.mdx
+++ b/docs/developer/customization/i18n.mdx
@@ -12,13 +12,13 @@ description: >-
## Default Locale
-Each [**Store**](/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.
+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).
## Default Currency
-Each [**Store**](/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.
+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`
diff --git a/docs/developer/customization/images.mdx b/docs/developer/customization/images.mdx
index 4a9515e0d0..73e86fca4b 100644
--- a/docs/developer/customization/images.mdx
+++ b/docs/developer/customization/images.mdx
@@ -8,37 +8,35 @@ This guide explains how to change Product Images dimensions and different storag
### Image dimensions
-To change the default image dimensions or add new ones you need to create a decorator file `app/models/my_store/spree/image_decorator.rb`:
+To change the default image dimensions or add new ones you need to create a decorator file `app/models/spree/image_decorator.rb`:
```ruby
-module MyStore
- module Spree
- module ImageDecorator
- module ClassMethods
- def styles
- {
- mini: '48x48>',
- small: '100x100>',
- product: '240x240>',
- large: '600x600>',
- }
- end
+module Spree
+ module ImageDecorator
+ module ClassMethods
+ def styles
+ {
+ mini: '48x48>',
+ small: '100x100>',
+ product: '240x240>',
+ large: '600x600>',
+ }
end
+ end
- def self.prepended(base)
- base.inheritance_column = nil
- base.singleton_class.prepend ClassMethods
- end
+ def self.prepended(base)
+ base.inheritance_column = nil
+ base.singleton_class.prepend ClassMethods
end
end
-end
-::Spree::Image.prepend ::MyStore::Spree::ImageDecorator
+ Image.prepend(ImageDecorator)
+end
```
You can also create image variations on the fly in your templates, eg.
-```text
+```erb
<%= image_tag(main_app.url_for(@product.images.first.attachment.variant(resize: '150x150'))) %>
```
diff --git a/docs/developer/customization/logic.mdx b/docs/developer/customization/logic.mdx
index c5c3283707..fa0bbbf4f1 100644
--- a/docs/developer/customization/logic.mdx
+++ b/docs/developer/customization/logic.mdx
@@ -18,37 +18,35 @@ Standard practice for including such changes in your application or extension is
## Extending Models
-Adding a custom method to the [Product](https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb) model: `app/models/my_store/spree/product_decorator.rb`
+Adding a custom method to the [Product](https://github.com/spree/spree/blob/master/core/app/models/spree/product.rb) model: `app/models/spree/product_decorator.rb`
```ruby
-module MyStore
- module Spree
- module ProductDecorator
- def self.prepended(base)
- base.before_validation :strip_whitespaces
- end
-
- def some_method
- ...
- end
-
- protected
-
- def strip_whitespaces
- ...
- end
+module Spree
+ module ProductDecorator
+ def self.prepended(base)
+ base.before_validation :strip_whitespaces
+ end
+
+ def some_method
+ ...
+ end
+
+ protected
+
+ def strip_whitespaces
+ ...
end
end
-end
-::Spree::Product.prepend MyStore::Spree::ProductDecorator if ::Spree::Product.included_modules.exclude?(MyStore::Spree::ProductDecorator)
+ Product.prepend(ProductDecorator)
+end
```
#### Adding new associations to existing models
Assume you want to add a new model called `Video` associated to `Spree::Product`. Let's start with creating a database migration:
-```text
+```bash
bundle exec rails g migration CreateVideos url:string product:references
bundle exec rails db:migrate
```
@@ -58,41 +56,39 @@ Add new model to `app/models/videos.rb`:
```ruby
class Video < ApplicationRecord
belongs_to :product, class_name: 'Spree::Product'
+
+ has_one_attached :video_file
end
```
-Finally add the association in `ProductDecorator` in `app/models/my_store/spree/product_decorator.rb`:
+Finally add the association in `ProductDecorator` in `app/models/spree/product_decorator.rb`:
```ruby
-module MyStore
- module Spree
- module ProductDecorator
- def self.prepended(base)
- base.has_many :videos, class_name: 'Video', foreign_key: 'product_id', dependent: :destroy
- end
+module Spree
+ module ProductDecorator
+ def self.prepended(base)
+ base.has_many :videos, class_name: 'Video', foreign_key: 'product_id', dependent: :destroy
end
end
-end
-::Spree::Product.prepend MyStore::Spree::ProductDecorator if ::Spree::Product.included_modules.exclude?(MyStore::Spree::ProductDecorator)
+ Product.prepend(ProductDecorator)
+end
```
## Extending Controllers
-Adding a custom action to the [ProductsController](https://github.com/spree/spree/blob/master/frontend/app/controllers/spree/products_controller.rb): `app/controllers/my_store/spree/products_controller_decorator.rb`
+Adding a custom action to the [ProductsController](https://github.com/spree/spree/blob/master/frontend/app/controllers/spree/products_controller.rb): `app/controllers/spree/products_controller_decorator.rb`
```ruby
-module MyStore
- module Spree
- module ProductsControllerDecorator
- def some_action
- ...
- end
+module Spree
+ module ProductsControllerDecorator
+ def some_action
+ ...
end
end
-end
-::Spree::ProductsController.prepend MyStore::Spree::ProductsControllerDecorator if ::Spree::ProductsController.included_modules.exclude?(MyStore::Spree::ProductsControllerDecorator)
+ ProductsController.prepend(ProductsControllerDecorator)
+end
```
The exact same format can be used to redefine an existing method.
@@ -102,21 +98,19 @@ The exact same format can be used to redefine an existing method.
If you extend the Products controller with a new method, you may very well want to access product data in that method. You can do so by using the `:load_data before_action`.
```ruby
-module MyStore
- module Spree
- module ProductsControllerDecorator
- def self.prepended(base)
- base.before_action :load_data, only: :some_action
- end
-
- def some_action
- ...
- end
+module Spree
+ module ProductsControllerDecorator
+ def self.prepended(base)
+ base.before_action :load_data, only: :some_action
+ end
+
+ def some_action
+ ...
end
end
-end
-::Spree::ProductsController.prepend MyStore::Spree::ProductsControllerDecorator if ::Spree::ProductsController.included_modules.exclude?(MyStore::Spree::ProductsControllerDecorator)
+ ProductsController.prepend(ProductsControllerDecorator)
+end
```
`:load_data` will use `params[:id]` to lookup the product by its permalink.
diff --git a/docs/developer/customization/permissions.mdx b/docs/developer/customization/permissions.mdx
index 2bab1dd85f..37034a387f 100644
--- a/docs/developer/customization/permissions.mdx
+++ b/docs/developer/customization/permissions.mdx
@@ -24,17 +24,15 @@ For authorization Spree uses [CanCanCan](https://github.com/CanCanCommunity/canc
Let's assume you would like to add a new Role `customer_service` with some limited access to Admin Panel \(only Orders section\).
-Create a new file called `app/models/my_project/customer_service_ability.rb`
+Create a new file called `app/models/customer_service_ability.rb`
```ruby
-module MyProject
- class CustomerServiceAbility
- include CanCan::Ability
+class CustomerServiceAbility
+ include CanCan::Ability
- def initialize(user)
- if user.respond_to?(:has_spree_role?) && user.has_spree_role?('customer_service')
- can :manage, ::Spree::Order
- end
+ def initialize(user)
+ if user.respond_to?(:has_spree_role?) && user.has_spree_role?('customer_service')
+ can :manage, Spree::Order
end
end
end
@@ -42,20 +40,18 @@ end
Please familiarize yourself with [CanCanCan](https://github.com/CanCanCommunity/cancancan) syntax to understand `can/cannot` methods more.
-Now we need to inform Spree to use this ability, create another file `app/models/my_project/spree/ability_decorator.rb` with contents:
+Now we need to inform Spree to use this ability, create another file `app/models/spree/ability_decorator.rb` with contents:
```ruby
-module MyProject
- module Spree
- module AbilityDecorator
- def abilities_to_register
- [CustomerServiceAbility]
- end
+module Spree
+ module AbilityDecorator
+ def abilities_to_register
+ [CustomerServiceAbility]
end
end
-end
-::Spree::Ability.prepend(MyProject::Spree::AbilityDecorator)
+ Ability.prepend(AbilityDecorator)
+end
```
## Replacing all permissions
@@ -63,38 +59,36 @@ end
As we've mentioned earlier, Spree uses the main Ability class. You can change that to use your own custom Ability class via [Dependencies](dependencies) in Spree initializer \(`config/initializers/spree.rb`\), eg.
```ruby
-Spree::Dependencies.ability_class = 'MyProject::Ability'
+Spree::Dependencies.ability_class = 'CustomAbility'
```
-Now, let's define that new class in `app/models/my_project/ability.rb`
+Now, let's define that new class in `app/models/custom_ability.rb`
```ruby
-module MyProject
- class Ability < ::Spree::Ability
- def initialize(user)
- alias_cancan_delete_action
-
- user ||= Spree.user_class.new
-
- if user.respond_to?(:has_spree_role?) && user.has_spree_role?('admin')
- apply_admin_permissions(user)
- # add some more permissions here for the admin role
- else
- if user.respond_to?(:has_spree_role?) && user.has_spree_role?(:customer_service)
- apply_customer_service_permissions(user)
- end
-
- apply_user_permissions(user)
+class CustomAbility < Spree::Ability
+ def initialize(user)
+ alias_cancan_delete_action
+
+ user ||= Spree.user_class.new
+
+ if user.respond_to?(:has_spree_role?) && user.has_spree_role?('admin')
+ apply_admin_permissions(user)
+ # add some more permissions here for the admin role
+ else
+ if user.respond_to?(:has_spree_role?) && user.has_spree_role?(:customer_service)
+ apply_customer_service_permissions(user)
end
- protect_admin_role
+ apply_user_permissions(user)
end
- protected
+ protect_admin_role
+ end
- def apply_customer_service_permissions(user)
- can :manage, ::Spree::Order
- end
+ protected
+
+ def apply_customer_service_permissions(user)
+ can :manage, Spree::Order
end
end
```
@@ -102,4 +96,3 @@ end
After restarting the rails server you observe new permissions being recognized in the application.
Further permission changes should be automatically picked up in development and should not require application restarts.
-
diff --git a/docs/developer/security/index.mdx b/docs/developer/security/index.mdx
index 2db68f0fc5..28a7f64238 100644
--- a/docs/developer/security/index.mdx
+++ b/docs/developer/security/index.mdx
@@ -14,7 +14,7 @@ This is a list of all Spree versions currently being supported by the Spree team
| 4.3 | 14.09.2021 | 14.03.2023 |
| 4.2 | 23.02.2021 | 23.08.2022 |
-If you're using an older version [please upgrade](../upgrades/upgrades/). Have trouble upgrading? [Contact us for support](https://spreecommerce.org/contact/).
+If you're using an older version [please upgrade](../upgrades/). Have trouble upgrading? [Contact us for support](https://spreecommerce.org/contact/).
Or you can migrate once to [Spree as a Service](https://spreecommerce.org/spree-as-a-service/) and forget about upgrades altogether!
diff --git a/docs/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one.mdx b/docs/developer/upgrades/4.0-to-4.1.mdx
similarity index 83%
rename from docs/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one.mdx
rename to docs/developer/upgrades/4.0-to-4.1.mdx
index 12e630ea87..9bbcf36e86 100644
--- a/docs/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one.mdx
+++ b/docs/developer/upgrades/4.0-to-4.1.mdx
@@ -1,21 +1,19 @@
---
-title: Upgrading Spree 4.0 to 4.1
+title: 4.0 to 4.1
section: upgrades
order: 1
description: This guide covers upgrading a 4.0 Spree application to Spree 4.1.
---
-# 4.0 to 4.1
-
If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)
**If you're on an older version than 4.0 please follow previous upgrade guides and perform those upgrades incrementally**, eg.
-1. [upgrade 3.3 to 3.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-three-to-three-dot-four)
-2. [upgrade 3.4 to 3.5](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-four-to-three-dot-five)
-3. [upgrade 3.5 to 3.6](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-five-to-three-dot-six)
-4. [upgrade 3.6 to 3.7](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven)
-5. [upgrade 3.7 to 4.0](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh)
+1. [upgrade 3.3 to 3.4](/developer/upgrades/three-dot-three-to-three-dot-four)
+2. [upgrade 3.4 to 3.5](/developer/upgrades/three-dot-four-to-three-dot-five)
+3. [upgrade 3.5 to 3.6](/developer/upgrades/three-dot-five-to-three-dot-six)
+4. [upgrade 3.6 to 3.7](/developer/upgrades/three-dot-six-to-three-dot-seven)
+5. [upgrade 3.7 to 4.0](/developer/upgrades/three-dot-seven-to-four-dot-oh)
This is the safest and recommended method.
@@ -70,7 +68,7 @@ To replace your current frontend with the new Spree UI follow these steps:
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`
-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](../../customization/logic#extending-controllers)
+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:
@@ -89,7 +87,7 @@ If you wish to not move to the new Storefront UI it's still an option. Just proc
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.0'
+ gem 'spree_auth_devise', '~> 4.0'
```
2. Copy over all views from Spree 4.0
diff --git a/docs/developer/upgrades/upgrades/four-dot-one-to-four-dot-two.mdx b/docs/developer/upgrades/4.1-to-4.2.mdx
similarity index 93%
rename from docs/developer/upgrades/upgrades/four-dot-one-to-four-dot-two.mdx
rename to docs/developer/upgrades/4.1-to-4.2.mdx
index 94025dff66..6f6d3ee977 100644
--- a/docs/developer/upgrades/upgrades/four-dot-one-to-four-dot-two.mdx
+++ b/docs/developer/upgrades/4.1-to-4.2.mdx
@@ -1,18 +1,16 @@
---
-title: Upgrading Spree 4.1 to 4.2
+title: 4.1 to 4.2
section: upgrades
order: 0
description: This guide covers upgrading a 4.1 Spree application to Spree 4.2.
---
-# 4.1 to 4.2
-
If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)
**If you're on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally**, eg.
-1. [upgrade 3.7 to 4.0](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh)
-2. [upgrade 4.0 to 4.1](https://docs.spreecommerce.org/developer/upgrades/upgrades/four-dot-oh-to-four-dot-one)
+1. [upgrade 3.7 to 4.0](/developer/upgrades/three-dot-seven-to-four-dot-oh)
+2. [upgrade 4.0 to 4.1](/developer/upgrades/four-dot-oh-to-4.1)
This is the safest and recommended method.
@@ -22,7 +20,7 @@ This is the safest and recommended method.
gem 'spree', '~> 4.2'
gem 'spree_auth_devise', '~> 4.3'
gem 'spree_gateway', '~> 3.9'
-gem 'spree_i18n', '~> 5.0'
+gem 'spree_i18n', '~> 5'
```
## Remove SpreeMultiCurrency \(optional\)
@@ -100,7 +98,7 @@ bundle update spree_related_products
Please follow [this guide to migrate your custom serializers](https://github.com/jsonapi-serializer/jsonapi-serializer#migrating-from-netflixfast_jsonapi).
-### Migrate select2 3.5 to 4.x
+### Migrate select2 3.5 to 4
Only if you've added new Admin Panel pages with Select2 dropdown - [this guide will help](https://select2.org/upgrading/migrating-from-35)
diff --git a/docs/developer/upgrades/upgrades/fout-dot-two-to-four-dot-three.mdx b/docs/developer/upgrades/4.2-to-4.3.mdx
similarity index 96%
rename from docs/developer/upgrades/upgrades/fout-dot-two-to-four-dot-three.mdx
rename to docs/developer/upgrades/4.2-to-4.3.mdx
index 8c275f4556..28fb89868f 100644
--- a/docs/developer/upgrades/upgrades/fout-dot-two-to-four-dot-three.mdx
+++ b/docs/developer/upgrades/4.2-to-4.3.mdx
@@ -1,20 +1,18 @@
---
-title: Upgrading Spree 4.2 to 4.3
+title: 4.2 to 4.3
section: upgrades
order: 0
hidden: true
description: This guide covers upgrading a 4.2 Spree application to Spree 4.3.
---
-# 4.2 to 4.3
-
If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)
**If you're on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally**, eg.
1. [upgrade 3.7 to 4.0](three-dot-seven-to-four-dot-oh)
-2. [upgrade 4.0 to 4.1](four-dot-oh-to-four-dot-one)
-3. [upgrade 4.1 to 4.2](four-dot-one-to-four-dot-two)
+2. [upgrade 4.0 to 4.1](four-dot-oh-to-4.1)
+3. [upgrade 4.1 to 4.2](4.1-to-4.2)
This is the safest and recommended method.
diff --git a/docs/developer/upgrades/upgrades/4.3-to-4.4.mdx b/docs/developer/upgrades/4.3-to-4.4.mdx
similarity index 91%
rename from docs/developer/upgrades/upgrades/4.3-to-4.4.mdx
rename to docs/developer/upgrades/4.3-to-4.4.mdx
index 51ab8bc22f..67b3bcbefa 100644
--- a/docs/developer/upgrades/upgrades/4.3-to-4.4.mdx
+++ b/docs/developer/upgrades/4.3-to-4.4.mdx
@@ -1,23 +1,22 @@
---
+title: 4.3 to 4.4
description: This guide covers upgrading a 4.3 Spree application to Spree 4.4.
---
-# 4.3 to 4.4
-
If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)
-**If you're on an older version than 4.3 please follow previous upgrade guides and perform those upgrades incrementally**, eg.
-
-1. [upgrade 4.0 to 4.1](four-dot-oh-to-four-dot-one)
-2. [upgrade 4.1 to 4.2](four-dot-one-to-four-dot-two)
-3. [upgrade 4.2 to 4.3](fout-dot-two-to-four-dot-three)
+<Note>
+If you're on an older version than 4.3 please follow previous upgrade guides and perform those upgrades incrementally, eg.
-This is the safest and recommended method.
+1. [upgrade 4.0 to 4.1](four-dot-oh-to-4.1)
+2. [upgrade 4.1 to 4.2](4.1-to-4.2)
+3. [upgrade 4.2 to 4.3](4.2-to-4.3)
+</Note>
## Update Gemfile
```ruby
-gem 'spree', '>= 4.4.0.rc1'
+gem 'spree', '~> 4.4'
```
## Remove gems merged into Spree Core
diff --git a/docs/developer/upgrades/upgrades/4.4-to-4.5.mdx b/docs/developer/upgrades/4.4-to-4.5.mdx
similarity index 76%
rename from docs/developer/upgrades/upgrades/4.4-to-4.5.mdx
rename to docs/developer/upgrades/4.4-to-4.5.mdx
index 72a52e6658..dd95fc57e9 100644
--- a/docs/developer/upgrades/upgrades/4.4-to-4.5.mdx
+++ b/docs/developer/upgrades/4.4-to-4.5.mdx
@@ -1,16 +1,15 @@
---
+title: 4.4 to 4.5
description: This guide covers upgrading a 4.4 Spree application to Spree 4.5.
---
-# 4.4 to 4.5
+<Note>
+If you're on an older version than 4.4 please follow previous upgrade guides and perform those upgrades incrementally, eg.
-**If you're on an older version than 4.4 please follow previous upgrade guides and perform those upgrades incrementally**, eg.
-
-1. [upgrade 4.1 to 4.2](four-dot-one-to-four-dot-two)
-2. [upgrade 4.2 to 4.3](fout-dot-two-to-four-dot-three)
-3. [upgrade 4.3 to 4.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/4.3-to-4.4)
-
-This is the safest and recommended method.
+1. [upgrade 4.1 to 4.2](4.1-to-4.2)
+2. [upgrade 4.2 to 4.3](4.2-to-4.3)
+3. [upgrade 4.3 to 4.4](4.3-to-4.4)
+</Note>
## Upgrade Rails
@@ -53,25 +52,25 @@ end
## Update Gemfile
-```
-gem 'spree', '>= 4.5.0'
+```ruby
+gem 'spree', '> 4.5'
```
Update all other spree gems used in your application to 4.5.0 or version compatible with 4.5:
-```
-gem 'spree_sample', '~> 4.5.0'
-gem 'spree_emails', '~> 4.5.0'
-gem 'spree_frontend', '>= 4.5.0'
-gem 'spree_backend', '>= 4.5.0'
+```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.0'
+gem 'spree_auth_devise', '>= 4.5'
gem 'spree_i18n', '~> 5.1'
```
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:
-```
+```ruby
gem 'spree_api_v1'
```
@@ -95,9 +94,9 @@ bin/rails db:migrate
## Run Additional Commands for Frontend
-If using [Spree Frontend](https://github.com/spree/spree\_legacy\_frontend), run the following additional commands to get everything set up correctly with the updated gems:
+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
@@ -109,7 +108,3 @@ 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).
-
-## More info
-
-If you have any questions, issues or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/).
diff --git a/docs/developer/upgrades/upgrades/4.5-to-4.6.mdx b/docs/developer/upgrades/4.5-to-4.6.mdx
similarity index 70%
rename from docs/developer/upgrades/upgrades/4.5-to-4.6.mdx
rename to docs/developer/upgrades/4.5-to-4.6.mdx
index c1e4b76802..9caa59e600 100644
--- a/docs/developer/upgrades/upgrades/4.5-to-4.6.mdx
+++ b/docs/developer/upgrades/4.5-to-4.6.mdx
@@ -1,32 +1,31 @@
---
+title: 4.5 to 4.6
description: This guide covers upgrading a 4.5 Spree application to Spree 4.6.
---
-# 4.5 to 4.6
+<Note>
+If you're on an older version than 4.5 please follow previous upgrade guides and perform those upgrades incrementally, e.g.
-**If you're on an older version than 4.5 please follow previous upgrade guides and perform those upgrades incrementally, e.g.**
-
-1. [upgrade 4.2 to 4.3](fout-dot-two-to-four-dot-three)
-2. [upgrade 4.3 to 4.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/4.3-to-4.4)
+1. [upgrade 4.2 to 4.3](4.2-to-4.3)
+2. [upgrade 4.3 to 4.4](4.3-to-4.4)
3. [upgrade 4.4 to 4.5](4.4-to-4.5)
-
-This is the safest and recommended method.
+</Note>
## Update Gemfile
-```
-gem 'spree', '>= 4.6.0'
+```ruby
+gem 'spree', '>= 4.6'
```
Update all other spree gems used in your application to 4.6.0 or version compatible with 4.6:
-```
-gem 'spree_sample', '~> 4.6.0'
-gem 'spree_emails', '~> 4.6.0'
-gem 'spree_frontend', '>= 4.6.0'
-gem 'spree_backend', '>= 4.6.0'
+```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.0'
+gem 'spree_auth_devise', '>= 4.5'
gem 'spree_i18n', '~> 5.1'
```
@@ -62,7 +61,7 @@ If you're using raw SQL queries (either in the application code, or running in e
## Run Additional Commands for Frontend
-If using [Spree Frontend](https://github.com/spree/spree\_legacy\_frontend), run the following additional commands to get everything set up correctly with the updated gems:
+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:
```
bin/rails javascript:install:esbuild
@@ -77,6 +76,3 @@ And that's a wrap! :tada:
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).
-## More info
-
-If you have any questions, issues or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/).
diff --git a/docs/developer/upgrades/4.6-to-4.7.mdx b/docs/developer/upgrades/4.6-to-4.7.mdx
new file mode 100644
index 0000000000..ad39d894e2
--- /dev/null
+++ b/docs/developer/upgrades/4.6-to-4.7.mdx
@@ -0,0 +1,65 @@
+---
+title: 4.6 to 4.7
+description: This guide covers upgrading a 4.6 Spree application to Spree 4.7.
+---
+
+<Note>
+If you're on an older version than 4.6 please follow previous upgrade guides and perform those upgrades incrementally
+
+1. [upgrade 4.3 to 4.4](4.3-to-4.4)
+2. [upgrade 4.4 to 4.5](4.4-to-4.5)
+3. [upgrade 4.5 to 4.6](4.5-to-4.6)
+</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">
+
+ ```bash
+ bundle update
+ ```
+ </Accordion>
+
+ <Accordion title="3. 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)">
+
+ 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:
+
+ ```bash
+ bin/rails g spree:frontend:install
+ ```
+
+ </Accordion>
+</AccordionGroup>
+
+## Read the release notes
+
+For information about changes contained within this release, please read the [Spree 4.7.0 Release Notes.](https://github.com/spree/spree/releases/tag/v4.7.0)
diff --git a/docs/developer/upgrades/upgrades/one-dot-oh-to-one-dot-one.mdx b/docs/developer/upgrades/one-dot-oh-to-one-dot-one.mdx
similarity index 85%
rename from docs/developer/upgrades/upgrades/one-dot-oh-to-one-dot-one.mdx
rename to docs/developer/upgrades/one-dot-oh-to-one-dot-one.mdx
index 7cd67c74d7..f0575f9ec0 100644
--- a/docs/developer/upgrades/upgrades/one-dot-oh-to-one-dot-one.mdx
+++ b/docs/developer/upgrades/one-dot-oh-to-one-dot-one.mdx
@@ -1,18 +1,18 @@
---
-title: Upgrading Spree from 1.0.x to 1.1.x
+title: 1.0 to 1.1
section: upgrades
hidden: true
order: 16
-description: 'This guide covers upgrading a 1.0.x Spree store, to a 1.1.x store.'
+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.x store with no extensions.
+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.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-1-stable branch.
+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
diff --git a/docs/developer/upgrades/upgrades/one-dot-one-to-one-dot-two.mdx b/docs/developer/upgrades/one-dot-one-to-one-dot-two.mdx
similarity index 85%
rename from docs/developer/upgrades/upgrades/one-dot-one-to-one-dot-two.mdx
rename to docs/developer/upgrades/one-dot-one-to-one-dot-two.mdx
index 5309c9e500..616d9dd668 100644
--- a/docs/developer/upgrades/upgrades/one-dot-one-to-one-dot-two.mdx
+++ b/docs/developer/upgrades/one-dot-one-to-one-dot-two.mdx
@@ -1,18 +1,18 @@
---
-title: Upgrading Spree from 1.1.x to 1.2.x
+title: 1.1 to 1.2
section: upgrades
order: 15
hidden: true
-description: 'This guide covers upgrading a 1.1.x Spree store, to a 1.2.x store.'
+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.x store with no extensions.
+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.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-2-stable branch.
+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
diff --git a/docs/developer/upgrades/upgrades/one-dot-three-to-two-dot-oh.mdx b/docs/developer/upgrades/one-dot-three-to-two-dot-oh.mdx
similarity index 86%
rename from docs/developer/upgrades/upgrades/one-dot-three-to-two-dot-oh.mdx
rename to docs/developer/upgrades/one-dot-three-to-two-dot-oh.mdx
index 9dbe22511b..8db6a9ff70 100644
--- a/docs/developer/upgrades/upgrades/one-dot-three-to-two-dot-oh.mdx
+++ b/docs/developer/upgrades/one-dot-three-to-two-dot-oh.mdx
@@ -1,18 +1,18 @@
---
-title: Upgrading Spree from 1.3.x to 2.0.x
+title: 1.3 to 2.0
section: upgrades
order: 13
hidden: true
-description: 'This guide covers upgrading a 1.3.x Spree store, to a 2.0.x store.'
+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.x store with no extensions.
+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.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-0-stable branch.
+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.
@@ -30,7 +30,7 @@ Run `bundle update spree`.
This version of Spree bumps the dependency for jquery-rails to this:
```ruby
-gem 'jquery-rails', '3.0.0'```
+gem 'jquery-rails', '3.0'```
Ensure that you have a line such as this in your Gemfile to allow that dependency.
diff --git a/docs/developer/upgrades/upgrades/one-dot-two-to-one-dot-three.mdx b/docs/developer/upgrades/one-dot-two-to-one-dot-three.mdx
similarity index 89%
rename from docs/developer/upgrades/upgrades/one-dot-two-to-one-dot-three.mdx
rename to docs/developer/upgrades/one-dot-two-to-one-dot-three.mdx
index 67e8c2ff41..4950803398 100644
--- a/docs/developer/upgrades/upgrades/one-dot-two-to-one-dot-three.mdx
+++ b/docs/developer/upgrades/one-dot-two-to-one-dot-three.mdx
@@ -1,18 +1,18 @@
---
-title: Upgrading Spree from 1.2.x to 1.3.x
+title: 1.2 to 1.3
section: upgrades
order: 14
hidden: true
-description: 'This guide covers upgrading a 1.2.x Spree store, to a 1.3.x store.'
+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.x store with no extensions.
+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.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-3-stable branch.
+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
@@ -28,7 +28,7 @@ Run `bundle update spree`.
This version of Spree bumps the dependency for jquery-rails to this:
```ruby
-gem 'jquery-rails', '2.2.0'```
+gem 'jquery-rails', '2.2'```
Ensure that you have a line such as this in your Gemfile to allow that dependency.
diff --git a/docs/developer/upgrades/index.mdx b/docs/developer/upgrades/quickstart.mdx
similarity index 94%
rename from docs/developer/upgrades/index.mdx
rename to docs/developer/upgrades/quickstart.mdx
index ca23c304e1..7f74b69d23 100644
--- a/docs/developer/upgrades/index.mdx
+++ b/docs/developer/upgrades/quickstart.mdx
@@ -1,13 +1,8 @@
---
-title: Upgrading Spree
-section: upgrades
-order: 0
+title: Quickstart
+description: Learn how to upgrade your Spree application
---
-# How to perform upgrades
-
-## Overview
-
Keeping your Spree installation up-to-date is essential to keep it safe and secure. Each Spree version brings new features, enhancements and bug fixes so it's greatly beneficial for you and your clients to upgrade frequently.
The upgrade process is fairly easy and well described. Of course, it all boils down to the level of customizations and the way you've customized your Spree applications.
diff --git a/docs/developer/upgrades/upgrades/three-dot-five-to-three-dot-six.mdx b/docs/developer/upgrades/three-dot-five-to-three-dot-six.mdx
similarity index 97%
rename from docs/developer/upgrades/upgrades/three-dot-five-to-three-dot-six.mdx
rename to docs/developer/upgrades/three-dot-five-to-three-dot-six.mdx
index d7e6caa214..87ca0db5ed 100644
--- a/docs/developer/upgrades/upgrades/three-dot-five-to-three-dot-six.mdx
+++ b/docs/developer/upgrades/three-dot-five-to-three-dot-six.mdx
@@ -1,5 +1,5 @@
---
-title: Upgrading Spree from 3.5 to 3.6
+title: 3.5 to 3.6
section: upgrades
order: 4
description: 'This guide covers upgrading a 3.5 Spree application, to a 3.6 application.'
diff --git a/docs/developer/upgrades/upgrades/three-dot-four-to-three-dot-five.mdx b/docs/developer/upgrades/three-dot-four-to-three-dot-five.mdx
similarity index 95%
rename from docs/developer/upgrades/upgrades/three-dot-four-to-three-dot-five.mdx
rename to docs/developer/upgrades/three-dot-four-to-three-dot-five.mdx
index e857fb7e16..087ba71c72 100644
--- a/docs/developer/upgrades/upgrades/three-dot-four-to-three-dot-five.mdx
+++ b/docs/developer/upgrades/three-dot-four-to-three-dot-five.mdx
@@ -1,5 +1,5 @@
---
-title: Upgrading Spree from 3.4 to 3.5
+title: 3.4 to 3.5
section: upgrades
order: 5
description: 'This guide covers upgrading a 3.4 Spree store, to a 3.5 store.'
@@ -10,7 +10,7 @@ description: 'This guide covers upgrading a 3.4 Spree store, to a 3.5 store.'
### Update Gemfile
```ruby
-gem 'spree', '~> 3.5.0'
+gem 'spree', '~> 3.5'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
```
diff --git a/docs/developer/upgrades/upgrades/three-dot-oh-to-three-dot-one.mdx b/docs/developer/upgrades/three-dot-oh-to-three-dot-one.mdx
similarity index 89%
rename from docs/developer/upgrades/upgrades/three-dot-oh-to-three-dot-one.mdx
rename to docs/developer/upgrades/three-dot-oh-to-three-dot-one.mdx
index 7c759cb3da..b6e7edad80 100644
--- a/docs/developer/upgrades/upgrades/three-dot-oh-to-three-dot-one.mdx
+++ b/docs/developer/upgrades/three-dot-oh-to-three-dot-one.mdx
@@ -1,8 +1,8 @@
---
-title: Upgrading Spree from 3.0 to 3.1
+title: 3.0 to 3.1
section: upgrades
order: 9
-description: 'This guide covers upgrading a 3.0.x Spree store, to a 3.1.x store'
+description: 'This guide covers upgrading a 3.0 Spree store, to a 3.1 store'
---
# 3.0 to 3.1
@@ -17,7 +17,7 @@ gem 'rails', '~> 4.2.6'
## Upgrade Spree
-For best results, use the spree gem in version 3.1.x:
+For best results, use the spree gem in version 3.1:
```ruby
gem 'spree', '~> 3.1.0.rc1'
@@ -29,7 +29,7 @@ Run `bundle update spree`.
Copy over the migrations from Spree \(and any other engine\) and run them using these commands:
-```text
+```bash
rake railties:install:migrations
rake db:migrate
```
@@ -45,7 +45,7 @@ gem 'spree_gateway', '~> 3.1.0.rc1'
For Spree Auth Devise run installer:
-```text
+```bash
rails g spree:auth:install
```
diff --git a/docs/developer/upgrades/upgrades/three-dot-one-to-three-dot-two.mdx b/docs/developer/upgrades/three-dot-one-to-three-dot-two.mdx
similarity index 86%
rename from docs/developer/upgrades/upgrades/three-dot-one-to-three-dot-two.mdx
rename to docs/developer/upgrades/three-dot-one-to-three-dot-two.mdx
index 34bc3d8e41..c72a207866 100644
--- a/docs/developer/upgrades/upgrades/three-dot-one-to-three-dot-two.mdx
+++ b/docs/developer/upgrades/three-dot-one-to-three-dot-two.mdx
@@ -1,8 +1,8 @@
---
-title: Upgrading Spree from 3.1 to 3.2
+title: 3.1 to 3.2
section: upgrades
order: 8
-description: 'This guide covers upgrading a 3.1.x Spree store, to a 3.2.x store.'
+description: 'This guide covers upgrading a 3.1 Spree store, to a 3.2 store.'
---
# 3.1 to 3.2
@@ -14,9 +14,9 @@ Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgra
### Update Gemfile
```ruby
-gem 'spree', '~> 3.2.0'
-gem 'spree_auth_devise', '~> 3.2.0'
-gem 'spree_gateway', '~> 3.2.0'
+gem 'spree', '~> 3.2'
+gem 'spree_auth_devise', '~> 3.2'
+gem 'spree_gateway', '~> 3.2'
```
### Update your extensions
diff --git a/docs/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh.mdx b/docs/developer/upgrades/three-dot-seven-to-four-dot-oh.mdx
similarity index 89%
rename from docs/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh.mdx
rename to docs/developer/upgrades/three-dot-seven-to-four-dot-oh.mdx
index c330b38394..0ccece001c 100644
--- a/docs/developer/upgrades/upgrades/three-dot-seven-to-four-dot-oh.mdx
+++ b/docs/developer/upgrades/three-dot-seven-to-four-dot-oh.mdx
@@ -1,21 +1,19 @@
---
-title: Upgrading Spree 3.7 to 4.0
+title: 3.7 to 4.0
section: upgrades
order: 2
description: This guide covers upgrading a 3.7 Spree application to Spree 4.0.
---
-# 3.7 to 4.0
-
If you have any questions or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/)
**If you're on an older version than 3.7 please follow previous upgrade guides and perform those upgrades incrementally**, eg.
-1. [upgrade 3.2 to 3.3](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-two-to-three-dot-three)
-2. [upgrade 3.3 to 3.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-three-to-three-dot-four)
-3. [upgrade 3.4 to 3.5](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-four-to-three-dot-five)
-4. [upgrade 3.5 to 3.6](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-five-to-three-dot-six)
-5. [upgrade 3.6 to 3.7](https://docs.spreecommerce.org/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven)
+1. [upgrade 3.2 to 3.3](/developer/upgrades/three-dot-two-to-three-dot-three)
+2. [upgrade 3.3 to 3.4](/developer/upgrades/three-dot-three-to-three-dot-four)
+3. [upgrade 3.4 to 3.5](/developer/upgrades/three-dot-four-to-three-dot-five)
+4. [upgrade 3.5 to 3.6](/developer/upgrades/three-dot-five-to-three-dot-six)
+5. [upgrade 3.6 to 3.7](/developer/upgrades/three-dot-six-to-three-dot-seven)
This is the safest and recommended method.
@@ -195,7 +193,7 @@ end
Spree::Base.singleton_class.send :prepend, Spree::BaseDecorator
```
-Please also consider other options for [Logic Customization](../../customization/logic).
+Please also consider other options for [Logic Customization](/developer/customization).
We recommend also reading through [Ruby modules: Include vs Prepend vs Extend](https://medium.com/@leo_hetsch/ruby-modules-include-vs-prepend-vs-extend-f09837a5b073)
@@ -221,8 +219,8 @@ As we know this is a big portion of work you can still use Bootstrap 3 for your
## Update Gemfile
```ruby
-gem 'spree', '~> 4.0'
-gem 'spree_auth_devise', '~> 4.0'
+gem 'spree', '~> 4'
+gem 'spree_auth_devise', '~> 4'
gem 'spree_gateway', '~> 3.6'
```
diff --git a/docs/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven.mdx b/docs/developer/upgrades/three-dot-six-to-three-dot-seven.mdx
similarity index 96%
rename from docs/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven.mdx
rename to docs/developer/upgrades/three-dot-six-to-three-dot-seven.mdx
index 8b72614bc1..24a9b80f3c 100644
--- a/docs/developer/upgrades/upgrades/three-dot-six-to-three-dot-seven.mdx
+++ b/docs/developer/upgrades/three-dot-six-to-three-dot-seven.mdx
@@ -1,5 +1,5 @@
---
-title: Upgrading Spree from 3.6 to 3.7
+title: 3.6 to 3.7
section: upgrades
order: 3
description: 'This guide covers upgrading a 3.6 Spree application, to version 3.7.'
@@ -10,7 +10,7 @@ description: 'This guide covers upgrading a 3.6 Spree application, to version 3.
## Update Gemfile
```ruby
-gem 'spree', '~> 3.7.0'
+gem 'spree', '~> 3.7'
gem 'spree_auth_devise', '~> 3.5'
gem 'spree_gateway', '~> 3.4'
```
diff --git a/docs/developer/upgrades/upgrades/three-dot-three-to-three-dot-four.mdx b/docs/developer/upgrades/three-dot-three-to-three-dot-four.mdx
similarity index 94%
rename from docs/developer/upgrades/upgrades/three-dot-three-to-three-dot-four.mdx
rename to docs/developer/upgrades/three-dot-three-to-three-dot-four.mdx
index 770497a213..a578afd81a 100644
--- a/docs/developer/upgrades/upgrades/three-dot-three-to-three-dot-four.mdx
+++ b/docs/developer/upgrades/three-dot-three-to-three-dot-four.mdx
@@ -1,5 +1,5 @@
---
-title: Upgrading Spree from 3.3 to 3.4
+title: 3.3 to 3.4
section: upgrades
order: 6
description: 'This guide covers upgrading a 3.3 Spree store, to a 3.4 store.'
@@ -10,7 +10,7 @@ description: 'This guide covers upgrading a 3.3 Spree store, to a 3.4 store.'
### Update Gemfile
```ruby
-gem 'spree', '~> 3.4.0'
+gem 'spree', '~> 3.4'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
```
diff --git a/docs/developer/upgrades/upgrades/three-dot-two-to-three-dot-three.mdx b/docs/developer/upgrades/three-dot-two-to-three-dot-three.mdx
similarity index 93%
rename from docs/developer/upgrades/upgrades/three-dot-two-to-three-dot-three.mdx
rename to docs/developer/upgrades/three-dot-two-to-three-dot-three.mdx
index df3b45d794..4d5b2138b5 100644
--- a/docs/developer/upgrades/upgrades/three-dot-two-to-three-dot-three.mdx
+++ b/docs/developer/upgrades/three-dot-two-to-three-dot-three.mdx
@@ -1,8 +1,8 @@
---
-title: Upgrading Spree from 3.2 to 3.3
+title: 3.2 to 3.3
section: upgrades
order: 7
-description: 'This guide covers upgrading a 3.2.x Spree store, to a 3.3.x store.'
+description: 'This guide covers upgrading a 3.2 Spree store, to a 3.3 store.'
---
# 3.2 to 3.3
@@ -14,7 +14,7 @@ Please follow the [official Rails guide](http://edgeguides.rubyonrails.org/upgra
### Update Gemfile
```ruby
-gem 'spree', '~> 3.3.0'
+gem 'spree', '~> 3.3'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
```
@@ -70,13 +70,13 @@ end
Spree 3.3 comes with paperclip 5.1 support so if you're using Amazon S3 storage you need to change in your Gemfile, from:
```ruby
-gem 'aws-sdk', '< 2.0'
+gem 'aws-sdk', '< 2'
```
to:
```ruby
-gem 'aws-sdk', '>= 2.0'
+gem 'aws-sdk', '>= 2'
```
and run `bundle update aws-sdk`
diff --git a/docs/developer/upgrades/upgrades/two-dot-oh-to-two-dot-one.mdx b/docs/developer/upgrades/two-dot-oh-to-two-dot-one.mdx
similarity index 81%
rename from docs/developer/upgrades/upgrades/two-dot-oh-to-two-dot-one.mdx
rename to docs/developer/upgrades/two-dot-oh-to-two-dot-one.mdx
index ae730d0827..074dadff4a 100644
--- a/docs/developer/upgrades/upgrades/two-dot-oh-to-two-dot-one.mdx
+++ b/docs/developer/upgrades/two-dot-oh-to-two-dot-one.mdx
@@ -1,18 +1,18 @@
---
-title: Upgrading Spree from 2.0.x to 2.1.x
+title: 2.0 to 2.1
section: upgrades
order: 12
hidden: true
-description: 'This guide covers upgrading a 2.0.x Spree store, to a 2.1.x store.'
+description: 'This guide covers upgrading a 2.0 Spree store, to a 2.1 store.'
---
# 2.0 to 2.1
## Overview
-This guide has been written from the perspective of a blank Spree 2.0.x store with no extensions.
+This guide has been written from the perspective of a blank Spree 2.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 2.1.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-1-stable branch.
+If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.1 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-1-stable branch.
This is the first Spree release that supports Rails 4 exclusively. Spree releases after this point will continue to support Rails 4 only.
@@ -23,7 +23,7 @@ For this Spree release, you will need to upgrade your Rails version to at least
It is recommended to read through the [Upgrading Ruby on Rails guide](http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-%20from-rails-3-2-to-rails-4-0) to learn what needs to be done for your application to migrate to Rails 4.
```ruby
-gem 'rails', '~> 4.0.0'```
+gem 'rails', '~> 4.0'```
## Upgrade Spree
diff --git a/docs/developer/upgrades/upgrades/two-dot-one-to-two-dot-two.mdx b/docs/developer/upgrades/two-dot-one-to-two-dot-two.mdx
similarity index 85%
rename from docs/developer/upgrades/upgrades/two-dot-one-to-two-dot-two.mdx
rename to docs/developer/upgrades/two-dot-one-to-two-dot-two.mdx
index 1dc41d376e..0d9f82791d 100644
--- a/docs/developer/upgrades/upgrades/two-dot-one-to-two-dot-two.mdx
+++ b/docs/developer/upgrades/two-dot-one-to-two-dot-two.mdx
@@ -1,18 +1,18 @@
---
-title: Upgrading Spree from 2.1.x to 2.2.x
+title: 2.1 to 2.2
section: upgrades
order: 11
hidden: true
-description: 'This guide covers upgrading a 2.1.x Spree store, to a 2.2.x store.'
+description: 'This guide covers upgrading a 2.1 Spree store, to a 2.2 store.'
---
# 2.1 to 2.2
## Overview
-This guide has been written from the perspective of a blank Spree 2.1.x store with no extensions.
+This guide has been written from the perspective of a blank Spree 2.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 2.2.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-2-stable branch.
+If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.2 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-2-stable branch.
## Upgrade Rails
diff --git a/docs/developer/upgrades/upgrades/two-dot-three-to-two-dot-four.mdx b/docs/developer/upgrades/two-dot-three-to-two-dot-four.mdx
similarity index 78%
rename from docs/developer/upgrades/upgrades/two-dot-three-to-two-dot-four.mdx
rename to docs/developer/upgrades/two-dot-three-to-two-dot-four.mdx
index 6651ee1449..0b30998c05 100644
--- a/docs/developer/upgrades/upgrades/two-dot-three-to-two-dot-four.mdx
+++ b/docs/developer/upgrades/two-dot-three-to-two-dot-four.mdx
@@ -1,16 +1,16 @@
---
-title: Upgrading Spree from 2.3.x to 2.4.x
+title: 2.3 to 2.4
section: upgrades
hidden: true
order: 9
-description: 'This guide covers upgrading a 2.3.x Spree store, to a 2.4.x store.'
+description: 'This guide covers upgrading a 2.3 Spree store, to a 2.4 store.'
---
# 2.3 to 2.4
-This guide has been written from the perspective of a blank Spree 2.3.x store with no extensions.
+This guide has been written from the perspective of a blank Spree 2.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.4.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-4-stable branch.
+If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.4 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-4-stable branch.
## Upgrade Rails
diff --git a/docs/developer/upgrades/upgrades/two-dot-two-to-two-dot-three.mdx b/docs/developer/upgrades/two-dot-two-to-two-dot-three.mdx
similarity index 79%
rename from docs/developer/upgrades/upgrades/two-dot-two-to-two-dot-three.mdx
rename to docs/developer/upgrades/two-dot-two-to-two-dot-three.mdx
index 248fd198f5..8ceace3671 100644
--- a/docs/developer/upgrades/upgrades/two-dot-two-to-two-dot-three.mdx
+++ b/docs/developer/upgrades/two-dot-two-to-two-dot-three.mdx
@@ -1,18 +1,18 @@
---
-title: Upgrading Spree from 2.2.x to 2.3.x
+title: 2.2 to 2.3
section: upgrades
hidden: true
order: 10
-description: 'This guide covers upgrading a 2.2.x Spree store, to a 2.3.x store.'
+description: 'This guide covers upgrading a 2.2 Spree store, to a 2.3 store.'
---
# 2.2 to 2.3
## Overview
-This guide has been written from the perspective of a blank Spree 2.2.x store with no extensions.
+This guide has been written from the perspective of a blank Spree 2.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 2.3.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-3-stable branch.
+If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.3 store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-3-stable branch.
This is the first Spree release that supports Rails 4.1.
diff --git a/docs/developer/upgrades/upgrades/4.6-to-4.7.mdx b/docs/developer/upgrades/upgrades/4.6-to-4.7.mdx
deleted file mode 100644
index fd01cfc5d6..0000000000
--- a/docs/developer/upgrades/upgrades/4.6-to-4.7.mdx
+++ /dev/null
@@ -1,84 +0,0 @@
----
-description: This guide covers upgrading a 4.6 Spree application to Spree 4.7.
----
-
-# 4.6 to 4.7
-
-**If you're on an older version than 4.6 please follow previous upgrade guides and perform those upgrades incrementally, e.g.**
-
-1. [upgrade 4.3 to 4.4](https://docs.spreecommerce.org/developer/upgrades/upgrades/4.3-to-4.4)
-2. [upgrade 4.4 to 4.5](4.4-to-4.5)
-3. [upgrade 4.5 to 4.6](4.5-to-4.6)
-
-This is the safest and recommended method.
-
-## Update Gemfile
-
-```ruby
-gem 'spree', '~> 4.7.0'
-```
-
-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.0'
-gem 'spree_emails', '~> 4.7.0'
-gem 'spree_backend', '~> 4.7.0'
-gem 'spree_frontend', '~> 4.7.0'
-gem 'spree_gateway', '~> 3.10.0'
-gem 'spree_auth_devise', '~> 4.6.0'
-gem 'spree_i18n', '~> 5.3.0'
-```
-
-<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>
-
-## (Optional) Upgrade to Rails 7.1
-
-Spree 4.7 brings support for Rails 7.1 - to receive security patches we recommend upgrading Rails version to the latest one.
-
-```ruby
-gem 'rails', '~> 7.1.0'
-```
-
-After upgrading to Rails 7.1, you may need to update your code to be compatible with the new release of Rails. Follow the official [Rails 7.1 Release Notes](https://edgeguides.rubyonrails.org/7\_1\_release\_notes.html) for more information on new features introduced in that release as well as on breaking changes.
-
-## Update gems
-
-```bash
-bundle update
-```
-
-## Install missing migrations
-
-```bash
-bin/rake railties:install:migrations
-```
-
-## Run migrations
-
-```bash
-bin/rails db:migrate
-```
-
-## Run Additional Commands for Frontend
-
-If using [Spree Frontend](https://github.com/spree/spree\_legacy\_frontend), run the following additional commands to get everything set up correctly with the updated gems:
-
-```
-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.7.0 Release Notes.](https://github.com/spree/spree/releases/tag/v4.7.0)
-
-## More info
-
-If you have any questions, issues or suggestions feel free to reach out through [Spree slack channels](http://slack.spreecommerce.org/).
diff --git a/docs/mint.json b/docs/mint.json
index 134fde27e3..b556763134 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -117,6 +117,25 @@
]
},
+ {
+ "group": "Upgrading",
+ "pages": [
+ "developer/upgrades/quickstart",
+ {
+ "group": "Upgrade Guides",
+ "pages": [
+ "developer/upgrades/4.6-to-4.7",
+ "developer/upgrades/4.5-to-4.6",
+ "developer/upgrades/4.4-to-4.5",
+ "developer/upgrades/4.3-to-4.4",
+ "developer/upgrades/4.2-to-4.3",
+ "developer/upgrades/4.1-to-4.2",
+ "developer/upgrades/4.0-to-4.1"
+ ]
+ }
+ ]
+ },
+
{
"group": "API basics",
"pages": [