Home arrow PHP arrow Page 9 - Building an E-Commerce Site Part 3: Catalogs and Shopping Carts

Step 2: Extracting the New Scripts - PHP

This is the third and final article in a three-part series dealing with using PHP 4 and MySQL to make a comprehensive e-commerce storefront solution. This article covers the shopping cart, payment processing, and database engine considerations, among many other topics. Full source code included!

TABLE OF CONTENTS:
  1. Building an E-Commerce Site Part 3: Catalogs and Shopping Carts
  2. Assumptions and Requirements
  3. Overview of The Process
  4. MyMarket Shopping Experience
  5. The Product Catalog
  6. The Shopping Cart
  7. Payment Processing
  8. Step 1: Database Changes
  9. Step 2: Extracting the New Scripts
  10. Step 3: General Script Changes from Tutorial 2
  11. Step 4: New Shopping Scripts
  12. Conclusion
By: Ying Zhang
Rating: starstarstarstarstar / 50
June 08, 2000

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Okay, we've got our user table, let's make screens for the user to log in and log out. Download the mymarket3.tar.gz file and extract it into your web root directory. Note that this replaces the files from the first tutorial.

IMPORTANT NOTE: If you have made modifications to the files from the first tutorial, please make a backup copy and store it somewhere else. The files in mymarket3.tar.gz will overwrite any changes you made to the files from the first tutorial.

If you have made modifications to the files from the first tutorial, please make a backup copy and store it somewhere else. The files in will overwrite any changes you made to the files from the first tutorial.

We do the same drill from the first and second tutorial. Download the mymarket3.tar.gz file and extract it into your web root directory. For example, if your web root is in

/home/httpd/html

type


$ cd /home/httpd/html $ tar -zxf /tmp/mymarket3.tar.gz

Assuming that you've downloaded mymarket3.tar.gz into /tmp. Now, open up the file application.php and change the $CFG->wwwroot and $CFG->dirroot paths to match your server configuration.

Directory Structure

You should already be familiar with the contents of the mymarket directory, looking carefully, you will see a new directory called shopping.


drwxrws--- 3 apache web 1024 Jun 1 08:46 admin/
drwxrws--- 2 apache web 1024 Jun 1 02:05 images/
drwxrws--- 2 apache web 1024 Jun 1 09:18 lib/
drwxrws--- 2 apache web 1024 Jun 1 09:18 shopping
drwxrws--- 3 apache web 1024 Jun 1 11:20 templates/
drwxrws--- 3 apache web 1024 Jun 1 11:20 users/
-rw-rw---- 1 apache web 2074 Jun 1 14:58 application.php
-rw-rw---- 1 apache web 1488 Jun 1 12:21 index.php
-rw-rw---- 1 apache web 2427 Jun 1 14:51 login.php
-rw-rw---- 1 apache web 1040 Jun 1 11:19 logout.php

The shopping directory contains all the scripts that have to do with displaying the product catalog, viewing product details, the shopping cart, and purchasing. That is where most of the new scripts reside. We will now go over the script changes.



 
 
>>> More PHP Articles          >>> More By Ying Zhang
 

blog comments powered by Disqus
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 



© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap

Dev Shed Tutorial Topics: