<## ************************ KOOLCAT.HTS VERSION 1.26 ************************ This document and the source code contained herein are the property of Htmlscript Corporation. Copyright 1997, All rights reserved. Use of this document and the included source codes is subject to the terms and conditions of a specific license agreement executed with Htmlscript Corporation. If you have not executed a license with Htmlscript Corporation, you may *not* use this document and the source codes herein. For information regarding licensing, contact: Htmlscript Corporation 2629 Ariane Drive San Diego, CA 92117 619-490-2570 sales@htmlscript.com Use of this document and the source codes contained herein, without entering into a valid license agreement with Htmlscript Corporation, constitutes copyright infringement, unfair trade practices, and a violation of the law. This notice may not be removed from this document. ##> <## url of koolcat ##> <## Normalize the arguments ##> <## the complete URL passed to plug-ins ##> <## SYSTEM CONFIGURATION SECTION ##> <## directory name under configured hts data dir where data files reside ##> <## format pattern to display money (US format) ##> <## END SYSTEM CONFIGURATION ##> <## the following variables are set for convenience and are really constants that never change ##> <## Names of data files ##> <## file structures ##> <## The first order of business is to make sure that the program is running under a version of htmlscript which supports it. ##> Message From KoolCat

Version Problem

KoolCat needs htmlscript v2.99 to run! Please upgrade to it by browsing to the link below:


Htmlscript General Store
(Implemented with KoolCat!) <## The next thing that needs to be done is check, if the user is submitting an order, to see if they have already done so once. ##> <## write information to license file (if necessary) ##> Duplicate Order Found

Duplicate Order Found

A duplicate order was found. Please do not attempt to re-submit your order, as you may be charged more than once for your purchase. If this is a problem, please contact your system administrator as soon as possible. <## this derives the base URL up through the script name ##> <## in the case that the server supports https, set a URL ##> <## the following routine is used to simply load memory variable ##> <## The following subroutine is used to sum up the products that have been placed in the basket so far. ##> <## following are the subroutines to let the user know that we have received their order and where we record it to the data file ##> <## This is to verify that the user entered enough information to process their order. The first step is validating the e-mail address. Remember that the first character, and the last, may not be the "@" character, however, the address must contain the character somewhere. ##> <## This routine is used to validate the customer's credit card number. SOME BACKGROUND: all credit card numbers follow a strict checksum, and can be verified mathematically. ##> <## remove all non numeric characters ##> <## odd ##> <## even ##> <## Odd number of digits ##> <## even ##> <## if information provided to process an order was invalid, an error flag is set and a list of invalid information is created. ##> Name"> Shipping Address"> City"> State"> Zip Code"> Country"> Email address (must be valid)"> Credit Card"> Credit Card Number (must be valid)"> Expiration Date"> Credit Card Name"> Shipping Method"> "> <## the same conditional is used as before because if the information given was invalid, arg4 is changed and the order form is brought up again. ##> <## find if upsold product info is complete ##> <## accept EQ "sold" ##> <## If all information was filled out completely ##> <## Now we calculate the grand total ##> <## This means: get shipping rates ##> <## get shipping charge ##> <## (calculations are done "along the way.") ##> <## first arrange a table of product quantities ##> <## arrange a list of product weights and prices that corresponds to the list of ordered items ##> <## calc taxable total ##> <## calc shipping ##> <## now, find sales tax for customer's state ##> <## now update the order file as necessary ##> <## product was upsold ##> <## arrange upsell information for order in arrays ##> <## get the title of the upsold item ##> <## create array of product titles from catalog file ##> &[callvalue] &[callvalue] Thank You Dear New Customer,

First of all, we would like to thank you very kindly for your investment in our software and we welcome you to the family of Utopia Originator users. For your safety, and the safety of your personal credit, we require credit card users to review the license agreement and authorize their credit card use by actual signature. If you are satisfied with your purchase, please print this invoice to your local printer, sign it, and fax it to us at 407-540-9444. Your pending order will be processed and shipped as soon as we receive it. If we do not receive your fax, we will fax an invoice for you to sign at the number you've given us on this order.

Utopia Mortgage Software & Computers
8175 Main St.
Bokeelia Island, Fl. 33922
800-585-1053 Sales
216-274-9120 Support
Order Number: Order Date:

Ship To: Bill To:



,







,





Credit Card Number: Expiration Date:
Name On Card: Credit Card Type:

Ship Via:

Product Code Quantity Title Description Price Extension
 
         
         
         
        Subtotal
        Sales Tax
        Shipping
        Total
By Signature it is acknowledged that I, the purchaser have read, understand and accept the terms of the software license agreement and terms of use agreement as a condition of installing this product.

Furthermore, by signature below, we agree to pay the total amount shown on this
invoice to the card issuer according to the card issuer agreement.


Purchaser:________________________________ Date Signed:________________________

<## now, check to see if email needs to be sent to the order department ##> <## send email to order dept ##> &[bodyord]


&[callvalue] &[callvalue]
<## allthere EQ "1" ##> <## arg5 EQ "done" ##> <## get upsell percentage ##> <## caluculate max price of upsell product, arrange valid products in a list, and calculate list length ##> <## arrange list of ordered products ##> <## check if product is already in basket ##> <## keep products in basket from being upsold ##> <## check product prerequisites ##> <## verify upsell cantidate's prerequisites ##> <## now join the two lists where they agree ##> <## get a random number that will correspond to the product in the list that is to be upsold ##> <## get the price of the random product that will be upsold ##> <## uslistlength GT 0 ##> <## pctg GT 0 ##> <## errmsg EQ "" ##> <## This is how the thank you screen is called in the case that the customer was not eligible to receive an upsold product ##> <## This causes the "notdone" loop to re-iterate and bring up the thankyou screen ##> <## Here is where, if eligable, the customer may add the upsell item to their order ##> &[callvalue] &[callvalue] Special Offer

