views:

125

answers:

4

I'm about to start building my first ecommerce site in Rails. I've coded other projects in Rails, but never done ecommerce.

I'd love to hear from people about the best plugins, gems, tricks, tips, or anything else that they found useful in building this sort of site in Rails.

Thanks all!

+1  A: 

Using or at least taking a look at how they've solved some solutions at spree might be a good start.

Damien MATHIEU
Thanks to everybody for all these answers. They all turned out to be important components. But since I'm now basing my app on the Spree open source project, it felt like Damien deserved the nod.
MikeH
+1  A: 

You also should take a look on the Active Merchant pdf made by peepcode.com!

jpemberthy
+1  A: 

You probably want to be using Active Merchant, so pick one of the supported gateways. I personally recommend BrainTree. The main thing you absolutely want to know are the requirements of the PCI data security standards. And unless you really, really know what you're doing and are willing to take on the legal liabilities involved, you want to let the gateway handle storage of credit cards. Usually you can send a card number to them, and they'll pass back a unique ID that you can safely store instead. That's really the way to go.

Alternatively, you might consider Google Checkout. There are a certain class of e-commerce problems that are much better solved by outsourcing them to Google. You typically have lower liability with Checkout than with your own custom e-commerce solution, and in many cases, that's a big deal. Plus Google will go to bat on your behalf in the case of credit card chargebacks, which is quite handy.

Bob Aman
+1  A: 

First, watch the free railscasts on activemerchant: 144 and 145.

There is a very straightforward model structure that you should stick to if you can: user has_many :orders, order has_many :items, order has_many :transactions. Activemerchant actually makes it very easy to not worry about the details.

Jonathan Julian