{"id":3214,"date":"2019-02-04T14:17:57","date_gmt":"2019-02-04T14:17:57","guid":{"rendered":"https:\/\/spreecommerce.org\/?p=3214"},"modified":"2026-03-13T09:49:42","modified_gmt":"2026-03-13T09:49:42","slug":"exciting-new-features-in-spree-3-7-0-release","status":"publish","type":"post","link":"https:\/\/spreecommerce.org\/exciting-new-features-in-spree-3-7-0-release\/","title":{"rendered":"Exciting new features in Spree 3.7.0 release"},"content":{"rendered":"<p>3.7 release is our last 3.x line release bridging the gap between 3.x and Spree 4.0. This is a big release packed with several amazing features and a huge number of bug fixes (<a href=\"https:\/\/github.com\/spree\/spree\/compare\/3-6-stable.3-7-stable\">over 700 commits by 17 contributors<\/a>!). Upgrading to 3.7 guarantees a smooth and easy migration to\u00a0<a href=\"https:\/\/github.com\/spree\/spree\/milestone\/37\">Spree 4.0<\/a> (April 2019 with Rails 6.0 and GraphQL support).<\/p>\n<p><!--more--><\/p>\n<h3><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\" rel=\"nofollow\">Storefront API v2<\/a><\/h3>\n<p>We&#8217;ve worked hard over the last few months to deliver a completely new, easy to work with and lightweight REST API for building amazing customer interfaces with modern JavaScript libraries (React, Vue, Angular) and for native mobile apps. New Storefront API v2 is fast, easy to use, and extend. It&#8217;s also well documented in <a href=\"https:\/\/raw.githubusercontent.com\/spree\/spree\/master\/api\/docs\/v2\/storefront\/index.yaml\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OpenAPI 3.0 (Swagger) format<\/a>\u00a0which you can\u00a0<a href=\"http:\/\/blog.getpostman.com\/2018\/12\/11\/postman-supports-openapi-3-0\/\" rel=\"nofollow\">import into Postman app<\/a>.<\/p>\n<p>New API is based on\u00a0<a href=\"https:\/\/jsonapi.org\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">JSON API<\/a>\u00a0spec and uses blazing fast Netflix\u00a0<a href=\"https:\/\/github.com\/Netflix\/fast_jsonapi\" target=\"_blank\" rel=\"noopener noreferrer\">fast_json_api<\/a>\u00a0serializer library.\u00a0<a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/authentication\">Authentication<\/a>\u00a0is based on Oauth using\u00a0<a href=\"https:\/\/github.com\/doorkeeper-gem\/doorkeeper\" target=\"_blank\" rel=\"noopener noreferrer\">doorkeeper<\/a> library. Besides that, there are no additional dependencies making it lightweight and future-proof.<\/p>\n<p>Storefront API v2 consists of:<\/p>\n<ul>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/storefront#tag\/Cart\" rel=\"nofollow\">Cart endpoints<\/a>\u00a0(Create Cart, Add Item, Set Quantity, Remove Item, Empty Cart)<\/li>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/storefront#tag\/Checkout\" rel=\"nofollow\">Checkout endpoints<\/a>\u00a0(Update Checkout, Advance Checkout, Complete Checkout, Add\/Remove Store Credit, Get Shiping Rates, Get Payment Methods)<\/li>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/storefront\/#tag\/Products\" rel=\"nofollow\">Products<\/a>\u00a0Catalog<\/li>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/storefront\/#tag\/Taxons\" rel=\"nofollow\">Taxons<\/a>\u00a0Catalog<\/li>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/storefront#tag\/Account\" rel=\"nofollow\">Account endpoints<\/a>\u00a0(Account Information, Credit Cards, placed Orders)<\/li>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/storefront\/#tag\/Order-Status\" rel=\"nofollow\">Order Status<\/a><\/li>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/storefront\/#tag\/Countries\" rel=\"nofollow\">Countries<\/a><\/li>\n<li><a href=\"https:\/\/guides.spreecommerce.org\/api\/v2\/authentication\" rel=\"nofollow\">Authentication<\/a><\/li>\n<\/ul>\n<p>All of the endpoints support JSON API&#8217;s\u00a0<a href=\"https:\/\/jsonapi.org\/format\/#fetching-sparse-fieldsets\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Sparse Fieldsets<\/a>\u00a0to fix usual Over-Fetching issues and\u00a0<a href=\"https:\/\/jsonapi.org\/format\/#fetching-includes\" rel=\"nofollow\">Related Resources<\/a>\u00a0to reduce the number of API queries you need to perform.<\/p>\n<h3>Service Oriented Architecture<\/h3>\n<p>While building the API v2 we&#8217;ve also refactored a huge portion of Spree internals by introducing modular Service Oriented Architecture to the codebase.<\/p>\n<p>We&#8217;re in the process of moving domain-specific code from models to\u00a0<code>Service Objects<\/code>\u00a0with a well-defined scope and predictable return values. All service objects include\u00a0<a href=\"https:\/\/github.com\/spree\/spree\/blob\/master\/core\/lib\/spree\/service_module.rb\">Service Module<\/a>\u00a0which unifies how those classes handle arguments and what they return.<\/p>\n<p>Also, we&#8217;re moving away from ransack library by introducing\u00a0<code>Finders<\/code>\u00a0and\u00a0<code>Sorters<\/code>\u00a0classes for simpler fetching resources and collections.<\/p>\n<p>This makes Spree codebase easier to read and learn. It also makes any customizations way easier. At the same time, public APIs won&#8217;t change a lot as providing backward compatibility is one of our top priorities.<\/p>\n<h3>Dependencies system<\/h3>\n<p>We&#8217;re introducing a new painless way of customizing Spree without the need of decorators. With Dependencies you can easily replace parts of Spree internals with your custom classes. You can replace Services, Abilities, and Serializers. More will come in the future. We hope using Dependencies will remove the need for creating decorators at all!<\/p>\n<p>See Documentation<\/p>\n<h3>Removing Coffee Script<\/h3>\n<p>CoffeeScript a few years back ago was a really great JavaScript enhancement. Nowadays with ES6 and TypeScript around it became obsolete. That&#8217;s why we&#8217;ve converted all of the CoffeeScript assets in Spree and extensions to plain JavaScript and removed CoffeeScript dependency.<\/p>\n<h3>Improved MySQL support<\/h3>\n<p>A lot of merchants were using Spree with MySQL for years now, but the development of the platform was mainly focused on PostgreSQL support. We&#8217;ve changed that and all of our CI builds are tested and verified against both PostgreSQL and MySQL. We&#8217;ve also fixed all MySQL-related bugs.<\/p>\n<h3>And hundreds of other fixes and improvements<\/h3>\n<p>Feel free to <a href=\"https:\/\/github.com\/spree\/spree\/releases\/tag\/v3.7.0\" target=\"_blank\" rel=\"noopener noreferrer\">learn more on GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>3.7 release is our last 3.x line release bridging the gap between 3.x and Spree 4.0. This is a big release packed with several amazing features and a huge number of bug fixes (over 700 commits by 17 contributors!). Upgrading to 3.7 guarantees a smooth and easy migration to\u00a0Spree 4.0 (April 2019 with Rails 6.0 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3329,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"none","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"categories":[52],"tags":[53,84],"class_list":["post-3214","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source","tag-api","tag-graphql"],"acf":[],"_links":{"self":[{"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/posts\/3214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/comments?post=3214"}],"version-history":[{"count":0,"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/posts\/3214\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/media\/3329"}],"wp:attachment":[{"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/media?parent=3214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/categories?post=3214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spreecommerce.org\/wp-json\/wp\/v2\/tags?post=3214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}