Special Offer


If you act now you can receive the following product at special discounted price of only - a savings of off the regular price!

I'll Take It!

"> "> "> "> ">



&[callvalue] &[callvalue]
<## notdone EQ 1 ##>
<## arg4 EQ "commit" ##> <## This is where the data files are updated to contain the new list of products in the "shopping basket", including any additional information that there might be, and itemcount is updated. ##> <## find if product is already in basket ##> <## update qty in basket ##> <## found EQ 1 ##> <## extrainfo EQ "no" ##> <## find if all information was filled out ##> <## mark prompts with extra info ##> <## check NE "" ##> &[callvalue] &[callvalue] <EVAL title>

<## flag EQ "type" or "none" ##> <## flag EQ "prompt" ##> <## flag EQ "option" ##>
">
"> ">
  "> ">
 

&[callvalue] &[callvalue]
<## allthere EQ "no" ##>
<## extrainfo EQ "yes" AND infogathered NE "yes" ##> <## first, put current contents of cart file into tempfile ##> <## now put the new contents into the tempfile ##> <## write extra info 4 marked prompts ##> <## extrainfo EQ "yes" AND infogathered EQ "yes" ##>
<## action EQ actionadd ##> <## multprods EQ "" ##> Choose Product

Choose A Product to Remove


Select Prompt Displayed Option(s) Specified Quantity
 
     

<## multprods EQ "yes" ##> <## multprods NE "yes" ##> <## action EQ actionremove ##> <## Set Return Path ##> <## updating basket file ##> <## following is the subroutine that either shows the user what they have ordered OR shows them their order and gets the credit card, shipping, etc. information. ##> <## Here's where quantities in the basket file are updated ##> <## arg5 EQ "update" ##>

Order Form

Order Form

Basket Contents

Basket Contents

<## create a table of products in the basket ##>

<## find out colors for table ##> <## load product variables ##>
Remove Item Quantity Description Price/ Ea. Total
">  
         
         
      SUBTOTAL   SUBTOTAL
Basket Empty!

Basket Empty!

Your shopping basket is now empty!

Basket Emptied!

Basket Emptied!

Your shopping basket is now empty!

<## arg4 EQ "contents" ##> <## display the order form ##> <## arrange list of shipping methods/rates ##> <## create arrays of shipping information ##> <## arrange list of ordered items and quantities ##> <## arrange a list of product weights that corresponds to the list of ordered items so that a list of shipping charges may be calculated ##> <## calc shipping ##>

Ship To:
Name: ">
Email Address:
(required)
">
Company Name: ">
Phone Number: ">
Fax Number: ">
Street Address: ">
City (or province): ">
State:
Zip Code: ">
Country: ">
 
Bill To:
Same as Ship To information
Name: ">
Email Address:
(required)
">
Company Name: ">
Phone Number: ">
Fax Number: ">
Street Address: ">
City (or province): ">
State:
Zip Code: ">
Country: ">
 
Billing Information:
Credit Card:
Credit Card Number: ">
Expiration Date: ">
Name On Card ">
Shipping Method:
:


<## arg4 EQ "order" OR arg4 EQ "contents" ##> <## following is the subroutine that lets the user browse the catalog. ##> <## user has opened catalog ##> <## category ##> <## specific product ##> <## gets quantity variable ##> <## this is where the product and all pertinent information is displayed ##> &[callvalue] &[callvalue]
&[cattitle]

&[cattitle]

&[title]



Price:

Quantity In Basket:
Quantity In Basket: none

">
Product Code:
Shipping Weight:
Quantity:

<## for backwards compatability ##>


<## now make sure that the customer can go back from whence they came ##>
&[callvalue] &[callvalue]
<## arg6 NE "" ##> <## here, the entire catalog is displayed ##> Catalog Contents &[callvalue] &[callvalue]

Complete Catalog Contents



[&[category]]
Price:
Terms of Use, Warranty, Copyright
License Agreement

<## for backwards compatability ##>

&[callvalue] &[callvalue]
<## arg5 EQ "all" ##> <## here, the user views the category they selected ##> <EVAL title> &[callvalue] &[callvalue]




Price:

<## for backwards compatability ##>


&[callvalue] &[callvalue]
<## arg5 NE "" ##> <## this is the start of the catalog. ANALOGY: table of contents. The catalog search begins to narrow. ##> &[title] &[callvalue] &[callvalue]

&[title]


<## for backwards compatability ##>



&[callvalue] &[callvalue]
<## The user can choose to search the catalog for specific products. The search is performed on the description, title, type, and category fields. ##> <## At this point, the search results are displayed ##> Search Results &[callvalue] &[callvalue]

Search Results

Search Word:
Number of matching entries:




Price:


&[callvalue] &[callvalue]
<## arg5 EQ "results" ##> <## here is where the customer may enter a search string ##> Search Catalog

Search Catalog


Enter Search Word: ">
<## arg4 EQ "search" ##> <## This is the start of the applet ##> Choose A Catalog &[callvalue] &[callvalue]

&[callvalue] &[callvalue]
<## morethanonecatalog ##>
<## arg2 EQ "" ##> <## check to see if the user already has a basket file ##> <## if new user, add basket filename to list ##> <## establish a basket uniuqe to user ##> <## Now create a memory variables file unique to the user. The only persistant field contained in this file is the secretcode, which is used for security reasons in called scripts. ##> <## take out zeros and dots from remote address ##>
&[callvalue] &[callvalue] <EVAL title>

&[callvalue] &[callvalue] <## arg2 NE "" ##>