Spree Commerce

Try It Now

8 Reasons why you should choose Spree Commerce for your online store

Posted on June 30, 2015 by Eva María Gude García

About the Author

Eva María Gude García is a social media manager and content director at 2beDigital. 2beDigital is a digital marketing agency based in Santiago de Compostela, Galicia and Barcelona. 2bedigital was formed by a multidisciplinary team whose principles of trust and transparency power their work.

When the time comes to choose an ecommerce storefront, there are many options available. Choosing the right storefront is a top priority for your business, and choosing the appropriate framework is a difficult but pivotal task.

Spree Commerce is currently considered the most popular choice among store owners and retailers. And that’s the reason why 2beDigital chose Spree as one of its key platforms. Here are 8 reasons why you should choose Spree Commerce for your online store:

1. Easy to Use

Spree is simple and easy to use. Its interface and administrative dashboard keep the user in mind.

2. Ruby on Rails

Spree is developed in Ruby on Rails, which is noted for its reliability and stability.

3. Easy Documentation

The user guides developed by Spree’s developers are easily accessible, and extremely helpful to new businesses. You can join the community and take advantage of Spree’s expert recommendations if you have any problems with the application.

4. Licenses

The Spree-BSD license has few restrictions, regardless of the size of your business. Even if you’re a small business or a multinational, you’re free to use Spree for commercial purposes without paying licensing fees.

5. Easy Customization

Spree is completely flexible and can be adapted to the needs of businesses, not vice versa. With lots of extensions available in the community, Spree often becomes the preferred choice for ecommerce brands.

6. Mobile Optimization

If predicitons stand true, shopping with smart phones and tablets will grow 43% througout the year, compared to 2014. Needless to say, optimizing stores for smart phones has become essential. The Spree storefronts are responsive, and will work as well on a smart phone as they do on a desktop.

7. Spree Commerce’s API

With Spree Commerce’s API, creating a new application or a third-party integration is flexible, easy and scalable.

8. Integration with ERP, systems management and accounting

With Wombat, Spree offers the possibility of integrating online stores’ accounting, ERP and management. Wombat automates all of your third-party services, increasing your speed to market and ensuring you never again lose an order.

To view this post in its original format, visit the blog of 2beDigital.

Q & A with Spree Commerce

Posted on June 24, 2015 by ALexander Diegel

Questions Answered by our Community

With over 15,000 commits and 620 contributors, Spree Commerce has long been proud of its community. Store owners and developers will often take their quest for an ecommerce solution to Q/A sites such as Quora, and we can always depend on our community to answer the call. Here are some recent questions and answers:

Q: What are the best eCommerce systems for a UK B2B SME wholesaler

A: Spree Commerce is what I would use—an up-and-coming open-source eCommerce solution used by 45.000 businesses around the world—including multi-million ones like Fortnum & Mason (UK based – got 20% more customers to check-out with Spree). It could be easily customized to your needs – B2B wholesale.

I recommend using Spree Commerce for the following reasons:

  • FLEXIBILITY & DEVELOPMENT SPEED: Spree is written in Ruby on Rails (web framework), highly customizable and well supported by the community (several useful extensions). With Spree you can release an MVP faster than with any other framework.
  • CUSTOM LOOK: On the front-end you can use Twitter Bootstrap 3 which is a template/theme framework which let’s you create your custom mobile-ready, responsive web design
  • FACEBOOK-LIKE UI: On the front-end we also use React (JS Library), which is created, supported and used by Facebook for a facebook-like user experience

Answered by: Michael Faber, co-founder of Spark Solutions. Read the full answer here.

Q: Which is Better, Spree Commerce or Magento?

A: We have used both and we have created stores and marketplaces from scratch. We have found that Spree Commerce is moving way faster than any other competitor; they have the most enterprise-ish features such as multiple stock locations, transfers and split shipments. We have contributed to some spree-maintained plugins and open sourced some new plugins for Spree.

Spree’s core development focuses on the core and Magento tries to add way too many features as recommended products, and that kind of thing, into the core. That slows down Magento and makes it difficult to upgrade and maintain. On the other side, the community is constantly adding a lot of new plugins to Spree, so in terms of growth Spree is doing better lately. Most of the new plugins for Magento integrate new services as new fulfilment services and the creators of the plugins are usually the same companies creating this new service. This is natural, because Magento is still stronger in the market.

Rails vs PHP is the key here! Having Rails as the backend, it’s way easier to have two teams developing two new features into your commerce and merge the changes afterwards. Try doing that with Magento…

Answered by: Gert Findel, CTO at Acid Labs. Read the full answer here.

Q: Does Spree Commerce Support Indian Payment Gateways?

A: Payu gateway is currently available in 13 countries including India & there’s an open source extension made by netguru that you can use to easily connect it to your Spree store.

Answered by: Ania Banaszek, Sales & Marketing Manager at Netguru

That’s it for this session of Q&A with Spree Commerce. Thank you to our incredible community for giving clear and responsive answers! Until next time…

Follow Spree Commerce!

Spree Custom Gateway

Posted on June 11, 2015 by Emile Swarts

About the Author

Emile Swarts is a developer at Made. Made is a Spree Commerce Certified Partner comprised of software experts who are passionate about delivering well-crafted, mission-critical software. The team works with organizations across many sectors who share their drive to produce standout, commercially succssful work.

Custom gateways in the Spree Commerce platform encapsulate the operations required to take payments online. This functionality is abstracted out of the order logic, which makes it easy to think about in isolation.

Ultimately, what we want is to substitute a small subset of functionality in Spree for our own use. The way Spree knows whether a transaction was successful or not is that we tell it exactly what happened. We return a Response object (ActiveMerchant::Billing::Response), which holds a state of successful or failed.

