Introduction To Ecommerce Using PHP and MySQL - Page 2

Introduction To Ecommerce Using PHP and MySQL - Page 2
PHP Programs
Now that you have all your databases ready, you can start writing the PHP programs or scripts that will run the ecommerce part of your website. For example you will need programs to dynamically generate the pages of your online catalog. You will also need programs that will run your shopping cart.

Online Catalog
Online product catalogs can be simple or complex depending on your needs. You will at least want an Index page that lists all of your products and an information webpage for each product. Of course it would not be very efficient to hand code each of these webpages. And since you already have the information stored in your Product Database, all you need now is PHP scripts that will access the information from the database and generate a webpage that displays this information along with a buy button.

Shopping Cart
When your customer clicks on a buy button, the shopping cart script takes over. This script keeps a record of the items your customer adds or deletes from his cart and updates the Cart Database accordingly. Then when your customer views his shopping cart the script will access the database and dynamically generate a webpage that displays the items in his cart.

Order Completion
Depending on your website the steps to finalize an order will vary. However, you will probably want a script that calculates the tax, shipping, coupons, discounts, etc. It will also access the Customer Database for the customer's mailing address and credit card information. Finally the script will generate a webpage which displays all this information.

When the customer clicks "Confirm Order" another script updates the Order Database with the information about the current order. It can also generate a confirmation webpage and a confirmation email.

This is just a rough outline of a simple ecommerce solution for a website. There are numerous ways to create an online catalog and shopping cart. The number of programs, databases and tables will depend upon the complexity of your website.

← Back






This site needs an editor - click to learn more!



RSS
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map





Content copyright © 2023 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.