We're super happy to announce Spree 3.3 release with many new great features & fixes contributed by the Spree Community 🎉 🎉 🎉
Major/New Features
Rails 5.1 support
Spree 3.3
is now compatible with Rails 5.1
compared to 3.2
which used to run on Rails 5.0
.
Thanks to that you can start using all of the new great features available in Rails 5
Contributed by Josh Powell & Spark Solutions & John Hawthorn
Ruby 2.4 support
Spree now works with Ruby 2.2
(>= 2.2.7
), 2.3.x
and 2.4.x
.
Contributed by Spark Solutions
Segment.com tracker integration
We've extended Tracker system to include other trackers besides Google Analytics.
First of the bunch is Segment which enables you to
connect your store with over 200 analytics engines, CRMs, live chats, remarketing platforms,
A/B systems and much more. Now in Spree out of the box! No additional development required!
Developed during a Spree hackaton.
Contributed by Spark Solutions
Preventing duplicate values for number fields
We've added unique indexes and uniqueness validation on number
field for those models:
CustomerReturn
Order
Payment
Reimbursement
ReturnAuthorization
Shipment
StockTransfer
This change will fix records with duplicate numbers. Migration scripts we're take care of that.
WARNING migration process can take considerable amount of time, depending on volume of your data
Contributed by Spark Solutions
Added missing indexes and unique indexes
Besides number fields we've added multiple regular & unique indexes that were missing. This will keep data consistency of your app in check and also will boost it performance.
Contributed by Spark Solutions
Add quantity
to inventory units and split on demand
Optimising Shipments and Inventory Units.
- Creates a single
inventory_unit
perstate
, perline_item
, perstock_location
with aquantity
field indicating inventory units in that state. - Adds a
return_quantity
field inReturnAuthorization
indicating the number of units to be returned/exchanged. - Split inventory unit to extract the portion/quantity that needs to be returned. This might be further split depending upon stock availability at the time of generating return.
- Changes prioritizer and adjuster to maximise the number of
on_hand
items from available stocks in multiplestock_locations
- Change
splitters/weight.rb
to use Worst Fit algo.
Contributed by Vinsol
Better Store Credits management in customer Frontend and Admin Panel
Store credit removal feature on spree front-end for partially paid order (with store credit payments). User can remove its store credit payment if additional payment is required/
Admin user can do the same from Admin Panel.
Contributed by Vinsol
Upgrade
Update your Rails version to 5.1
Please follow the
official Rails guide
to upgrade your store.
Update Gemfile
gem 'spree', '~> 3.3.0'
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
extension branch to Spree branch. Starting from Spree 3.2 release master
branch of all
spree-contrib
extensions should work with Spree >= 3.1
and < 4.0
. Please change
your extensions in Gemfile eg.:
from:
gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero', branch: '3-1-stable'
to:
gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero'
Run bundle update
Install missing migrations
rails spree:install:migrations
rails spree_auth:install:migrations
rails spree_gateway:install:migrations
Run migrations
rails db:migrate
Other Gotchas
Include UserMethods
in your User
class
With this release we're not including this automatically. You need to do it manually if you're not using spree_auth_devise
.
You need to include Spree::UserMethods
in your user class, eg.
class User
include UserAddress
include UserMethods
include UserPaymentSource
end
Update aws-sdk
gem to >= 2.0
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:
gem 'aws-sdk', '< 2.0'
to:
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
Seel also RubyThursday episode walkthrough of upgrading paperclip in your project.
Add jquery.validate to your project if you've used it directly from Spree
If your application.js file includes line
//= require jquery.validate/jquery.validate.min
you will need to add it this file manually to your project because this library was
removed from Spree in favour of native HTML5 validation.
Noteworthy Changes
Also please review each of the noteworthy changes, and ensure your customizations
or extensions are not effected. If you are affected by a change, and have any
of your own tips please submit a PR to help the next person!
Full Changelog
You can view the full changes using Github Compare.
Noteworthy Changes
-
Removed
jquery.validate
in favour of HTML5 validation for address on checkout -
Remove frontend routes from core, to allow usage without default Spree frontend
-
Use HTML5
email_field
on frontend checkout -
Frontend views cleanup
-
acts_as_list
index starts from 1 -
API: Remove core dependency on api user db column
-
Added missing permission checks in Admin Panel
-
Loosen project dependency on
FriendlyId
in Admin Panel and API endpoints -
Admin has to confirm clear cache in Admin Panel
-
Added uniqueness validation added on promotion's code
-
Restrict deletion of payment method if associated with payments or credit cards
-
Uniqueness validation added on Taxonomy's name and Taxon's permalink
-
Admin Panel
field_container
now supports options like content_tag does -
Simplify
EmailValidator
regexp to align withDevise.email_regexp
-
Schema.org fixes for products microformat data
-
Allow valid image types to be overridden without deleting validations for
Spree::Image
-
Updated
paperclip
to~> 5.1.0
-
Updated
acts-as-taggable-on
to5.0
-
Updated
FriendlyId
to5.2
-
Loosen ActiveMerchant dependency (
~> 1.67
) -
Updated
cancancan
to2.0
-
Updated
jquery-ui-rails
to6.0.1
& removed unused assets -
Removing mutant dependency
-
Updated
state_machines-activerecord
to~> 0.5
-
Removed previously deprecated
LineItem#invalid_quantity_check
-
Removed deprecated automatic
UserMethods
injection -
Deprecated
Spree::Calculator::PercentPerItem
& removedSpree::Calculator::FreeShipping
-
Removed minimum length validation on product slug
-
Removed
font-awesome-rails
dependency -
Deprecate
Shipment#editable_by?
&Shipment#send_shipped_email
-
Deprecate
Variant#having_orders
&Variant#on_backorder
-
Deprecate
DelegateBelongsTo
-
Removed unused
jquery.migrate
,normalize
&skeleton
assets from Core -
Removed
shoulda-matchers
dependency