View Full Version : Making a BASIC shopping cart system

09-11-2011, 12:32 PM
What I have found allot is people build their eCommerce site around a shopping cart system.

What I want to do is build a shopping cart system around my website.
I do not want a hectic shopping cart system, all I want is a simple "Add to cart" <A> link on the product page that will add the item to the cart, and a cart page that simply lists what they have added to their cart, and how much the total ammount of their cart is.

I've looked at numerous tutorials on the internet, but have found many of them deeply flawed in code, and I am wondering if someone could tell me the best way about going with what I want to do?

09-11-2011, 06:56 PM
Do you have a secure site (https)?

If not, you'll be leaving your site for all of the CC transaction.
Tell us who your credit card merchant will be.


09-11-2011, 08:34 PM
Using Session variables will probably be the best idea. Sessions are unique (supposed to be) between clients, and are alive for the length of time the client browses your site actively, plus a timeout period. I would look into that.

msleim is right, if you don't have an https enabled site, you'll have to use outside merchant tools like paypal etc. to take credit card transactions. This might be your intention anyway, but it's something you should be aware of.

09-11-2011, 08:35 PM
Knowing who your credit card merchant is important in how we answer your post.
Each CC merchant has different requirements, and offers different PHP code examples.