Please note that this is a very old post and probably contains out-of-date information.

For a while now I've been looking at options for changing the software on my Dad's online store. We've been using LiteCommerce for a few years and although it's generally worked well, (and I would still recommend it) it's been hacked on quite a bit to add features and modify the way it behaves. Fiddling with partially encrypted PHP code isn't my idea of fun and upgrading is also a real pain. Also, for a PHP application, it isn't particularly fast. It's coded in a clever object oriented way but I would say the per request overhead is quite high. I looked at some other PHP shopping carts but nothing looked much more compelling that LiteCommerce. It might be nice to have someone else worry about the whole problem but I couldn't find a good hosted solution (and what's the fun in that!) I looked at Shopify for a while and then realised it was pretty underpowered and kind of expensive.

Ideally I'd like a Rails based shopping cart and I've been following the progress of Spree for a while now. Spree seems to gaining momentum but it's still missing a lot of features that I need. Also, I suspect that a lot of effort is going to go into building user interface for store configuration. Things like, configuring of shipping, tax, payment gateways etc. I actually think this is the wrong approach for Spree. Spree is almost exclusively going to be used by Rails programmers and Rails programmers are a lot happier configuring these kind of thing in code. I mean, that's just normal practice in Rubyland. Actually, I would count being able to configure my shipping rules with a bit of Ruby code a feature! Same goes for tax calculations. So I guess I would actually like Spree not to be a finished product in itself. Well maybe a finished product when you add some basic extensions. The extension system does seem really good and I hope that they use extensions for more core components (permutations, inventory control). For anything that might not quite fit a potential user's needs (like me!), so they can swap the default out and code their own.

(Update: Sean points out below that Spree's tax and shipping calculation to plug in as Ruby code. I think it's great that Spree is taking this developer-centric approach and not aiming to be a turnkey solution. Just to be clear, I think Spree is by far the most promising shopping cart system I've seen for a programmer to pick up and adapt for their client.)

So in the end, I realised that in the long-run, building a custom cart is going to be less of a hassle and more of a benefit than migrating to some other software that has it's own quirks and distinctive way of viewing the world. Actually, it has turned out not be as much work as I had expected. As I mentioned above, lots of the complexity of reusable cart software comes from having to provide enough flexibility and configuration UI. I get to ignore all this and essentially hard-code things like shipping rules and tax calculations. So I can quickly code up a shipping exceptions for certain products. I also don't need a sand-boxed template editor - I just use normal erb templates.

So I've probably put about 6 weeks of work into this and I already have the new site running. I think that's a pretty good advertisement for how fast you can build a fairly non-trivial application with Rails. I haven't implemented all of the features I have planned but it effectively does everything for my dad's business that Litecommerce did and a bit more. Building and deploying a Rails app from scratch is certainly a smoother process than it was a couple of years ago (more on that later).