hehe... but it's fun to write your own scripts! :-)
Seriously though Mike, you might want to check those 'readymade' things out to get more ideas if you still want to do it yourself.
Make sure you have a very good plan before you begin coding, in the case of a shoppingcart you definately need to know what the script should be able to do before you write any code. It's a tedious job, but if you don't do it, you'll just end up writing code, then re-writing the code because you forgot something, then re-writing it again because you hadn't forgotten after all, and by the time you are half-way, you're so bored with re-writing that you stop coding alltogether :-)
So make plan. A good plan.