If you’re on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally**, eg.
Update gems
Run the following command to update your gems to 4.2:Remove SpreeMultiCurrency optional
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.-
Remove
spree_multi_currencyfrom yourGemfile -
Remove these preferences from your Spree initializer
config/initializers/spree.rb:allow_currency_changeshow_currency_selectorsupported_currencies
-
Remove
//= require spree/frontend/spree_multi_currencyfromvendor/assets/javascripts/spree/frontend/all.js -
Remove
//= require spree/backend/spree_multi_currencyfromvendor/assets/javascripts/spree/backend/all.js
Optional Remove SpreeI18n config
All international configuration is now kept on theStore model in the database rather than in initializer files.
If you used spree_i18n gem before please remove any SpreeI18n::Configreferences from your config/initializers/spree.rb file.
Optional Add deface gem
If you used Deface overrides you will need to include deface in your Gemfile as it was removed from Spree / Spree Auth Devise / Spree Gateway dependencies.
Fix RMA migration
Please find aadd_stock_location_to_rma migration in your db/migrate directory and change:
Install missing migrations
Run migrations
Other things to remember
Replace fast_json with jsonapi-serializer
Please follow this guide to migrate your custom serializers.
Migrate select2 3.5 to 4
Only if you’ve added new Admin Panel pages with Select2 dropdown - this guide will helpMake sure you’ve got up to date Spree templates Storefront
If you’re using Spree default Storefrontspree_frontend gem make sure to update your templates, especially:
- app/views/spree/shared/_head.html.erb
- app/views/spree/shared/_locale_and_currency.html.erb
- app/views/spree/shared/_link_to_account.html.erb
- app/views/spree/shared/_internationalization_options.html.erb
- app/views/spree/shared/_locale_dropdown.html.erb
- app/views/spree/shared/_currency_dropdown.html.erb
- app/views/spree/shared/_mobile_navigation.html.erb
- app/views/spree/shared/_mobile_internationalization_options.html.erb
- app/views/spree/shared/_nav_bar.html.erb
- app/views/spree/shared/_line_item.html.erb
bin/rails g spree:frontend:copy_storefront

