Releases: spree/spree
Version 2.2.8
v.2.2.8 Bump version
Version 2.2.3
For the changes included in this release please refer to the Compare View.
Version 2.3.0
Spree 2.3.0 is the next major version of Spree. The main features of this release are:
- Rails 4.1 support
- Preferences are serialised on records, rather than fetched from another table
- Better multi-store support by adding a
Spree::Store
model. - Users are tracked using a permanent cookie, allowing for orders made as a guest to be tracked with orders made while signed in.
Core
- Drop first_name and last_name fields from spree_credit_cards. Add
first_name & last_name methods for now to keep ActiveMerchant happy.
Jordan Brough
- Replaced cookies.signed[:order_id] with cookies.signed[:guest_token].
Now we are using a signed cookie to store the guests unique token
in the browser. This allows customers who close their browser to
continue their shopping when they visit again. More importantly
it allows you as a store owner to uniquely identify your guests orders.
Since we set cookies.signed[:guest_token] whenever a vistor comes
you may also use this cookie token on other objects than just orders.
For instance if a guest user wants to favorite a product you can
assign the cookies.signed[:guest_token] value to a token field on your
favorites model. Which will then allow you to analyze the orders and
favorites this user has placed before which is useful for recommendations.
Jeff Dutil
- Order#token is no longer fetched from another table.
Both Spree::Core::TokeResource and Spree::TokenizedPersmission are deprecated.
Order#token value is now persisted into spree_orders.guest_token. Main motivation
here is save a few extra queries when creating an order. The TokenResource
module was being of no use in spree core.
NOTE: Watch out for the possible expensive migration that come along with this
Washington L Braga Jr
- Replaced session[:order_id] usage with cookies.signed[:order_id].
Now we are using a signed cookie to store the order id on a guests
browser client. This allows customers who close their browser to
continue their shopping when they visit again.
Fixes #4319
Jeff Dutil
- Order#process_payments! no longer raises. Gateways must raise on failing authorizations.
Now it's a Gateway or PaymentMethod responsability to raise a custom
exception any time an authorization fails so that it can be rescued
during checkout and proper action taken.
- Assign request headers env to Payment when creating it via checkout.
This might come in handy for some gateways, e.g. Adyen, actions that require
data such as user agent and accept header to create user profiles. Previously
we had no way to access the request headers from within a gateway class
- More accurate and simpler Order#payment_state options.
Balance Due. Paid. Credit Owed. Failed. These are the only possible values
for order payment_state now. The previous pending
state has been dropped
and order updater logic greatly improved as it now mostly consider total
values rather than doing last payment state checks.
Huge thanks to dan-ding. See #4605
- Config settings related to mail have been removed. This includes
enable_mail_delivery
,mail_bcc
,intercept_email
,
override_actionmailer_config
,mail_host
,mail_domain
,mail_port
,
secure_connection_type
,mail_auth_type
,smtp_username
, and
smtp_password
.
These should instead be configured on actionmailer directly.
The existing functionality can also be used by including the spree_mail_settings gem.
John Hawthorn
- refactor the api to use a general importer in
lib/spree/importer/order.rb
Peter Berkenbosch
- Ensure transition to payment processing state happens outside transaction.
Chris Salzberg
- Increase the precision of the amount/price columns in order for support other currencies. See #4657
Gonzalo Moreno
- Preferences on models are now stored in a serialized
preferences
column instead of theSpree::Preferences
table.
Spree::Preferences
are still used for configuration (like Spree::Config
).
For models with preferences (Calculator
, PromotionRule
, and
PaymentMethod
in spree core) they are now serialized using
ActiveRecord::Base.serialize
, storing the preferences as YAML in the
preferences
column.
> c = Spree::Calculator.first
=> #<Spree::Calculator::Shipping::FlatRate id: 1, type: "Spree::Calculator::Shipping::FlatRate",
calculable_id: 1, calculable_type: "Spree::ShippingMethod", created_at: "2014-06-29 21:56:59",
updated_at: "2014-06-29 21:57:00", preferences: {:amount=>5, :currency=>"USD"}>
> c.preferred_amount
=> 5
> c.preferred_amount = 10
=> 10
> c
=> #<Spree::Calculator::Shipping::FlatRate id: 1, type: "Spree::Calculator::Shipping::FlatRate",
calculable_id: 1, calculable_type: "Spree::ShippingMethod", created_at: "2014-06-29 21:56:59",
updated_at: "2014-06-29 21:57:00", preferences: {:amount=>10, :currency=>"USD"}>
John Hawthorn
- Add Spree::Store model for basic multi-store/multi-domain support
This provides a basic framework for multi-store/multi-domain, based on the
spree-multi-domain extension. Some existing configuration has been moved to
this model, so that they can have different values depending on the site
being served:
Spree::Config[:site_name]
is moved toname
Spree::Config[:site_url]
is moved tourl
Spree::Config[:default_meta_description]
is moved tometa_description
Spree::Config[:default_meta_keywords]
is moved tometa_keywords
Spree::Config[:default_seo_title]
is moved toseo_title
A migration will move existing configuration onto a new default store.
A new ControllerHelpers::Store
concern provides a current_store
helper
to fetch a helper based on the request's domain.
Jeff Dutil, Clarke Brunsdon, and John Hawthorn
API
- Support existing credit card feature on checkout.
Checkouts_controller#update now uses the same Order::Checkout#update_from_params
from spree frontend which help us to remove a lot of duplicated logic. As a
result of that payment_source
params must be sent now outsite the order
key.
Before you'd send a request like this:
```ruby
api_put :update, :id => order.to_param, :order_token => order.guest_token,
:order => {
:payments_attributes => [{ :payment_method_id => @payment_method.id.to_s }],
:payment_source => { @payment_method.id.to_s => { name: "Spree" } }
}
```
Now it should look like this:
```ruby
api_put :update, :id => order.to_param, :order_token => order.guest_token,
:order => {
:payments_attributes => [{ :payment_method_id => @payment_method.id.to_s }]
},
:payment_source => {
@payment_method.id.to_s => { name: "Spree" }
}
```
Josh Hepworth and Washington
- api/orders/show now display credit cards as source under payment
Washington Luiz
- refactor the api to use a general importer in core gem.
Peter Berkenbosch
- Shipment manifests viewed within the context of an order no longer return variant info. The line items for the order already contains this information. #4498
- Ryan Bigg
Frontend
- The api key that was previously placed in the dom for ajax requests has been
removed since the api now uses the session to authenticate the user. - Mostly inspired by Jeff Squires extension spree_reuse_credit card, checkout
now can remember user credit card info. Make sure your user model responds
to apayment_sources
method and customers will be able to reuse their
credit card info.
Washington Luiz
- Use settings from current_store instead of Spree::Config
Jeff Dutil, John Hawthorn, and Washington Luiz
Backend
- The api key that was previously placed in the dom for ajax requests has been
removed since the api now uses the session to authenticate the user.
Version 2.1.5
For the changes included in this release please refer to the Compare View.
Version 2.0.9
For the changes included in this release please refer to the Compare View.
Version 2.1.4
Auth
-
Upgraded to Devise 3.2. Should be a fairly smooth upgrade path, just remember to run the migrations:
bundle exec rake railties:install:migrations
bundle exec rake db:migrate
Core
-
Introduce Core::UserAddress module. Once included on the store user class the user address can be rememembered on checkout
Washington Luiz / Peter Berkenbosch
-
Fixed issue where selecting a payment method that required confirmation would fail, then another payment method that did not require confirmation was then chosen, but confirmation step would still appear. #3970
Washington Luiz
-
Bumped Kaminari version to 0.15.0
Ryan Bigg
-
Shipments are now "touched" when Inventory Units are updated, and Orders are now "touched" when Payments are updated. Variants are now "touched" when Stock Items are updated. This "touching" will update the record's timestamp.
Ryan Bigg
-
If a name field now exists on spree_variants, Spree will use that rather than the virtual attribute defined by
delegates_belongs_to
. #4012Washington Luiz
-
Moved
Money.extract_cents
andMoney.parse
toSpree::Money
, as those methods are being deprecated in the Money gem, but Spree still uses them to a great extent.Ryan Bigg
-
Added ability to enable/disable inventory tracking control on the variant-level.
Michael Tucker
-
Only in_stock inventory units are now restocked once an order is canceled.
Washington Luiz
-
Backorders for incomplete orders are now no longer fufiled. #4056
Sean O'Hara
-
Shipment numbers should be 11-characters, not 9. #4063
Ryan Bigg
-
Only available shipping rates are now sorted in
Spree::Stock::Estimator
. #4067Ryan Bigg
-
Email is now only required once past the address step of the checkout. #4079
Ryan Bigg
-
Ensure state_changes records are no longer created if the state changes. #4072
Ryan Bigg
-
allow_ssl_in_*
variables are no longer accessed during initialization. #4094John Hawthorn
-
Promotion rules are now loaded after initialization so that the user rule is loaded correctly.
Peter Berkenbosch
-
Fixed issue where common shipping methods were not being returned when calculating packages. #4102
Dan Kubb
-
Only eligible promotions now count towards
credits_count
onSpree::Promotion
objects. #4120Ryan Bigg
-
Order#available_payment_methods will now return payment methods marked as 'Both' #4199
Francisco Trindade & Ryan Bigg
API
-
Cached products/show template, which can lead to drastically (65x) faster loading times on product requests.
Ryan Bigg
-
The parts that make up an order's response from /api/orders/:num are cached, which can lead to a 5x improvement of speed for this API endpoint. 00e9205
Ryan Bigg
-
Cached variant objects which can lead to slightly faster loading times (4x) for each variant.
Ryan Bigg
-
Added a route to allow for /api/variants/:id requests
Ryan Bigg
-
Taxons can now be gathered without their children with the
?without_children=1
query parameter. #4112Ryan Bigg
-
Orders on the
/api/orders/mine
endpoint can now be paginated and searched. #4099Richard Nuno
-
Order token can now be passed as a header:
X-Spree-Order-Token
. #4148Lucjan Suski (methyl)
Backend
-
Don't serve JS to non XHR requests. Prevents sentive data leaking. Thanks to
Egor Homakov for pointing that out in Spree codebase.
See http://homakov.blogspot.com.br/2013/05/do-not-use-rjs-like-techniques.html
for details. -
'Only show completed orders' checkbox status will now persist when paging through orders.
darbs + Ryan Bigg
-
Implemented a basic Risk Assessment feature in Spree Backend. Viewing any Order's edit page now shows the following, with a status indicator:
Payments; link_to new log feature (ie. Number of multiple failed authorization requests) AVS response (ie. Billing address not matching credit card) CVV response (ie. code not matching)
Ben Radler (aka lordnibbler)
-
Log entries are now displayed in the admin backend for payments.
Ryan Bigg
-
Orders without shipments will now display their line items properly in the admin backend.
Ryan Bigg
-
Fix issue where a controller that inherited from Spree::ResourceController may not be able to find its class.
Ryan Bigg, tomkrus, Michael Tucker
-
Payment amounts are now displayed as "$50.00" Rather than "50.0" on the payments show screen.
Ryan Bigg
-
Shipment states for items on the order screen can now be translated.
Tiago Amaro
-
JavaScript destroy action flash messages are shown once again. #4032
Ryan Bigg
-
The page title for admin screens can now be set with a
content_for :title
block.Ryan Bigg
-
Items' SKUs are now displayed on the shipment manifest list. #4045
Peter Berkenbosch
-
Spaces inside shipment tracking numbers are now accounted for.
Daniel Pritchett
Frontend
-
Checkout now may remember user address
Washington Luiz / Peter Berkenbosch
-
Checkout now no longer redirects back to address state if confirmation step fails. #4117
Ryan Bigg
-
Orders are only created now when there is a product added to the cart. #4136
Washington Luiz
-
Added Deface Hook for Payment Method fields so that they can be defaced. #42222
Dave Kiss
Version 2.0.8
Core
-
Bumped Rails to 3.2.16
Ryan Bigg
-
Bumped ActiveMerchant to 1.42.3
Ryan Bigg
-
Bumped aws-sdk to 1.31.3.
Ryan Bigg
-
Bumped to ransack 1.1.0.
Ryan Bigg
-
Bumped Kaminari to 0.15.0.
Ryan Bigg
-
Add
currency_sign_before_symbol
setting, allows for either -$10.00 or $-10.00.Ryan Bigg
-
Switched from
* 100
tomoney.cents
in a couple of places inPayment::Processing
, for proper handling of cents in currencies where cents are not 100ths of a dollar.Clarke Brunsdon
-
Spree.user_class now accepts a Symbol, as well as a String.
hbakhtiyor
-
All adjustments are now updated during
Order#update!
. #3960John Hawthorn
-
Can now control whether or not variants have inventory tracking on a per-variant basis. #3974
Michael Tucker
-
Cancelling an order now sets the
payment_state
tocredit_owed
in all cases. #3711Ryan Bigg
-
Only on hand inventory units are now restocked.
Washington Luiz
-
Shipment numbers are now once again 12 characters long (H, followed by 11 numbers). #4063
Ryan Bigg
-
Inferring a currency for
Spree::Money.parse
when none is given now works. #4077cheef
-
The User promotion rule should now no longer use the
Spree.user_class
class as its association. 6fd78ecPeter Berkenbosch
-
Only eligible promotions are now counted towards
Promotion#credits
. #4120Ryan Bigg
-
Order#available_payment_methods will now return payment methods marked as 'Both' #4199
Francisco Trindade & Ryan Bigg
API
-
When line items are added after the delivery state, the shipments are now recreated. #3914
Washington Luiz
-
State names are now persisted on addresses when using
ensure_state_from_api
, even if the state does not exist as aSpree::State
. e976a3bWashington Luiz
-
Times are now returned with millisecond precision. (Note: this patch is not in the 2-1-stable or master branches because Rails 4 does this by default.)
Washington Luiz
Backend
-
Don't serve JS to non XHR requests. Prevents sentive data leaking. Thanks to
Egor Homakov for pointing that out in Spree codebase.
See http://homakov.blogspot.com.br/2013/05/do-not-use-rjs-like-techniques.html
for details. -
'Only show completed orders' checkbox status will now persist when paging through orders.
darbs + Ryan Bigg
-
Persist search fields acrross requests for sales total report #3906
Ryan Bigg
-
Flash messages for destructive actions in the admin backend are now visible once again. #4032
Ryan Bigg
-
Spaces inside shipment tracking numbers are now accounted for.
Daniel Pritchett
Frontend
Version 2.1.3
Core
- A channel column was added to the spree_orders table. Users can set
it when importing orders from other stores. e.g. amazon
Washington Luiz
- Highline version has been bumped to allow anything > 1.6.18 and < 1.7.x.
Ryan Bigg
- Active Merchant version has been bumped to 1.42.0. This should fix Money gem dependency problems.
Ryan Bigg
- aws-sdk version has been bumped to 1.27.0. This should fix Nokogiri gem dependency problems.
Ryan Bigg
- Fixed issue where Product#set_property was causing an undefined method when spree_i18n was in use.
Ryan Bigg
- Taxes can now be classed as "included" or "additional". Taxes which are "included" are those such as VAT/GST, where the price includes the tax already. "Additional" taxes are like Sales Tax in the US where the tax amount is added on after the listed price of the item. This change now means that included taxes are displayed on the checkout.
Ryan Bigg
API
- ApiHelpers attributes can now be extended without overriding instance
methods. By using the same approach in PermittedAttributes. e.g.
Spree::Api::ApiHelpers.order_attributes.push :locked_at
Washington Luiz
- ApiHelpers attributes can now be extended without overriding instance
methods. By using the same approach in PermittedAttributes. e.g.
Spree::Api::ApiHelpers.order_attributes.push :locked_at
Washington Luiz
- Admin users can set the order channel when importing orders. By sing the
channel attribute on Order model
Washington Luiz
- An order's shipments are now destroyed (to be recreated) when an order is assigned a new line item through the API. #3914
Washington Luiz
Backend
-
Fixed styling issues with select2 boxes. #3854
Dominik Staskiewicz
-
Fixed issue where taxons could not be reordered. #3891 #3833 #3390
Lucas Dohmen
Frontend
-
Country lists that include countries with accents in their names are now sorted correctly. #3911
Jim
Gateway
-
Added support for Stripe.js, which will now be used automatically when a Stripe payment method is selected. If a user has JavaScript disabled, then it will fall back to the old server-to-server communication technique.
Ryan Bigg
Version 2.0.7
For all commits, please see the GitHub compare view.
Core
- A channel column was added to the spree_orders table. Users can set
it when importing orders from other stores. e.g. amazon
Washington Luiz
- Converting timestamps to json now give us miliseconds precision (by monkey
patching ActiveSupport::TimeWithZone#as_json)
Washington Luiz
- Deface version has been bumped to 1.0.0.
Ryan Bigg
- Highline version has been bumped to allow anything > 1.6.18 and < 1.7.x.
Ryan Bigg
- Active Merchant version has been bumped to 1.42.0. This should fix Money gem dependency problems.
Ryan Bigg
- aws-sdk version has been bumped to 1.27.0. This should fix Nokogiri gem dependency problems.
- Fixed issue where Product#set_property was causing an undefined method when spree_i18n was in use.
Ryan Bigg
Dominik Staskiewicz
- Fixed issue where trying to process BogusSimple payments would fail. #3824
James Strong
- Added an index to spree_users spree_api_key field. #3884
Justin Kronz
- OrderInventory now acknowledges
track_inventory_units
setting and will not create backorders when that setting is set tofalse
. b66a98a
Washington Luiz
- All adjustments are now updated when an order is updated, rather than just shipping + promotion adjustments. #3960
John Hawthorn
API
- Admin users can set the order channel when importing orders. By sing the
channel attribute on Order model
Washington Luiz
- Added missing per_page node to products/index
Ryan Bigg
ship_total
is now returned on order results.
Washington Luiz
Backend
Dan Pritchett
Frontend
- Added Kaminari call to add pagination data to the
head
tag on pages. #3903
Richard Hart
Version 2.1.2
Core
-
Payment identifiers are no longer recalculated when they are saved. #3733
Ryan Bigg
-
Product#stock_items now returns stock items for the master variant as well. #3737
Ryan Bigg
-
Added a default format for datepicker_field_value, in case one is not available in locale file. #3602
Peter Goldstein
-
Bumped activemerchant to 1.39.2. #3745
Piotr Usewicz
-
Sandbox now references correct branch for spree_auth_devise when it is generated. #3770
Wes Ketchum
-
Better accessibility support (for more information, see #3414.)
Cameron Cundiff and Trevor John
-
StockItem#process_backorders will now process stock when it is adjusted postively (i.e. -3 => -2).
Ryan Bigg
-
Fixed shipping rates losing current rate when refreshing rates. #3766
dan-ding
-
Allow any version of the Money gem above 5.1.1. Related to #2737.
Ryan Bigg
-
Fixed issue where a stock item for a variant could not be created if one of the same variant had already been created. #3834
Washington Luiz
-
Added custom routing code to work around issues described in rails/rails#12367.
Ryan Bigg
-
Added Spree::Config[:send_core_emails] preference setting.
This setting allows developers to use standard rails mail configuration (in config
files) by setting :override_actionmailer_config to false without sending
spree core emails (e.g. order confirmation). This is useful e.g. in the
case where devs have opted to use an external mail API such as Mandrill
for store-related emails but still want to use ActionMailer in other
parts of their app. #3812
*Sean O'Hara*
-
Fixed issue where preferences_rescue was living in Frontend, but was necessary in Core. If you had migrations from older versions of Spree, they may have depended on this file. If you did not include the Frontend component, then this file would be unavailable. #3860
ayraju
API
-
States and countries endpoints now do not require authentication, even if it is forced with the
requires_authentication
setting. This is so the frontend's checkout address page can still work.Ryan Bigg
-
You can now assign a location to a shipment when creating it through the orders API. f3ef2e1
Washington Luiz
-
Stock Items, Stock Movements and Stock Locations are now invisible to non-admin users.
Ryan Bigg
-
Fixed issue where X-Spree-Token header was being ignored. #3798
Washington Luiz
Backend
- Added ability to edit payment amount on the payments listing. #3765
Dan Kubb
- Added ability to create and delete countries via the backend.
Washington Luiz
- Fixed issue where rules select box was not being reloaded after a rule was selected.
Washington Luiz
- Fixed issue where API calls to stock locations endpoint were not passing through a token. #3828
Alain Pilon
- Fixed admin top menu spacing. #3839
Ramon Roche
- The name of the controller is now used rather than
Object
in authorize_admin. #3622
Ryan Bigg
Frontend
-
References to cart.png will now reference the precompiled asset.
Dan Kubb
-
Special instructions are no longer ignored when specified in the checkout.
Dan Kubb
-
Use
display_price
more consistently. #3822 -
When a payment fails, it will now include the message from the gateway as a validation error. This potentially provides additional information to the user, which may guide them to correcting the data they're inputting, allowing the payment to go through successfully. #3851
Ryan Bigg