PHP
  Home arrow PHP arrow Page 11 - Building an E-Commerce Site Part 3: Catalogs and Shopping Carts
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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: starstarstarstarstar / 48
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT