Skip to content

Latest commit

 

History

History
439 lines (293 loc) · 19.6 KB

CHANGELOG.md

File metadata and controls

439 lines (293 loc) · 19.6 KB

Solidus 2.1.0 (master, unreleased)

  • Add Spree::Promotion#remove_from and Spree::PromotionAction#remove_from

    This will allow promotions to be removed from orders and allows promotion actions to define how to reverse their side effects on an order.

    For now PromotionAction provides a default remove_from method, with a deprecation warning that subclasses should define their own remove_from method.

  • Remove is_default boolean from Spree::Price model

    This boolean used to mean "the price to be used". With the new pricing architecture introduced in 1.3, it is now redundant and can be reduced to an order clause in the currently valid prices scope.

  • Remove callback Spree::LineItem.after_create :update_tax_charge

    Any code that creates LineItems outside the context of OrderContents should ensure that it calls order.create_tax_charge! after doing so.

  • Mark Spree::Tax::ItemAdjuster as api-private

  • Analytics trackers were removed from the admin panel; the extension solidus_trackers provides the same functionality

  • Updated Credit Card brand server-side detection regex to support more brands and MasterCard's new BIN range. #1477

    Note: Most stores will be using client-side detection which was updated in Solidus 1.2

  • CreditCard's verification_value field is now converted to a string and has whitespace removed on assignment instead of before validations.

  • The lastname field on Address is now optional. #1369

  • Removals

    • Removed deprecated method Spree::TaxRate.adjust (not to be confused with Spree::TaxRate#adjust) in favor of Spree::Tax::OrderAdjuster.

      solidusio#1462

    • Removed deprecated method Promotion#expired? in favor of Promotion#inactive?

      solidusio#1461

Solidus 2.0.0 (unreleased)

  • Upgrade to rails 5.0

Solidus 1.4.0 (unreleased)

  • Use in-memory objects in OrderUpdater and related areas.

    Solidus now uses in-memory data for updating orders in and around OrderUpdater. E.g. if an order already has order.line_items loaded into memory when OrderUpdater is run then it will use that information rather than requerying the database for it. This should help performance and makes some upcoming refactoring easier.

    Warning: If you bypass ActiveRecord while making updates to your orders you run the risk of generating invalid data. Example:

    order.line_items.to_a
    order.line_items.update_all(price: ...)
    order.update!
    

    Will now result in incorrect calculations in OrderUpdater because the line items will not be refetched.

    In particular, when creating adjustments, you should always create the adjustment using the adjustable relationship.

    Good example:

    line_item.adjustments.create!(source: tax_rate, ...)
    

    Bad examples:

    tax_rate.adjustments.create!(adjustable: line_item, ...)
    Spree::Adjustment.create!(adjustable: line_item, source: tax_rate, ...)
    

    We try to detect the latter examples and repair the in-memory objects (with a deprecation warning) but you should ensure that your code is keeping the adjustable's in-memory associations up to date. Custom promotion actions are an area likely to have this issue.

    solidusio#1356 solidusio#1389 solidusio#1400 solidusio#1401

  • Make some 'wallet' behavior configurable

    NOTE: Order#persist_user_credit_card has been renamed to Order#add_payment_sources_to_wallet. If you are overriding persist_user_credit_card you need to update your code.

    The following extension points have been added for customizing 'wallet' behavior.

    • Spree::Config.add_payment_sources_to_wallet_class
    • Spree::Config.default_payment_builder_class

    solidusio#1086

  • Backend: UI, Remove icons from buttons and tabs

  • Backend: Deprecate args/options that add icons to buttons

  • Update Rules::Taxon/Product handling of invalid match policies

    Rules::Taxon and Rules::Product now require valid match_policy values. Please ensure that all your Taxon and Product Rules have valid match_policy values.

  • Fix default value for Spree::Promotion::Rules::Taxon preferred_match_policy.

    Previously this was defaulting to nil, which was sometimes interpreted as 'none'.

  • Deprecate Spree::Shipment#address (column renamed)

    Spree::Shipment#address was not actually being used for anything in particular, so the association has been deprecated and delegated to Spree::Order#ship_address instead. The database column has been renamed spree_shipments.deprecated_address_id.

    solidusio#1138

  • Coupon code application has been separated from the Continue button on the Payment checkout page

    • JavaScript for it has been moved from address.js into its own spree/frontend/checkout/coupon-code
    • Numerous small nuisances have been fixed #1090
  • Allow filtering orders by store when multiple stores are present. #1149

  • Remove unused user_id column from PromotionRule. #1259

  • Removed "Clear cache" button from the admin #1275

  • Adjustments and totals are no longer updated when saving a Shipment or LineItem.

    Previously adjustments and total columns were updated after saving a Shipment or LineItem. This was unnecessary since it didn't update the order totals, and running order.update! would recalculate the adjustments and totals again.

Solidus 1.3.0 (2016-06-22)

  • Order now requires a store_id in validations

    All orders created since Spree v2.4 should have a store assigned. A migration exists to assign all orders without a store to the default store.

    If you are seeing spec failures related to this, you may have to add let!(:store) { create(:store) } to some test cases.

  • Deprecate Spree::TaxRate.adjust, remove Spree::TaxRate.match

    The functionality of Spree::TaxRate.adjust is now contained in the new Spree::Tax::OrderAdjuster class.

    Wherever you called Spree::TaxRate.adjust(items, order_tax_zone), instead call Spree::Tax::OrderAdjuster.new(order).adjust!.

    Spree::TaxRate.match was an implementation detail of Spree::TaxRate.adjust. It has been removed, and its functionality is now contained in the private method Spree::Tax::TaxHelpers#applicable_rates(order).

  • Allow more options than current_currency to select prices

    Previously, availability of products/variants, caching and pricing was dependent only on a current_currency string. This has been changed to a current_pricing_options object. For now, this object (Spree::Variant::PricingOptions) only holds the currency. It is used for caching instead of the deprecated current_currency helper.

    Additionally, your pricing can be customized using a VariantPriceSelector object, a default implementation of which can be found in Spree::Variant::PriceSelector. It is responsible for finding the right price for variant, be it for front-end display or for adding it to the cart. You can set it through the new Spree::Config.variant_price_selector_class setting. This class also knows which PricingOptions class it cooperates with.

    Deprecated methods:

    • current_currency helper
    • Spree::Variant#categorise_variants_from_option
    • Spree::Variant#variants_and_option_values (Use Spree::Variant#variants_and_option_values#for instead)
    • Spree::Core::Search::Base#current_currency
    • Spree::Core::Search::Base#current_currency=

    Extracted Functionality:

    There was a strange way of setting prices for line items depending on additional attributes being present on the line item (gift_wrap: true, for example). It also needed Spree::Variant to be patched with methods like Spree::Variant#gift_wrap_price_modifier_in and is generally deemed a non-preferred way of modifying pricing. This functionality has now been moved into a Gem of its own to ease the transition to the new Variant::PriceSelector system.

  • Respect Spree::Store#default_currency

    Previously, the current_currency helper in both the core and api gems would always return the globally configured default currency rather than the current store's one. With Solidus 1.3, we respect that setting without having to install the spree_multi_domain extension.

  • Persist tax estimations on shipping rates

    Previously, shipping rate taxes were calculated on the fly every time a shipping rate would be displayed. Now, shipping rate taxes are stored on a dedicated table to look up.

    There is a new model Spree::ShippingRateTax where the taxes are stored, and a new Spree::Tax::ShippingRateTaxer that builds those taxes from within Spree::Stock::Estimator.

    The shipping rate taxer class can be exchanged for a custom estimator class using the new Spree::Appconfiguration.shipping_rate_taxer_class preference.

    solidusio#904

    In order to convert your historical shipping rate taxation data, please run
    rake solidus:upgrade:one_point_three - this will create persisted taxation notes for historical shipping rates. Be aware though that these taxation notes are estimations and should not be used for accounting purposes.

    solidusio#1068

  • Deprecate setting a line item's currency by hand

    Previously, a line item's currency could be set directly, and differently from the line item's order's currency. This would result in an error. It still does, but is also now explicitly deprecated. In the future, we might delete the line item's currency column and just delegate to the line item's order.

  • Taxes for carts now configurable via the Spree::Store object

    In VAT countries, carts (orders without addresses) have to be shown with adjustments for the country whose taxes the cart's prices supposedly include. This might differ from Spree::Store to Spree::Store. We're introducting the cart_tax_country_iso setting on Spree::Store for this purpose.

    Previously the setting for what country any prices include Spree::Zone.default_tax. That, however, would also implicitly tag all prices in Spree as including the taxes from that zone. Introducing the cart tax setting on Spree::Store relieves that boolean of some of its responsibilities.

    solidusio#933

  • Make Spree::Product#prices association return all prices

    Previously, only non-master variant prices would have been returned here. Now, we get all the prices, including those from the master variant.

    solidusio#969

  • Changes to Spree::Stock::Estimator

    • The package passed to Spree::Stock::Estimator#shipping_rates must have its shipment assigned and that shipment must have its order assigned. This is needed for some upcoming tax work in to calculate taxes correctly.
    • Spree::Stock::Estimator.new no longer accepts an order argument. The order will be fetched from the shipment.

    solidusio#965

  • Removed Spree::Stock::Coordinator#packages from the public interface.

    This will allow us to refactor more easily. solidusio#950

  • Removed pre_tax_amount column from line item and shipment tables

    This column was previously used as a caching column in the process of calculating VATs. Its value should have been (but wasn't) always the same as discounted_amount - included_tax_total. It's been replaced with a method that does just that. #941

  • Renamed return item pre_tax_amount column to amount

    The naming and functioning of this column was inconsistent with how shipments and line items work: In those models, the base from which we calculate everything is the amount. The ReturnItem now works just like a line item.

    Usability-wise, this change entails that for VAT countries, when creating a refund for an order including VAT, you now have to enter the amount you want to refund including VAT. This is what a backend user working with prices including tax would expect.

    For a non-VAT store, nothing changes except for the form field name, which now says Amount instead of Pre-tax-amount. You might want to adjust the i18n translation here, depending on your circumstances. #706

  • Removed Spree::BaseHelper#gem_available? and Spree::BaseHelper#current_spree_page?

    Both these methods were untested and not appropriate code to be in core. If you need these methods please pull them into your app. #710.

  • Fixed a bug where toggling 'show only complete order' on/off was not showing all orders. #749

  • ffaker has been updated to version 2.x

    This version changes the namespace from Faker:: to FFaker::

  • versioncake has been updated to version 3.x

    This version uses a rack middleware to determine the version, uses a different header name, and has some configuration changes.

    You probably need to add this to your controller specs.

    More information is available in the VersionCake README

  • Bootstrap 4.0.0-alpha.2 is included into the admin.

  • Pagination now uses an admin-specific kaminari theme, which uses the bootstrap4 styles. If you have a custom admin page with pagination you can use this style with the following.

    <%= paginate @collection, theme: "solidus_admin" %>
    
  • Settings configuration menu has been replaced with groups of tabs at the top

    • Settings pages were grouped into related partials as outlined in #634
    • Partials are rendered on pages owned by the partials as tabs as a top bar
    • Admin-nav has a sub-menu for the settings now
  • Lists of classes in configuration (config.spree.calculators, spree.spree.calculators, etc.) are now stored internally as strings and constantized when accessed. This allows these classes to be reloaded in development mode and loaded later in the boot process. #1203

Solidus 1.2.0 (2016-01-26)

  • Admin menu has been moved from top of the page to the left side.

    • Submenu items are accessible from any page. See the wiki for more information and instructions on upgrading.
    • Solidus_auth_devise should be updated to '~> 1.3' to support the new menu.
    • Added optional styles to the admin area to advance admin rebrand. To use the new colors, add @import 'spree/backend/themes/blue_steel/globals/_variables_override'; to your spree/backend/globals/variables_override.
  • Removed deface requirement from core

    Projects and extensions which rely on deface will need to add it explicitly to their dependencies.

  • testing_support/capybara_ext.rb no longer changes capybara's matching mode to :prefer_exact, and instead uses capybara's default, :smart.

    You can restore the old behaviour (not recommended) by adding Capybara.match = :prefer_exact to your spec_helper.rb.

    More information can be found in capybara's README

  • Fixed a bug where sorting in the admin would not save positions correctly. #632

  • Included (VAT-style) taxes, will be considered applicable if they are inside the default tax zone, rather than just when they are the defaut tax zone. #657

  • Update jQuery.payment to v1.3.2 (from 1.0) #608

  • Removed Order::CurrencyUpdater. #635

  • Removed Product#set_master_variant_defaults, which was unnecessary since master is build with is_master already true.

  • Improved performance of stock packaging #550 #565 #574

  • Replaced admin taxon management interface #569

  • Fix logic around raising InsufficientStock when creating shipments. #566

    Previously, InsufficientStock was raised if any StockLocations were fully out of inventory. This was incorrect because it was possible other stock locations could have fulfilled the inventory. This was also incorrect because the stock location could have some, but insufficient inventory, and not raise the exception (an incomplete package would be returned). Now the coordinator checks that the package is complete and raises InsufficientStock if it is incomplete for any reason.

Solidus 1.1.0 (2015-11-25)

  • Address is immutable (Address#readonly? is always true)

    This allows us to minimize cloning addresses, while still ensuring historical data is preserved.

  • UserAddressBook module added to manage a user's multiple addresses

  • GET /admin/search/users searches all of a user's addresses, not just current bill and ship addresss

  • Adjustment state column has been replaced with a finalized boolean column. This includes a migration replacing the column, which may cause some downtime for large stores.

  • Handlebars templates in the admin are now stored in assets and precompiled with the rest of the admin js.

  • Removed map_nested_attributes_keys from the Api::BaseController. This method was only used in one place and was oblivious of strong_params.

  • Change all mails deliveries to #deliver_later. Emails will now be sent in the background if you configure active_job to do so. See the rails guides for more information.

  • Cartons deliveries now send one email per-order, instead of one per-carton. This allows setting @order and @store correctly for the template. For most stores, which don't combine multiple orders into a carton, this will behave the same.

  • Some HABTM associations have been converted to HMT associations. Referential integrity has also been added as well. Specifically:

    • Prototype <=> Taxon
    • ShippingMethod <=> Zone
    • Product <=> PromotionRule

Solidus 1.0.1 (2015-08-19)

See https://github.com/solidusio/solidus/releases/tag/v1.0.1

Solidus 1.0.0 (2015-08-11)

See https://github.com/solidusio/solidus/releases/tag/v1.0.0