To access the contents, click the chapter and section titles.

CGI for Commerce: A Complete Web-Based Selling Solution new buy it
(Imprint: M & T Books)
(Publisher: IDG Books Worldwide, Inc.)
Authors: Selena Sol, Gunther Birznieks
ISBN: 1558515593


Introduction

Part One—Setting Up the Shopping Cart
Chapter One—Getting, Installing, and Running the Application
Downloading the Script
Unpacking the Application
Setting Permissions
Understanding Web Store Files and Directories
Installing on Windows 95/NT Web Servers
General Tasks for All NT Servers
Tasks Required to Make the Web Store Run on Netscape Commerce Server for NT
Tasks Required to Make the Web Store Run on Netscape Enterprise/FastTrack Server for NT
Tasks Required to Make the Web Store Run on the WebSite Server for NT
Tasks Required to Make the Web Store Run on Internet Information Server (IIS) For NT
Finding Perl
Running the Script
Using the Web Store
Summary
Chapter Two—Web Store Setup
Understanding the Setup File
Global File Location Variables
Database Definition Variables
Cart Definition Variables
Order Form Definition Variables
Store Option Variables
HTML Search Variables
Error Message Variables
Miscellaneous Variables
Using web_store_check_setup.cgi
Understanding the HTML Library
Taking Precautionary Measures
Using the “qq” Custom Quote Delimiter Feature
HTML Library Routines
Summary
Chapter Three—Focus on the HTML Store
Changes to the Setup File
Global File Location Variables
Understanding the Tags for Maintaining State
Bypassing Database Definition Variables by Encoding your Product Pages
Defining an Item
Cart Definition Variables
Order Form Definition Variables
Store Option Variables
HTML Search Variables
Error Message Variables and Miscellaneous Variables
Understanding Options
Simple Item Definition
Summary
Chapter Four—Focus on the Database Store
Customizing the Setup File
Global File Location Variables
Understanding Tags for Maintaining State
Defining Products with the Database Definition Variables and the Datafile
Cart Definition Variables
Order Form Definition Variables
Store Option Variables
HTML Search Variables
Error Message Variables
Miscellaneous Variables
Understanding Options
Summary
Chapter Five—Focus on the Query-Driven Database Store
Changes to the Setup File
Database-Related Changes to the Setup File
Cosmetic Changes to the Setup File
Creating the Queries
Query on a General Keyword
Query on a Single Product Category
Query on an Exact Value
Query on Price Range
Query on Date Range
Query on Multiple Text (String) Fields
Query for Multiple Fields of Different Types
Summary
Chapter Six—Focus on the Frames Interface
What Are Frames?
Setting up the Web Store to Use Frames
Summary
Chapter Seven—Focus on JavaScript and VBScript Extensions
How to Use JavaScript and VBScript
Events
Subroutines
JavaScript Changes to the Setup File
VBScript Changes to the Setup File
Chapter Eight—Order Processing Setup
Changes to the Outlet Order Form
Changes to the Setup File
Defining Shipping, Discount, and Sales Tax Calculation Order
All Calculations Done at the Same Time
Calculations Done at Different Times
Some Calculations Done After Submitting the Order Form
Defining Shipping and Discount Logic
Logic Where Shipping Is Independent of Any Form Variable
Logic Where Shipping Is a Percentage of the Subtotal
Logic Where Shipping Is Dependent on Shipping Type
Logic Where Shipping Is Dependent on Shipping Type and Zip Code
Logic Where Shipping Is Dependent on Measured Quantity
Shipping and Discount Logic Summary
Setting Up Mail-lib.pl
Windows NT and Windows 95 Server Considerations
Chapter Nine—Secure Shopping Setup
Using SSL and Other Secure Protocols
Setting up PGP For Emailing Orders Securely
Setting up a PGP Receiver (Private-Key)
Setting Up a PGP Sender (Public-Key)
Setting up the PGP Sender Files (Public-Key) on Your Web Server
Summary
Chapter Ten—Log Analysis
The Access Log
The Error Log
The Log Analysis Script

Part Two—Understanding the Nuts and Bolts
Chapter Eleven—The Main Script
Defining the Operating Environment
Decoding the Main Script Logic
Load Supporting Libraries
Read and Parse Form Data
Error Check Form Data
Deleting Old Carts
Assigning a Shopping Cart
Displaying the Frontpage
Adding to the Shopping Cart
Output Modify Quantity Form
Modify Quantity of Items in the Cart
Displaying the Delete Item
Deleting Items from the Cart
Displaying Products for Sale
Creating Dynamically Generated Product Pages from the Database
Displaying the Contents of the Cart
Handling File Open Errors
Displaying a Pre-designed HTML Page
Getting a Unique Cart Row Number with Counter
Updating the Error Log
Getting the Date
Displaying the Price
Making a Lockfile
Deleting a Lockfile
Formatting Prices
Chapter Twelve—The HTML Library
Creating a Product Page Header
Creating a Product Page
Defining the HTML Search Page Footer
Defining the Standard Page Header
Defining the Modify Form Footer
Defining the Delete Form Footer
Defining the Cart Footer
Defining the Bad Order Note
Defining the Cart Table Header
Defining the Display Cart Table
Defining the Cart Table Footer
Automatically Generating Hidden Fields
Displaying Results for No Hits Found in HTML Search
Defining the Body in the HTML Search
Chapter Thirteen—The Keyword Search Library
Defining the Operating Environment
Displaying the HTML Header
Performing the Search
Case 1: No More Files in Current Directory
Case 2: The End of the Search
Case 3: The File is a Directory
Case 4: The File Is Unwanted
Case 5: The File Must Be Searched
Displaying the Search Hits
FindKeywords Subroutine
GetNextEntry Subroutine
Chapter Fourteen—The Database Search Library
Global Variables
check_db_with_product_id Subroutine
submit_query Subroutine
flatfile_apply_criteria Subroutine
Case 1: Form Variable Contains No Search Value
Case 2: A Plain Numeric, Date, or String Comparison
Case 3: Full String-Based Keyword Search
Chapter Fifteen—The Order Library
Display_order_form Subroutine
Display_calculations Subroutine
Format_text_field Subroutine
Process_order_form Subroutine
Calculate_final_values Subroutine
Calculate_shipping Subroutine
Calculate_discount Subroutine
Calculate_general_logic Subroutine
Calculate_sales_tax Subroutine
Compare_logic_values Subroutine
Chapter Sixteen—The Log Analysis Script
Global Variable Definition
Main Routine
Display Search Results
Display Query Form
log_analyzer_query_form Subroutine
log_analyzer_return_header Subroutine
log_analyzer_return_footer Subroutine
Chapter Seventeen—The Setup Checking Script
Global Variable Definition and Setup
Perl Version and Current Working Directory
Check the Setup File and Load It
Check the Variables in the Setup File
Check_path Subroutine
HTMLMsg Subroutine
HTMLDie Subroutine
get_path_from_full_filename Subroutine
Chapter Eighteen—The PGP, Mail, and CGI Libraries
PGP Interface Library
PGP Library Variables
make_pgp_file Subroutine
E-Mail Library
Send_mail Subroutine
Real_send_mail Subroutine
CGI Library
Reading and Parsing Form Variables
Printing CGI Errors
Appendix A
Appendix B
Index