Setting It Up

   

Setting up this shopping cart is fairly straightforward, but keep in mind the initial setup is not secure, and you must also customize the checkout form so that it correctly interfaces with your credit card authorization service. This shopping cart has been designed with the Authorize.net (www.authorize.net) credit card authorization service in mind, but may work with other credit card authorization services.

Before using this script, you should thoroughly test it!

The general layout of the installation is shown in Table 5-1:

Table 5-1. Directory Structure for the Shopping Cart

FOLDER

CONTAINS

Top Level

  • cart.php

  • checkout.php

  • finishorder.php

  • admin directory

  • images directory

  • include directory

Admin Directory[a]

  • admin.php

  • dbmanage.php

Images Directory

  • add.gif

  • remove.gif

  • any images for products

Include Directory

  • cart_inc.php

[a] This directory must be password protected!

Once you have the scripts installed and your database set up, the next thing you need to do is go into the dgmanage.php page and add a category. Once you have created a category, you can create a few items. If you add a picture to the item, place the image file in the directory that you defined for IMAGE_URL.

Once you have a minimum of one category and one item, you can test out the script.


   
Top


Advanced PHP for Web Professionals
Advanced PHP for Web Professionals
ISBN: 0130085391
EAN: 2147483647
Year: 2005
Pages: 92

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net