		    THE ELECTRIC SHOPPING CART - SHOPPER4
			 SHOP4E.ZIP  November 12, 1997


Description:	Our company was seeking a way to conduct on-line sales
		using the Internet.  A 'Shopping Cart' program seemed
		the logical solution but the programs I considered had
		a number of drawbacks.

			1. Most incorporated Perl programming and/or
			   used Javascript.  Perl required use of a
			   server with a Perl compiler and Javascript
			   would only work on Java-enabled browsers.

			2. All made use of 'cookies' to retain caller
			   information.  I personally feel the use of
			   cookies to be an intrusion and assume others
			   would agree.  Many browsers have the ability
			   to reject cookies making the program unusable
			   to callers not accepting cookies.

			3. Many required 'hard-coding' of products and
			   prices within html pages.  We carry over
			   14,000 products with new ones being added
			   and outdated ones being deleted quarterly
			   not to mention price changes.  This would
			   have been a nightmare to maintain.

		SHOPPER4 is my solution to these problems.  The main
		module is launched from a simple html file and every
		thing runs strictly CGI from there.  I have included
		a somewhat generic SHOPPER4.HTM file which you may use
		or modify to suit your needs.  This would be used on a
		regular server.

		SHOPPER4 accumulates customer selections in a simple
		text file with a .TXT file extension.  The actual file
		name consists of a shortened rendition of the caller's
		IP address.  (A local call from address 127.0.0.1 would
		become 7001.TXT during the accumulation process.)  Once
		the order is completed and the caller submits it for
		processing the file extension is changed to .ORD and the
		numeric part of it contains a "-x" where 'x' is an
		incremented number just in case (a zillion to one chance)
		two callers happen to place an order from a similar IP
		address.  (When testing locally you'll see order files
		such as 7001-1.ORD, 7001-2.ORD, 7001-3.ORD, etc.)

		If you check your web site and find a .ORD file you'll
		know an order has been placed.  If you find a .TXT file
		it means the caller either bugged out without actually
		submitting the order or is currently placing one.

Utilities:	The .TXT files and .ORD files are strict ASCII text files
		containing readable but cumbersome data.  If you were to
		print out an order and send it to the shipping department
		they could eventually decipher it but would be prone to
		error.  Printing a .TXT file would only reveal the item#
		and quantity a caller was checking out before they had
		decided to surf elsewhere.

  LOOKUP4	Once you've viewed a .TXT file and determine the caller
		was considering:   "6526","12"  you're sure they wanted
		a price for 12 of whatever record #6526 happens to be.
		LOOKUP4 allows you to enter the item# (record#) and will
		display its data.

  PREPRNT4	These two utilities work in concert - first to display
  PRINTIT4	all current orders (.ORD files) allowing you to select
		which one to print and secondly (PRINTIT4) to display
		the form (shipping & payment information) as entered by
		your customer as well as the stock#, cost, quantity,
		and order total.  When displayed on your browser just
		press the 'PRINT' button (of your browser) for a neat
		easily read printout your shipping department will have
		no problem with!

Limitations:	The only current limitation is that field #3 of your
		database MUST be the price!  This is hard-coded into
		the cgi programs.  Your database size is only limited
		by available drive space.

		I guess a second limitation would be that a search for
		a product or stock# has to be at LEAST 2 characters in
		length.  This was a limitation when the program was first
		written and displayed all 14,000 items if a caller was
		to search for 'A'.  In this version screens are displayed
		with a max of 100 items per screen before proceeding to
		the next 100 - so if the surfer wants to sit there all
		night clicking the 'NEXT 100' button - it's their dime!
		(Is it really a quarter today?)

Required:	You must have CGI enabled on your server.

Notes:		The version I am using at our web site calculates price
		breaks above a certain quantity and calculates the order
		total accordingly.  This requires a custom database with
		breakpoints and break pricing as fields.  If you're
		interested in such a program contact:
			dave@dale-electric.com


INSTALLATION

		Unzip this file to c: or to whichever.  Be sure it's the
		ROOT directory of whichever drive you select.  It will
		create a SHOPPER4 directory there with a CGI subdirectory
		under it.

		The SHOPPER4 directory contains sample html files and 
		graphics.  The /SHOPPER4/CGI directory contains the files
		for your CGI or CGI-BIN directory.
		/SHOPPER4/UTIL contains the Lookup, Printit and some
		associated html files to launch them.


