At the heart of it, an e-site website is still a website, albeit a website with a different purpose. If you want to learn how to create e-commerce websites, look at e-commerce websites. Look at the good, the bad, and the ugly. Web pages give information. An e-commerce website gives information about products.
Creating your own checkout and payment schemes is foolish unless you have years of development experience, and good liability insurance. Fortunately there are companies like Paypal and Google checkout that make it relatively painless to create a shopping cart. They provide the code, you utilize it. They handle the transaction and liability, you pay a small fee to not deal with the transactions and liability. Check out the Google Checkout API, or the Paypal API for examples on how to use their code.
based on what I have observed of your abilities at this point, you do not yet have the ability to understand how to do this. Build basic websites. Build web pages just to try out a technology and then throw them away. You have a lot to learn yet.