PHP
  Home arrow PHP arrow Page 11 - Building an E-Commerce Site Part 3: Ca...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Building an E-Commerce Site Part 3: Catalogs and Shopping Carts
By: Ying Zhang
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 46
    2000-06-08

    Table of Contents:
  • Building an E-Commerce Site Part 3: Catalogs and Shopping Carts
  • Assumptions and Requirements
  • Overview of The Process
  • MyMarket Shopping Experience
  • The Product Catalog
  • The Shopping Cart
  • Payment Processing
  • Step 1: Database Changes
  • Step 2: Extracting the New Scripts
  • Step 3: General Script Changes from Tutorial 2
  • Step 4: New Shopping Scripts
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building an E-Commerce Site Part 3: Catalogs and Shopping Carts - Step 4: New Shopping Scripts


    (Page 11 of 12 )

    We've gone over the general script changes, let's go through the product catalog, shopping cart, and purchaseing scripts (collectively called the shopping scripts). These are in the brand new shopping directory.

    shopping/index.php

    The main shopping index page is our product catalog page. I will display information for the selected level category (remember our discussion way before about what to show when going throught he product catalog -- it is all here in this one file!). If no category is specified, it will start from the top level category.

    shopping/product_details.php

    This script simply loads up the details for the specified product and displays it on the screen. When a user is viewing the product details page, they can add the product to their shopping cart.

    shopping/cart_add.php

    This is a very simple script that adds the selected product to the shopping cart. This script is so simple that it does not even display anything, it just adds to the shopping cart and sends the customer back to where they came from.

    shopping/cart_view.php

    Viewing the shopping cart is a bit more work than adding to the cart. We have to show the customer the contents of their shopping cart. From here, the customer can choose to empty the shopping cart, to update the quantities of the items in the cart, or to make the purchase.

    shopping/purchase_now.php

    When the user decides to make the purchase, they will go to this script. At this point, we need to have the user log in so that we know who they are (up till this point, we didn't care). This screen prompts the user for their billing information, and to specify and special instructions or comments for the purchase. After the user submits their information, they are asked to confirm the order.

    shopping/complete_order.php

    The user has filled out their purchase information, and confirmed the order. It is the responsibility of this script to talk to the payment authorization party and try to process they payment. As described earlier, this is the tricky part that requires your attention. I only provide a template of what should happen.

    More PHP Articles
    More By Ying Zhang


     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT