I will be honest and admit that I have no intention of redesigning the wheel.
There are a number of excellent packages available, specifically designed as comprehensive online stores. Most are extremely flexible and can be aligned to whatever requirements the storekeeper has in mind.
I make use of the facility created by AbanteCart. I also make use of the online payment facilities of PayGate. (Cards and EFT)
A demo version of the Abantecart shopping facility is available here: demo.abantecart.com
Feel free to contact me for more information on how to incorporate a shopping cart into your website.