PDA

View Full Version : New in Ecommerce


robert_allen1
23rd March 2009, 13:50
This is my first attempt at building a ecommerce / shopping cart system. I've been working with PHP and MySQL for a while now and feel pretty comfortable understanding the code, tho I'm still confused about OOP. My questions or help needed explanation is this.

I have already built a product catalog conisting of 1000+ products that several admins add - delete - update to the catalog. The front end and back end is complete and fully functional to our liking. How can I incorporate a shopping cart to this already existing database?

Thanks
PlanningYourTax (dot) com

peterstagg
25th March 2009, 16:33
There are many factors that you need to consider. You will need more than just a products catalogue. There are many off the shelf carts that already have a database set up when you install it so that it all runs smoothly. Unless you want to sell it as a viable product, really is your time invested properly in builing the cart instead of buying one and modifying it?

I use X-cart. It is not a free cart (About USD$200) but it is one of the better ones. It has all the functions required including the payment processor that you need in the cart. You would also need to store customer, sales and other things in the main database. I wanted to build one from scratch a few years ago, but found that the value of my time versus buying one was no contest. .
I would suggest that the cart would be cheaper to buy and modify time and money wise. The support you would need to do and the security and bug checking/coding would take you away from your real task of selling products.

richardjeaton
25th March 2009, 18:09
As has been said above, your question is a bit like asking "how long is a piece of string?" ;)

Without knowing how your existing catalogue hangs together then I can't really answer how easy it would be to add a shopping cart to it. There is also lots more than just the cart to consider - have you thought about how you will integrate with different credit card providers/payment mechanisms, handle new/existing customer accounts, different shipping bands/methods, different currencies, reporting functionality etc etc - the list goes on! Then there is reliablity and scalabity to consider :(

Sorry if this all sounds a bit negative but having spent over two years running the development of a bespoke ecommerce system then I have first hand experience of all the above!

Hope this helps

Richard

edmondscommerce
27th March 2009, 09:48
I would advise taking a look at some open source carts and seeing how they work. You can then try to lift the relevant code out and modify it to suit your system, or you might just be tempted to export your database into the open source cart.

If you aren't comfortable with OO PHP then take a look at osCommerce which is mostly procedural but still quite logical (until you start adding a load of contributions at which point the overall code quality can go down quite significantly).

mke
27th March 2009, 21:05
I'd go along with edmondscommerce as a general principle. I'd prefer Zen Cart to osC but then, I probably came to the game later. I'd most certainly eject the idea of proprietary. If you can handle OOP stay in command of your own future.

With the OS options there may be no need to lift the code, however. Why reinvent the wheel? Just link in as appropriate once you've set up the cart in its own subdirectory. Your DB is unlikely to be an exact match but you can use mysql, mysqli, PDO or a third party module to "marry" them.

MartCactus
28th March 2009, 02:28
I have already built a product catalog conisting of 1000+ products that several admins add - delete - update to the catalog. The front end and back end is complete and fully functional to our liking. How can I incorporate a shopping cart to this already existing database?


I think you've made a common mistake of developing the site and then hoping to be able to bolt on a shopping cart at the end.

Most shopping cart software comes in the form of an integrated package - product catalogue, shopping basket and connection to credit card payment gateway (plus many ancillary features). Its difficult to just bolt a basket onto an existing site, because the basket will need to requery the database to ensure that items in the basket are still available, that the customer hasn't "hacked" the prices in the basket etc. So the basket code would have to be tailored to the specified structure of the database... which makes obtaining a simple bolt on virtually impossible.

There are some very simple systems that are designed as bolt ons but they are normally very limited and tied to a particular payment gateway, and in most cases the basket page will be hosted by that gateway, so visual customization of it would be limited.

You're better to start with an off the shelf package (our area is ASP, but if you're into PHP there are loads out there) and then modify that if it doesn't quite do what you want.

mke
28th March 2009, 09:59
I stick with what I said earlier. There are only so many ways to structure a product database unless you've done something unusual. I'd be testing how well it marries before being persuaded to ditch my previous hard work in favour of a lock-in. MySQL is an incredibly efficient, configurable and fast database.

There are many alternatives but my guess is the most popular OS carts at the moment are Zen Cart and osCommerce, with Magento rapidly making its mark. They will have the largest available developer communities to help should you get into difficulties. They all run on MySQL and are written in PHP. Give one of 'em a try.