If you need a shopping cart because you want to sell something online, there are all kinds of open source (free) shopping carts that you can download and use. If you use PayPal you can even use their shopping cart. If you are doing it as a learning exercise, then you are probably still better off to download one and then rip it apart to figure how it works (and make it better if you have the time and interest. There are lots of sources. You could start with hotscripts.com.
chrishea
Nearly a Posting Virtuoso
1,428 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
Yes it is always better to see some of the existing open source php shopping cart scripts like for e.g opencart etc and learn from them.
chrisranjana
Junior Poster in Training
83 posts since Jul 2005
Reputation Points: 11
Solved Threads: 3