Solidus 2.2.0
John Hawthorn
3 May 2017 - 9 mins read
2.2.0 on github 2.2.0 on rubygems
Announcing Solidus 2.2.0!
This release includes better support for non-credit-card payment sources, better promotion creation, and many other great changes.
Later this month is SolidusConf 2017 in London. Hope to see you there!
Major Changes
-
Spree::Wallet and Non credit card payment sources #1707 #1773 #1765 (chrisradford, jordan-brough, peterberkenbosch)
This adds support for payment sources other than
CreditCard
, which can be used to better represent other (potentially reusable) payment sources, like PayPal or Bank accounts. Previously sources like this had to implement all behaviour themselves, or try their best to quack like a credit card.This adds a
PaymentSource
base class, whichCreditCard
now inherits, and aWallet
service class to help manage users' payment sources. AWalletPaymentSource
join table is used to tie reusable payment sources to users, replacing the existing behaviour of allowing all credit cards with a stored payment profile. -
Add promotion code batch #1524 (vladstoick)
Prior to Solidus 1.0, each promotion had at most one code. Though we added the functionality to have many codes on one promotion, the UI for creation and management was lacking.
In Solidus 2.2 we've added
PromotionCodeBatch
, a model to group a batch of promotion codes. This allows additional promotion codes to be generated after the Promotion's initial creation. Promotion codes are also now generated in a background job. -
Admin UI Changes
The admin UI was once again a focus in this release. We've made many incremental changes we think all users will appreciate. This includes an upgrade to Bootstrap 4.0.0.alpha6, changes to table styles, and a better select style.
See the "Admin UI" section below for a full list of changes.
Core
Spree::Order#available_payment_methods
returns anActiveRecord::Relation
instead of an array #1802 (luukveenis)- Product slugs no longer have a minimum length requirement #1616 (fschwahn)
Spree::Money
now includesComparable
and the<=>
operator for comparisons. #1682 (graygilmore )- Allow destruction of shipments in the "ready" state. #1784 (mamhoff)
- Do not consider pending inventory units cancelable #1800 (mamhoff)
- Rewrite spree.js in plain JS #1754 (jhawthorn)
- Make sensitive params filtering less eager #1755 (kennyadsl)
- Use manifest.js to support Sprockets 4 #1759 (jhawthorn)
- Update paperclip dependency #1749 (brchristian)
- Update kaminari dependency to 1.x #1734 (jrochkind)
- Allow twitter_cldr 4.x #1732 (jrochkind)
- Added LineItem name to unavailable flash #1697 (ericsaupe)
- Don't treat "unreturned exchanges" specially in checkout state machine flow #1690 (jhawthorn)
set_shipments_cost
is now part of OrderUpdater #1689 (jhawthorn)- Methods other than
update!
,update_shipment_state
,update_payment_state
are now private on OrderUpdater #1689 (jhawthorn) - Use can_complete? instead of confirm? to check if Order can be completed #1833 (mamhoff)
Bug Fixes
AvailabilityValidator
correctly detects out of stock with multiple shipments from the same stock location. #1693 (jhawthorn)- Fix missing close paren in variantAutocomplete #1832 (jhawthorn)
- Set belongs_to_required_by_default = false #1807 (jhawthorn)
- Fix loading transfer shipments #1781 (mamhoff)
- Fix complete order factory to have non-pending inventory units #1787 (mamhoff)
- Fix to cart URL for stores not mounted at root #1775 (funwhilelost)
- Remove duplicated require in shipment factory #1769 (upinetree)
- Fix an issue where updating a user in the admin without specifying roles in would clear the existing roles.#1747 (tvdeyen)
- Fix the 'Send Mailer' checkbox selection #1716 (jhawthorn)
- Rearrange AR relation declarations in order.rb in preparation for Rails 5.1 #1740 (jhawthorn)
- Fix issue where OrderInventory creates superfluous InventoryUnits #1751 (jhawthorn)
- Fix check for
order.guest_token
presence #1705 (vfonic) - Fix shipped_order factory #1772 (tvdeyen)
- Don't display inactive payment methods on frontend or backend #1801 (luukveenis)
- Don't send email if PromotionCodeBatch email is unset #1699 (jhawthorn)
Frontend
- Use
cart_link_path
instead ofcart_link_url
#1757 (bofrede) - Replace cache_key_for_taxons with cache #1688 (jhawthorn)
- Update code styles for /cart #1727 (vfonic)
- Add a frontend views override generator #1681 (tvdeyen)
Admin
- Create JS namespaces in centralized file #1753 (jhawthorn)
- Replace select2-rails with vendored select2 #1774 (jhawthorn)
- Add JS
Spree.formatMoney
helper for currency formatting #1745 (jhawthorn) - Rewrite zones.js.coffee using Backbone.js #1766 (jhawthorn)
- Add JS
Spree.t
andSpree.human_attribute_name
for i18n #1730 (jhawthorn) - Allow editing multiple Stores #1282 (jhawthorn)
- Add promotion codes index view #1545 (jhawthorn)
- Replace deprecated bourbon mixins with unprefixed CSS #1706 (jhawthorn)
- Ensure helper is specified in CustomerReturnsController #1771 (eric1234)
- Ensure helper is specified in VariantsController #1714 (eric1234)
- Remove nonexistant form hint from view #1698 (jhawthorn)
- Promotion search now finds orders which used the specific promotion code, of any code on the promotion. #1662 (stewart)
Admin UI
- Upgrade to Bootstrap 4.0.0.alpha6 #1816 (jhawthorn)
- New admin table layout #1786 #1828 #1829 (tvdeyen)
- Add number with currency selector widget #1793 #1813 (jhawthorn)
- Replace select2 styling #1797 (jhawthorn)
- Change admin logo height to match breadcrumbs height #1822 (mtomov)
- Fit admin logo to available space #1758 (brchristian)
- Make form/button styles match bootstrap's #1809 (jhawthorn)
- Fix datepicker style #1827 (kennyadsl)
- Use bootstrap input-group for date range #1817 (jhawthorn)
- Improve page titles in admin #1795 (jhawthorn)
- Use an icon as missing image placeholder #1760 (jhawthorn) #1764 (jhawthorn)
- Convert admin orders table into full width layout #1782 (tvdeyen)
- Raise
font-size
#1777 (tvdeyen) - Improve promotions creation form #1509 (jhawthorn)
- Remove stock location configuration from admin "cart" page #1709 #1710 (jhawthorn)
- Update admin cart page dynamically #1715 (jhawthorn)
- Fix duplicated Shipments breadcrumb #1717 #1746 (jhawthorn)
- Don’t set default text highlight colors #1738 (brchristian)
- Convert customer details page to backbone #1762 (jhawthorn)
- Remove inline edit from payments dipslay amount #1815 (tvdeyen)
- Fix styling of tiered promotions delete icon #1810 (jhawthorn)
- Remove
webkit-tap-highlight-color
#1792 (brchristian) - Promotion and Shipping calculators can be created or changed without reloading the page. #1618 (jhawthorn)
- Fix sidebar vertical alignment #1845 (tvdeyen)
- Fix centering of pagination under bootstrap 4.0.0.alpha6 #1844 (jhawthorn)
- Fix date range filter under firefox #1846 (jhawthorn)
Removals
- Extract expedited exchanges to an extension #1691 (jhawthorn)
- Remove spree_store_credits column #1741 (jhawthorn)
- Remove StockMovements#new action and view #1767 (jhawthorn)
- Remove unused variant_management.js.coffee #1768 (jhawthorn)
- Remove unused payment Javascript #1735 (jhawthorn)
- Moved
spree/admin/shared/_translations
partial tospree/admin/shared/_js_locale_data
.
Deprecations
- Deprecate
Order#has_step?
in favour ofhas_checkout_step?
#1667 (mamhoff) - Deprecate
Order#set_shipments_cost
, which is now done inOrder#update!
#1689 (jhawthorn) - Deprecate
user.default_credit_card
,user.payment_sources
foruser.wallet.default_wallet_payment_source
anduser.wallet.wallet_payment_sources
- Deprecate
CreditCard#default
in favour ofuser.wallet.default_wallet_payment_source
- Deprecate
cache_key_for_taxons
helper favour ofcache [I18n.locale, @taxons]
- Deprecate admin sass variables in favour of bootstrap alternatives #1780 (tvdeyen)
- Deprecate Address#empty? #1686 (jhawthorn)
- Deprecate
fill_in_quantity
capybara helper #1710 (jhawthorn) - Deprecate
wait_for_ajax
capybara helper #1668 (cbrunsdon)