views:

72

answers:

2

I am building a site using code igniter. I am developing a custom product catalog using php and mysql.

What is the best way to go about making those products purchaseable online. I thought about writing my own cart, but I am a little worried about how much time that would take.

Most carts I come across online are full fledge inventory systems carts / a whole web site basically. I want to be able to really have full control.

What do you think my better options are? Any advise is welcome!

+3  A: 

Don't be afraid of building your own. A shopping cart is a solved problem and there are many, many examples on the net. Just define your requirements carefully before you start: do items in the cart persist between sessions? What happens when an item in cart is no longer available for sale, etc.

RedFilter
+1 because shopping carts aren't all that hard to do, and everyone should write one from scratch at least once. OP can get bonus points for doing things in a nice abstracted (probably OO) way that he can reuse on future projects.
timdev
cool. thanks for the support. seems like everyone always seems to want you to use something prewrapped. and i hate it :) i love creating my own stuff. anyway, i guess the only hard part is the taking of the payment. whats the best way to go about it? the client i know has some sort of paymanent gateway. will i have to learn that api or something?
Roeland
For payment processing I recommend using an existing API, as there can be a lot of subtlety to the way each PP does things. You can wrap the API in your own abstraction layer though, so once you support more than one payment type, you are calling the same methods and just varying type.
RedFilter
is there any api's that are commonly used that i should look into?
Roeland
That entirely depends on the processor you use - Google is your friend here (as well as StackOverflow)...
RedFilter
makes sense, thanks alot :)
Roeland
A: 

If you want to have full control but be able to customize how users have that control, building it yourself is probably the only way to go. Depending on the amount of control you wanted to have, it could be very time consuming.

Search for shopping cart systems online and you can find lists like: http://webtecker.com/2008/04/22/8-best-open-source-shopping-cart-solutions/

Many have demos available that let you try before you download, and if you find something with all the features you want already, problem solved.

827