MAJOR FILES:	=========================================================

STOCK4.CSV	Locate in the CGI-BIN directory.

		This is your comma delimited data file.  Shopper4 is
		currently set up to accept 3 fields:

			Stock#
			Description
			Each price

		Each field must be separated by a comma and no
		quotation marks are to be used to enclose each field.
		In the sample STOCK4.CSV file you'll notice that the
		first item listed is 13" in length.  I found it easier
		to eliminate commas from a description than to compensate
		for quotation marks.

  !!!! ->	NOTE:	The alphabetic data in this file MUST be in
			capital letters.  The SHOP4 program converts
			caller input to caps to facilitate searching.

		You may use any name you find convenient in naming your
		actual data file but be SURE the filename used in
		SHOPPER4.INI matches the name you select.

=======================================================================

SHOPPER4.INI	Locate in the CGI-BIN directory.

		This is the initialization file and is used by all of
		the actual CGI programs.  DO NOT CHANGE THIS NAME!
		This same file is used by the utility files LOOKUP4
		and PRINTIT4.

Sample contents:

http://www.dale-electric.com
webmaster@dale-electric.com
1-518-793-4467
Stock4.csv
3
Stock#
Description
Each
4
McDonalds
Alliance
Discover
Master Card
Visa


Line #1		Your main Home Page address.
		  Use a single slash if you operate off of just one
		  server.  Our secure site is located of a separate
		  isolated server and this address entry assures that
		  callers are returned to our main un-secured server.
		  The single slash returns to you default home page.

Line #2		Your email address.
		  Any mail will be directed to you if a caller wants
		  more information before purchasing.

Line #3		Your fax# or 0-000-000-0000 if none.
		  Some people prefer to fax the order which appears
		  on their screen rather than transmit data over the
		  Internet.

Line #4		Comma delineated stock file name.
		  See description of STOCK4.CSV for more info.  This
		  filename is passed to each CGI program.  You may
		  name it as you please.

Line #5		Number of fields in each record of your database.

Lines #6 ... n	Field names to be displayed.
		  The field names entered here are the ones displayed
		  in the actual tables the caller will be viewing.

Line #n+1	The number of credit cards you accept.  The lines after
		  this entry are the credit card companies.  If you
		  DON'T accept credit cards for payment enter a zero
		  ('0') here and no credit card information will be
		  requested from the caller.

=========================================================================

SHOPPER4.HTM	Sample file to start the Shopper program if you have an
		unsecure server.  If you have a secure server in another
		location (IP address) you would rename this file to
		DEFAULT.HTM or INDEX.HTM depending upon the server's
		requirements.  See next file!

	==========================================================

PRESHOP.HTM	If you DO have a secure server, this is an example of how
		to launch you to it.  I didn't include the graphics files
		because you'll want to use your own anyhow.

==========================================================================

THANKS!	

	I want to thank Steve Crippen whom I've been in touch with at

		http://www.mustang.com

	for providing the Credit Card validation code incorporated in
	this program.

	HEY STEVE!  IT WORKS!


Dave Jaswaye
dave@dale-electric.com


		     <- - - - - -  B O N U S - - - - - ->

	An additional program - SEARCH4 - is included.  This is a simple
	search engine for customers who want to browse only.  SEARCH4.HTM
	will launch it.  SEARCH4.EXE should be in your CGI-BIN directory.
	It uses SHOPPER4.INI as its initialization file.  If a search item
	isn't found the caller's entry will be appended to NOTFOUND.LOG in
	your cgi-bin directory.  This file is automatically created if it
	doesn't exist.  The data it contains may provide information as to
	how to improve your database descriptions or even indicate items
	to add to your inventory since an interest exists.

		     <- - - - - -  B O N U S - - - - - ->



RELEASE NOTES:

	November 2, 1997	Found and repaired Error #63 - Input
				past end of file - in PRINTIT4.  A
				quote used as an inch symbol was
				causing the problem.


	November 9, 1997	Added code to allow Credit Card companies
				to be inserted in .INI file rather than
				being hard coded.

	November 12, 1997	Modified DOIT4 & SENDIT4 for "3 strikes
				you're out!" for callers entering bad
				credit card numbers more than three times.
				Their pre-order file is erased.  This won't
				stop hackers but it will slow them down.
				A warning message displaying their URL is
				also displayed inferring, "We know where
				you live!"

