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.

Congratulations to littleBits and Casper

Posted on June 30, 2015 by ALexander Diegel

Congratulations to Casper and Little Bits

When you tag your company as, “Behind the Best Storefronts,” you get a certain sense of pride whenever you see your clients take their business to the next level. In the past week or so, Spree Commerce has had a lot to be proud of, and would like to extend a huge congratulations to both littleBits and Casper, who raked in a combined $99.2 milion in funding.

littleBits

littleBits, the startup that is democratizing hardware by empowering everyone to create inventions, big and small, announced that it received $44.2 million in new funding. The company with the easy-to-use electronic building blocks will use the new funding to fuel its growth.

Specifically, littleBits will use this investment to further its STEM/STEAM education distribution, push global expansion, and develop new enterprise initiatives. The company will also expand its retail availability in the coming quarter by partnering with Barnes & Noble in its retail stores across the United States.

Still a young company, this Series B funding will help littleBits continue to revolutionize the hardware landscape, just as Netflix did for video entertainment before it. Click here to read the entire press release surrounding this announcement.

Casper

Just 14 months into existence, straight-to-your-door mattress retailer Casper secured $55 million in a new round, at a $550 million valuation. Adding a little glam to this investment round is the list of celebrities who have joined the group of investors: Leonardo DiCaprio, Tobey Maguire, Adam Levine and Scooter Braun.

The new funding will be used to expand Casper’s research and development staff, bring in more employees, and lay the groundwork for international expansion. This comes just after Casper announced same-day delivery in San Francisco, which should also enhance the company’s growth.

Also just on its Series B funding, Casper continues to turn heads with its bed-in-a-box sales and delivery service. To read more about this round, check out the full article on TechCrunch.

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:

Frontend

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.