If we return a successful response object, everything went well and the user has now completed the checkout. If the transaction was not successful, the user will be redirected back to the payment step with an error message where they can try again.

Foopay gateway

In this case we have stubbed out the response to always be successful. This happens because the first argument is set to true. If it were set to false, it would always indicate to Spree that the payment has failed.

Typically you would look for something like ‘success’ in your xml, json or post data after you’ve completed communication with the external gateway. Note that the payment_source_class is Spree::CreditCard. We could specify a custom model here if we wanted to add extra attributes to it. The ‘options’ argument passed in contains only a set list of predefined options including:

A complete list of options can be seen here.

Register the gateway

We can register Foopay by adding the following code to the spree initializer:

Persisting the gateway

We need to persist our gateway, and also add it to our Spree store:


In order to get the data we need from the user, we need to render a form for them to fill in. Looking back at our custom gateway, we specified a ‘method_type’ method. This will be used to look up the partial to be rendered in the payment step. In Spree, we can see this happening in frontend/app/views/spree/checkout/_payment.html.erb.

Our gateway specified ‘foopay’ as the method_type, so it will try and render the the foopay partial. Let’s create it at app/views/spree/checkout/payment/foopay.html.erb

This file is used to customize what is sent through to the checkout controller.

Note: Naming of the form inputs is important. Custom payment values may also need to be added to the permitted attributes list.

h4.Behind the scenes

I decided to take a few notes on the interesting things that happen when the request goes into Spree.

We can see that the payment form points to: /checkout/update/payment

The request hits the .update method on the Spree::Checkout controller. The first code it hits is:

This line will update the order with the new data submitted from the form, any associated models will also be updated or created. If this completes successfully, the order tries to advance to the ‘complete’ state.

The state machine hooks are triggered.

process_payments! is defined in core/app/models/spree/order/payments.rb

Both the payments and checkout modules are mixed into the order object, so all the methods they provide are added directly to it. Next, it finds each of the unprocessed_payments on the order, and runs process! on them.

.process! checks whether the gateway has auto_capture? enabled. If it does, the purchase method is called directly, otherwise authorize is called.

Following the call into the Payment model, we find the following:

It’s within the .build_source method that Foopay is instantiated.

Time to shine

The actual line of code that hands over responsibility from Spree to Foopay looks like this:

action in this case will be ‘purchase’.

In Foopay, our purchase method accepts the following arguments:

  • amount
  • payment source
  • options

The second payment_source argument will be an instance of Spree::CreditCard. The third argument, ‘options’, is a pre-defined list of gateway options, this argument was discussed above. We use the data in these arguments to finish the payment. Our method returns the appropriate response object, and the transaction is complete.

To view this post in its original format, visit the blog of Made.

Spree Commerce vs. Magento

Posted on June 04, 2015 by Kurt Prosser

About the Author

Kurt Prosser works with Easton Digital. Easton Digital is a full service ecommerce agency that helps small and medium-sized merchants create and grow their ecommerce businesses. Our team of marketers, developers, and designers offer PPC, SEO, and development and design services. We work with merchants in Columbus, Ohio and throughout the U.S.

The most important decision that an online retailer has to make when starting out is choosing the online shopping platform that’s going to serve as the base of their ecommerce store. The shopping platform you choose not only influences the layout and look of an ecommerce store, but it’s also used for handling the various backend functions in the website. Some of the important functions that the shopping platform should handle include management of inventory, delivery tracking and discount management.

Essentially, the platform manages all the operations of your store. Thus, choosing the right one is important. This article highlights a few of the differences between Magento and Spree Commerce.

Magento is an open source platform owned by eBay. It was founded in 2008 and acquired by eBay in 2011. Magento is built on the Zend Framework, which is an open source, object-oriented web application framework implemented in PHP 5. Spree Commerce is an open source platform built on Ruby on Rails. It was created by Sean Schofield in 2007 and has since been further developed with the help of over 600 contributors.

Magento is the most popular ecommerce platform online. Out of the box, it’s extremely powerful and filled with numerous features. Furthermore, Magento has a lot of extensions that can quickly add features and/or connect to other applications. However, Magento does have a reputation with some of being overly complicated, bloated, and a resource hog.

Spree Commerce is regarded as the new alternative to Magento. Like Magento, it’s free and open sourced. Spree is built using Ruby on Rails, which has earned a great reputation for producing fast, light, and elegant sites. In fact, many say that operations in Spree take 1/10th the code as Magento.

Spree Commerce has a robust community of contributors that work to constantly improve and enhance Spree. According to a recent Spree Commerce review, the amount of developers for this platform is rapidly increasing, and the contributors are making some innovative changes, while still keeping Spree responsive and light.

While there are many extensions available on Github, you’ll likely need to budget to have custom extensions built. Fortunately, the Spree team has created Wombat, "The Operating System for Ecommerce.” Wombat helps storefronts avoid the pain of customizing by connecting your Spree storefront (and any other ecommerce storefront) to any service, such as QuickBooks, ShipStation, and MailChimp, without any custom coding on their behalf.

If you happened to try Spree before reading this article, the first thing you’ll be blown away by is its admin panel. The Spree admin panel is one of the most well-designed, elegant admin panels out there. It’s extremely lean and efficient, but you’ll have to be prepared to load features you’ll need, like a CMS.

Magento and Spree Commerce are similar in many ways. Both are open-sourced, powerful, and fully customizable ecommerce platforms. The differences between the two platforms stem from PHP vs. Ruby on Rails and the collections of extensions, tools and themes. If you have a set budget, Magento may be the correct platform for you. If you’re seeking a leaner, faster, and more elegant platform, then Spree Commerce may be the correct platform for you.

To view this post in its original format, visit the blog of Easton Digital.