Previous | Next Main Index:   Frames | No Frames
Document:   Frames | No Frames
 
 

Configure WebStore Setup File

 
WebStore's setup file, /Web_store/Databases/outlet.setup, contains variables specific to ws400CS.cgi.
 
Variables used by all scripts are located in /Web_store/ws_global.setup.
 
$default_setup_file = 'outlet.setup';
If you change the filename of outlet.setup, change the value of $default_setup_file located in the DEFINE VARIABLES section at the top of ws400CS.cgi to reflect the file's new name.
 
$default_setup_file is the setup file used if the URL pointing to ws400CS.cgi does not contain a name=value pair for store= in the query string:   ws400CS.cgi?store=outlet
 
 
General Settings
 
$data_file
$global_page_title
@company
$currency
$frontpage_file
$frameset_file
$duplicate_buttons
$button_1_txt - $button_5_txt
$add_cart_button
$return_link_url | $return_link_title
$email_link_url  | $email_link_title
 
Database of Items for Sale
 
@field_names
$category_fld_num | $item_fld_num | $price_fld_num | $image_fld_num
 
Color/Size Database Fields
 
%DD1_FIELDS | %DD2_FIELDS
 
Client Form Files
 
$password_file
$def_username | $def_password
$deny_access_url
 
$client_file
$retrieve_file
$client_delete_age
@client_fields
$usr_fld_name | $pwd_fld_name
$access_attempts
$admin_file_email
 
Product Resellers
 
$reseller_data_file
$reseller_file
$reseller_spreadsheet
%RESELLER_FIELDS
@reseller_include_files
$rsc_name_fld_num | $rsc_mail_fld_num | $rsc_urlpage_fld_num
 
Real-time Payment Processing
 
$merchant_file
 
Order Form
 
$country_file
$pre_form_file
%form_files
$demo_form_file
$minimum_order
%DISCOUNT
%SHIPPING
$tax | $tax_label
$mail_file | $join_list
 
Confirmation of Order HTML Page
 
$fax_signature
$delete_cart
 
Administrative & Confirmation of Order E-mail Messages
 
@email_numbers | %email_fields_array
$label_align
$item_subtotal
$email_subject
$message_columns
$message_divider
$pre_client_msg | $app_client_msg
$pre_admin_msg
$fax_email
%mail_order
 
Statistics
 
$log_file | $log_file_size | $log_delimiter
$stat_file | $stat_file_size | $stat_delimiter
$count_file | $start_count | $counter_label
 
Table Displays
 
$meta_tags
$background | $bgcolor - $alink_color
$SPC | $CELLPADDING
$border
 
Database Category and Search Result Tables
 
@vertical_numbers | @display_numbers | %fields_array
$table_border | $spc_width | $spc_height
$table_title
$table_width
$item_separator
$max_items
$display_category
 
Image Display
 
$img_spacing
$img_border | $img_padding
$outer_clr_width | $outer_img_clr
$inner_clr_width | $inner_img_clr
 
View/Modify Tables
 
@modify_display_numbers | %modify_fields_array
$modify_table_border | $modify_spc_width | $modify_spc_height
 
Font Control
 
$header_bkg_clr | $header_fnt_clr
$dsc_hr_bkg_clr | $dsc_hr_fnt_clr
$data_bkg_clr | $data_fnt_clr
$modify_bkg_clr | $modify_fnt_clr
$border_bkg_clr
$count_bkg_clr | $count_fnt_clr
 
Display Additional HTML
 
@include_files
 
&print_text_file('filename.txt');
$frontpage_trailer | sub_frontpage_trailer_html
$pre_category | sub_pre_category_html
$category_trailer | sub_category_trailer_html
$pre_view_modify | sub_pre_view_modify_html
 
Search Engine
 
$search_engine
$search_tips
$categories_desc | @categories
 
 
 
Top of Page
 
 
General Settings
 
 
$data_file = 'outlet.data';
$data_file is the | (pipe) delimited flatfile database containing the store's inventory of items for sale.
 
 
Index
 
$global_page_title = 'RDC Software';
$global_page_title is the <TITLE> text printed to HTML pages generated by WebStore and the table header text for the search engine.
 
$global_page_title is used in $email_subject, $meta_tags, and $table_title, in $email_subject of secondary form files, and in page header arrays in primary order form setup files and secondary form setup files.
 
 
Index
 
@company = (

  'RDC Software',
  'Route 3, Box 29B',
  'Grapeland, Texas 75844',
  'Phone: 936.687.2400',
  'Fax:   936.687.9057'

); # DO NOT REMOVE - terminates @company
@company is is used on the Confirmation of Order page, in $pre_client_msg, and in $pre_client_msg in secondary form files.
 
The first element of @company must be your business name.
The contents of @company is printed at the top of the Confirmation of Order page using the following format:
 
RDC Software
Route 3, Box 29B    Grapeland, Texas 75844    Phone: 936.687.2400    Fax: 936.687.9057
 
The business name is wrapped inside an <A HREF> tag using $return_link_url in the address listing at the top of the page and in the following phrase located at the bottom of the page:
 
Thank you for shopping at RDC Software
 
 
Index
 
$currency = '$';
$currency is the currency label for price values printed to the client's web browser and order e-mail messages.
 
$currency defaults to '$' (US currency) when the value of $currency is not defined or the value of $currency does not match a non-whitespace character.
 
Example settings:
$currency = '';    # Sterling Pounds
$currency = 'Lit.'; # Italian Lira
$currency = '$';    # US Dollars
 
 
Index
 
$frontpage_file = 'outlet_frontpage.html';
$frontpage_file is the store's front page containing links to database categories, category front pages, or expanded item information pages.
 
 
Index
 
$frameset_file = 'Frameset.html';
$frameset_file is the store's frame document.
 
WebStore is packaged with the following frame documents:
      Frameset.html
      Frameset_banner.html
WebStore loads Frameset.html when clients enter the store.
 
Setting $frameset_file = '' disables frames. WebStore loads $frontpage_file when clients enter the store.
 
 
Index
 
$duplicate_buttons = '1';
If $duplicate_buttons = '1', print buttons for View Cart, Order Form, and Front Page in the main frame housing the WebStore application.
 
If these buttons do not exist in an HTML document defined in a <frame src> tag of the frame document defined in $frameset_file, $duplicate_buttons must be set to '1'.
 
WebStore disregards $duplicate_buttons when $frameset_file = ''. All buttons are printed.
 
Setting $duplicate_buttons = '' disables printing of buttons when a filename is defined in $frameset_file, WebStore is running in frames.
 
 
Index
 
$button_1_txt = 'View Cart';     # Go to View/Modify table
$button_2_txt = 'Front Page';    # Go to Store's Front Page
$button_3_txt = 'Previous Page'; # Go to Previous Category or HTML Page
$button_4_txt = 'Order Form';    # Go to Order Form
$button_5_txt = 'Add to Cart';   # Add item to shopping cart
$button_1_txt through $button_5_txt contain the text displayed on submission buttons throughout WebStore.
 
$button_5_txt is also used in Add to Cart error messages
 
 
Index
 
$add_cart_button = 'ac.Add_to_Cart.gif:BORDER="0" WIDTH="63" HEIGHT="15"';
$add_cart_button is the Add to Cart button printed in each item's table row in database category displays and expanded item pages.
 
$add_cart_button may be colon delimited, listing an add to cart button image to the left of the colon and image attributes to the right of the colon.
 
WebStore assigns the image submit button's NAME and VALUE. If you include NAME or VALUE in the attributes, WebStore will not print any listed attributes.
 
The add to cart button image must be stored in the /Graphics sub-directory. If the image is not readable by the server, -r IMAGE.xxx, form submission buttons are printed to item rows using the text defined in $button_5_txt as the button's VALUE.
 
Accepted image types are .gif, .jpg, or .jpeg.
 
Accepted button image settings:
$add_cart_button = 'Filename:Attributes';

$add_cart_button = 'IMAGE.gif';   No Image Attributes
$add_cart_button = 'IMAGE.gif:';  No Image Attributes
$add_cart_button = 'IMAGE.gif:BORDER="0" WIDTH="64" HEIGHT="15"';
Setting $add_cart_button = '1' prints form submission buttons to item table rows using the text defined in $button_5_txt as the button's VALUE.
 
Setting $add_cart_button = '' disables printing add to cart buttons to item table rows. A single Add to Cart button is printed at the bottom of the page.
 
 
Index
 
$return_link_url = 'http://www.YourDomain.xxx';
$return_link_url is an absolute URL link printed at the bottom of all pages in WebStore whose format is:
http://www.YourDomain.xxx/AnyDirectories/Filename.html
$return_link_url targets "_top" to exit frames when a frames document is defined in $frameset_file.
 
Setting $return_link_url = '' disables the printing of $return_link_url. For the Confirmation of Order HTML page, WebStore will attempt to construct a value for $return_link_url using:
$return_link_url = 'http://'.$ENV{'HTTP_HOST'};
$return_link_title = 'Home Page';
$return_link_title is the absolute URL's description.
 
 
Index
 
$email_link_url = "WebStore\@YourDomain.xxx";
$email_link_url is an e-mail link printed at the bottom of all pages in WebStore.
 
Setting $email_link_url = '' disables the printing of $email_link_url.
$email_link_title = 'Mail to: '.$email_link_url;
$email_link_title is the e-mail link's description.
 
 
Index
 
 
Database of Items for Sale
 
 
@field_names = (

# Field Name     Dbase Field

  'Color',       #   0
  'Size',        #   1
  'Shipping',    #   2
  'Item',        #   3
  'Category',    #   4
  'Price',       #   5
  'Name',        #   6
  'Description', #   7
  'Image',       #   8
  'Id',          #   9

); # DO NOT REMOVE - terminates @field_names
@field_names is a listing of the database record structure present in the | (pipe) delimited product database, outlet.data, defined in $data_file. These field names are used to display column header text in View/Modify, Delete, Change Quantity, Order Form, and Reminder to client of what they ordered. They are also used as field labels when WebStore is configured to display vertical fields using @vertical_numbers.
 
The Color and Size fields are reserved for drop down list elements and can not be removed. Their location within @field_names can not be changed. The names Color and Size may be changed to describe the type of information you are listing in each drop down list element.
 
The field names assigned to the Color and Size fields in @field_names are used by WebStore to display <FORM> entry error messages to the client.
 
The Id field must always be the last element in @field_names and it's name can not be changed.
 
 
Index
 
$category_fld_num = '4';
$category_fld_num is the array index number or field number of the Category field within all database records of outlet.data.
 
NOTE: First element of an array is 0 (zero).
 
 
Index
 
$item_fld_num = '3';
$item_fld_num is the array index number or field number of the Item field or the item's inventory control number field within all database records of outlet.data.
 
When printing database category displays or search result pages, WebStore prints name anchors in each item's table row and constructs image filenames using the value present in the item field.
 
Spaces in the item field value are replaced with _ (underscore) in image filenames and name anchors.
Name Anchor:  <A NAME="Item_Number"></A>
Valid image types are .gif and .jpg. WebStore checks for the existence of .gif files first. If Item_Number.gif exists, WebStore never checks for Item_Number.jpg.
 
Example image filenames and image source tags:
   Item field value:    Item Number
   Image filenames:     Item_Number.gif
                        Item_Number.jpg

<IMG SRC="$graphics_url/Item_Number.gif" ALT="" BORDER=0>
<IMG SRC="$graphics_url/Item_Number.jpg" ALT="" BORDER=0>
If Item_Number.gif or Item_Number.jpg exists, WebStore uses the alignment attribute stored in the item's Image field to align the image to printed text. Image alignment defaults to left when no alignment attribute is present in the Image field. Images stored in the Image field are not used.
 
If Item_Number.gif and Item_Number.jpg do not exist, WebStore uses the contents of the item's Image field for printing images.
 
$item_fld_num also enables the use of &buy_item=ItemNumber and &view_item=ItemNumber in WebStore query strings.
 
Setting $item_fld_num = '' disables name anchor generation, the use of &buy_item=ItemNumber and &view_item=ItemNumber in WebStore query strings, and item image filename construction. WebStore never checks for the existence of Item_Number.gif and Item_Number.jpg. WebStore uses the contents of the item's Image field for printing all images.
 
NOTE: First element of an array is 0 (zero).
 
 
Index
 
$price_fld_num = '5';
$price_fld_num is the location of the Price field for each item listed in the store's database.
 
NOTE: First element of an array is 0 (zero).
 
 
Index
 
$image_fld_num = '8';
$image_fld_num is the location of the Image field for each item listed in the store's database.
 
NOTE: First element of an array is 0 (zero).
 
 
Index
 
 
 
Color/Size Database Fields
 
 
NOTE: First element of an array is 0 (zero).
Database Fields in outlet.data
0| 1| 2| 3| 4| 5| 6| 7| 8| 9
 Color | Size | Shipping | Item | Category | Price | Name | Description| Image | Id 
 
All items must contain a field for Color and Size in the store's database, outlet.data.
 
The Color field must be Field 0 (zero) for each item in the database.
The Size field must be Field 1 (one) for each item in the database.
 
Item's requiring Color drop down element:
Include the list number from %DD1_FIELDS in the item's Color field in the store's database. The list number corresponds to the item's list of colors required to construct the drop down element.
 
Item's requiring Size drop down element:
Include the list number from %DD2_FIELDS in the item's Size field in the store's database. The list number corresponds to the item's list of sizes required to construct the drop down element.
 
 
Color and Size examples used in item database, outlet.data:
0|0|Item|Category|Price|Name|Description|Image|Id
First Color list in %DD1_FIELDS - First Size list in %DD2_FIELDS

6|3|Item|Category|Price|Name|Description|Image|Id
Last Color list in %DD1_FIELDS - Last Size list in %DD2_FIELDS

|3|Item|Category|Price|Name|Description|Image|Id
No Color list - Last Size list in %DD2_FIELDS

6||Item|Category|Price|Name|Description|Image|Id
Last Color list in %DD1_FIELDS - No Size list

||Item|Category|Price|Name|Description|Image|Id
No Color list - No Size list
 
Index
 
%DD1_FIELDS = (

  '0'   =>  [ 'Blue',        'Black',        'Navy',        'Red' ],
  '1'   =>  [ 'Light Blue',  'Light Brown',  'Red',         'White' ],
  '2'   =>  [ 'Blue/Black',  'Green/Black',  'Pink/Black',  'Red/Black' ],
  '3'   =>  [ 'Cadetblue',   'Coral',        'Cornsilk',    'Crimson' ],
  '4'   =>  [ 'Dark Blue',   'Dark Cyan',    'Dark Gray',   'Dark Green' ],
  '5'   =>  [ 'Brown',       'Gray',         'Green',       'White' ],
  '6'   =>  [ 'Gold',        'Goldenrod',    'Gray',        'Green' ],

); # DO NOT REMOVE - terminates %DD1_FIELDS.
%DD1_FIELDS is a hash of arrays listing your color selections.
 
Each item that requires color definition using a <FORM> drop down list element will access one of the color lists in %DD1_FIELDS according to the value (0 - 6) stored in the item's Color field in the store's database.
 
This arrangement offers unlimited color sets for drop down list elements while keeping repetitive data to a minimum in the store's database.
 
If an item does not require the use of a color drop down list element, put nothing in the item's Color field in the store's database
 
NOTE: First element of an array is 0 (zero).
 
 
Index
 
%DD2_FIELDS = (

  '0'  =>  [ '15 x 32',      '15 x 34',      '15 x 36',      '15 x 38',
             '15 1/2 x 32',  '15 1/2 x 34',  '15 1/2 x 36',  '15 1/2 x 38',
             '16 x 32',      '16 x 34',      '16 x 36',      '16 x 38',
             '16 1/2 x 32',  '16 1/2 x 34',  '16 1/2 x 36',  '16 1/2 x 38',
             '17 x 32',      '17 x 34',      '17 x 36',      '17 x 38',
             '17 1/2 x 32',  '17 1/2 x 34',  '17 1/2 x 36',  '17 1/2 x 38',
             '18 x 32',      '18 x 34',      '18 x 36',      '18 x 38',
             '18 1/2 x 32',  '18 1/2 x 34',  '18 1/2 x 36',  '18 1/2 x 38',
             '19 x 32',      '19 x 34',      '19 x 36',      '19 x 38' ],

  '1  =>'  [ 'Small',    'Medium',  'Large',       'X-Large',      'XX-Large' ],
  '2  =>'  [ 'Small',    'Medium',  'Large',       'X-Large',      'XX-Large',  'XXX-Large' ],
  '3  =>'  [ 'Regular',  'Tall',    'Extra-Tall',  'Big Regular',  'Big Tall' ],

); # DO NOT REMOVE - terminates %DD2_FIELDS.
%DD2_FIELDS is a hash of arrays listing your size selections.
 
Each item that requires size definition using a <FORM> drop down list element will access one of the size lists in %DD2_FIELDS according to the value (0 - 3) stored in the item's Size field in the store's database.
 
This arrangement offers unlimited size sets for drop down list elements while keeping repetitive data to a minimum in the store's database.
 
If an item does not require the use of a size drop down list element, put nothing in the item's Size field in the store's database
 
NOTE: First element of an array is 0 (zero).
 
 
Index
 
Client Form Files
 
 
$password_file = 'Access.Restrict.Phone.setup';
$password_file is the forms setup file clients will use to gain access to WebStore. The client's order form file must exist in the /Databases/Clients/Restricted sub-directory or access to WebStore is denied.
 
WebStore adds .setup to the filename listed in $password_file if the filename does not end in .setup.
 
Set $password_file equal to the setup filename configured for the type of access fields you will be using:
Setup Filename                   Type of Access Fields

Access.Restrict.Password.setup   E-mail Address and Password
Access.Restrict.Phone.setup      E-mail Address and Phone Number
Setting $password_file = '' disables restricted access to WebStore. Client file access is controlled by $client_file.
 
 
Index
 
$def_username = "demo\@YourDomain.xxx";
$def_password = 'demo1234';
$def_username and $def_password are the default username and password given to clients to permit access to WebStore when WebStore is configured for restricted access (filename defined in $password_file).
 
When entering WebStore using $def_username and $def_password, clients must create and submit an account file before access to WebStore is permitted.
 
WebStore sets $def_username and $def_password = '' when no filename is defined in $password_file.
 
Setting $def_username = '' and/or $def_password = '' disables the use of the default username/password access method when WebStore is operating under restricted access. The client must have an order form file present in the /Databases/Clients/Restricted sub-directory in order to access WebStore.
 
 
Index
 
$deny_access_url = 'http://www.YourDomain.xxx/Web_store/Html/denied.html';
$deny_access_url is an absolute URL of an HTML page clients are directed to when client file access is denied when WebStore is configured for restricted access.
 
When the number of failed form submission attempts exceeds the value of $access_attempts, WebStore prints an HTML page directing the client to the web page defined in $deny_access_url.
 
 
Index
 
$client_file = 'Access.Client.Phone.setup';
$client_file is the forms setup file clients will use to modify their existing order form file in the /Databases/Clients sub-directory.
 
WebStore adds .setup to the filename listed in $client_file if the filename does not end in .setup.
 
When a setup file is defined in $password_file, the value assigned to $client_file is disregarded.
 
Set $client_file equal to the setup filename configured for the type of access fields you will be using:
Setup Filename                 Type of Access Fields

Access.Client.Password.setup   E-mail Address and Password
Access.Client.Phone.setup      E-mail Address and Phone Number
Setting $client_file = '' disables the use of client order form files for retrieving client order form field data.
 
 
Index
 
$retrieve_file = 'Client.Retrieve.Phone.setup';
$retrieve_file is the form setup file WebStore will use to retrieve a client's form file in the /Databases/Clients sub-directory when a client goes to the order form. The client may also select the method of payment when %form_files is configured for multiple order forms.
 
WebStore will not print the form defined in $retrieve_file when going to the order form when the existence of the client's form file was previously verified and %form_files is configured for a single order form.
 
WebStore adds .setup to the filename listed in $retrieve_file if the filename does not end in .setup.
 
Set $retrieve_file equal to the setup filename configured for the type of access fields you will be using:
Setup Filename                   Type of Access Fields

Client.Retrieve.Password.setup   E-mail Address and Password
Client.Retrieve.Phone.setup      E-mail Address and Phone Number
Setting $retrieve_file = '' disables printing of a client retrieval form when going to the order form. WebStore will print the default order form defined in %form_files. The client may switch order forms by selecting an alternative payment method near the top of the default order form.
 
 
Index
 
$client_delete_age = '24';
$client_delete_age limits the age of client order form files stored in the /Databases/Clients or /Databases/Clients/Restricted sub-directory.
 
Example settings:
$client_delete_age = '6'     6 months
$client_delete_age = '12'   12 months
$client_delete_age = '18'   18 months
$client_delete_age = '24'   24 months
Setting $client_delete_age = '' disables age deletion of client files from the /Databases/Clients or /Databases/Clients/Restricted sub-directory.
 
 
Index
 
@client_fields = (

# Form Name        Field Label

  'nameFirst',     #  First Name
  'nameLast',      #  Last Name
  'name',          #  Name
  'company',       #  Company
  'addr1',         #  Address 1
  'addr2',         #  Address 2
  'addr3',         #  Address 3
  'city',          #  City
  'province',      #  Province
  'state',         #  State
  'country',       #  Country
  'zip',           #  Zip/Postal Code
  'phone',         #  Phone
  'fax',           #  Fax
  'email',         #  E-mail Address
  'shpNameFirst',  #  Ship First Name
  'shpNameLast',   #  Ship Last Name
  'shpName',       #  Ship Name
  'shpAddr1',      #  Ship Address 1
  'shpAddr2',      #  Ship Address 2
  'shpAddr3',      #  Ship Address 3
  'shpCity',       #  Ship City
  'shpProvince',   #  Ship Province
  'shpState',      #  Ship State
  'shpCountry',    #  Ship Country
  'shpZip',        #  Ship Zip/Postal Code
  'shpPhone',      #  Ship Phone
  'shpIns',        #  Shipping Instructions
  'password1',     #  Password
  'ship',          #  Shipping Method
  'tax',           #  Sales Tax

); # DO NOT REMOVE - terminates @client_fields
@client_fields is a listing of the record structure present in the client order form files.
 
@client_fields is a listing of form field names used in all forms in WebStore.
 
The client selected shipping method and sales tax ('ship' and 'tax') are added to the client's record when an order is submitted.
 
WebStore adds two fields to the client's record after the tax field:
Order Reference   1010815114601967
Date              2001 08 15
The Order Reference number is written to client files who have placed an order with your WebStore.
 
 
Index
 
$usr_fld_name = 'email';
$usr_fld_name defines the field name of the user id field in the client's order form file, defined in @client_fields.
 
 
Index
 
$pwd_fld_name = 'phone';
$pwd_fld_name defines the field name of the password field in the client's order form file, defined in @client_fields.
 
The value of $pwd_fld_name is dependent on the access file you defined in $client_file or $password_file when operating in restricted mode. Set the field name in $pwd_fld_name according to the following:
Filename defined in               Variable Settings
$client_file or $password_file

Access.Restrict.Phone.setup       $pwd_fld_name = 'phone';
Access.Client.Phone.setup

Access.Restrict.Password.setup    $pwd_fld_name = 'password1';
Access.Client.Password.setup
WebStore uses the client's e-mail address and phone number (or password) to construct the account filename:
susan@cgicentral.net~4096872400.client
 
Index
 
$access_attempts = '3';
$access_attempts is the number of form submission attempts allowed for the %ClientAccess and %ClientRetrieve forms in $client_file or $password_file when operating in restricted mode.
 
$access_attempts is a whole number, greater than 1, defaulting to 3 if mis-configured.
 
 
Index
 
$admin_file_email = '';
When $admin_file_email = 1, send client file update e-mail to the store administrator.
 
Setting $admin_file_email = '' disables client file update e-mail to the store administrator.
 
$admin_file_email is disabled in the WebStore distributions.
 
 
Index
 
 
Product Resellers
 
 
$reseller_data_file = 'Resellers.data';
$reseller_data_file is the | (pipe) delimited flatfile database of resellers.
 
Depending on the values assigned to $reseller_file and $reseller_spreadsheet, reseller records may be automatically added to the reseller database by WebStore or manually added to the reseller database using WS Editor.
 
The setup file for editing the reseller database using WS Editor is Resellers.data_editor.setup.
 
WebStore maintains a second reseller database, Resellers.data.readonly, which is accessed for reseller retrieval when Resellers.data is locked in write mode.
 
The read only filename is constructed by appending .readonly to the filename defined in $reseller_data_file:
$read_file = $reseller_data_file.'.readonly';
WebStore updates the read only database when a file size difference exists between Resellers.data and Resellers.data.readonly. File update occurs when WebStore is accessed with a name=value pair for rsc= in the query string and the reseller database is not locked in write mode.
 
WebStore generated reseller codes consist of the reseller's country code, state code (00 for foreign countries), and the cart reference number defined when a reseller application is submitted:
Reseller code example:  31953-990806010728290

                         319 = United States
                          53 = Texas
             990806010728290 = Cart reference number
Links pointing to your WebStore from a reseller's html document must include the rsc= name=value pair for the reseller's code in the query string:
http://www.YourDomain.xxx/Web_store/ws400CS.cgi?rsc=31953-990806010728290
When an order is submitted and a valid reseller code is present, the reseller receives an abbreviated e-mail copy of the submitted order with credit card fields omitted. E-mail to the store's administrator contains the reseller's database record prefixed to the order.
 
Setting $reseller_data_file = '' disables all reseller functions in WebStore. No reseller order e-mail message is generated.
 
 
Index
 
$reseller_file = 'Form.Reseller.setup';
$reseller_file is the forms setup file clients will use to apply for product reselling.
 
WebStore adds .setup to the filename listed in $reseller_file if the filename does not end in .setup.
 
Reseller form submissions are added to the reseller database defined in $reseller_spreadsheet.
 
Setting $reseller_file = '' disables the addition of reseller form input records to the reseller database defined in $reseller_spreadsheet.
 
 
 
Index
 
$reseller_spreadsheet = 'Resellers.data.txt';
$reseller_spreadsheet is the | (pipe) delimited flatfile database of reseller applications ($reseller_file form submissions).
 
The filename 'Resellers.data.txt' is WS Editor's spreadsheet filename for the reseller's database, Resellers.data, defined in $reseller_data_file.
 
The WS Editor setup file for the reseller spreadsheet is Resellers.data.txt_editor.setup.
 
Using WS Editor and the setup file for the reseller spreadsheet, you may delete or modify reseller applications before merging the spreadsheet into the reseller database, Resellers.data.
 
After verifying the records in the spreadsheet, switch to the WS Editor setup file for the reseller database, Resellers.data_editor.setup.
 
WS Editor will detect the presence of the reseller spreadsheet and switch you to the spreadsheet conversion page where you may merge the records from the spreadsheet into the reseller's database, Resellers.data.
 
Setting $reseller_spreadsheet equal to the same filename defined in $reseller_data_file will write reseller application records directly to the reseller database. Resellers become active immediately.
 
Setting $reseller_spreadsheet = '' disables the addition of reseller form input to a database. Resellers must be added to the reseller database using WS Editor.
 
 
Index
 
%RESELLER_FIELDS = (

# KEY      Field Name   E-mail Label        Dbase Field

  '00' => ['rsc',       'Reseller Code'],   #   0
  '01' => ['name',      'Name'],            #   1
  '02' => ['company',   'Company'],         #   2
  '03' => ['addr1',     'Address 1'],       #   3
  '04' => ['addr2',     'Address 2'],       #   4
  '05' => ['city',      'City'],            #   5
  '06' => ['state',     'State'],           #   6
  '07' => ['country',   'Country'],         #   7
  '08' => ['zip',       'Zip/Postal Code'], #   8
  '09' => ['phone',     'Phone Number'],    #   9
  '10' => ['fax',       'Fax Number'],      #  10
  '11' => ['email',     'E-mail Address'],  #  11
  '12' => ['urlpage',   'Web Page URL'],    #  12

); # DO NOT REMOVE - terminates %RESELLER_FIELDS
%RESELLER_FIELDS is a listing of the record structure in the reseller database defined in $reseller_data_file and $reseller_spreadsheet.
 
The field names in %RESELLER_FIELDS are a listing of the form fields present in %Form in the reseller's secondary form file, Form.Reseller.setup.
 
Field names changed in %Form in Form.Reseller.setup must be changed in %RESELLER_FIELDS. Field names in %Form which do not match a field name in %RESELLER_FIELDS will not be written to the reseller database.
 
Fields removed from %Form which exist in %RESELLER_FIELDS or optional fields not completed by the reseller applicant will store a blank field in the reseller database.
 
The field names 'rsc', 'name', 'email', 'state', and 'country' can not be changed.
 
The field named 'rcs' must be database field 0, $RESELLER_FIELDS{00}.
 
 
Index
 
@reseller_include_files = (

#  'include.reseller.txt',
#  'include.reseller.category_page.txt',
#  'include.reseller.item_page.txt',

); # DO NOT REMOVE - terminates @reseller_include_files
@reseller_include_files is a listing of template text files used to display reseller information when a value is present for rsc=, r_data=, and WebStore is configured for resellers.
 
Reseller information is retrieved from the reseller database for substitution into these template text files.
 
The contents of the files listed in @reseller_include_files are substituted into HTML pages by adding hidden text tags using the file's name:
<!--include=include.reseller.txt-->
Whitespace is not allowed in reseller include hidden text tags. WebStore ignores hidden text tags which contain whitespace.
 
Hidden text tags are replaced with the associated file's contents.
cart_id= substitution occurs on the contents of substituted files.
 
Files listed in @reseller_include_files must be located under WebStore's /Html sub-directory or any sub-directory you may create under /Html.
 
When files are placed under sub-directories, the sub-directory must be listed in the hidden text tag:
<!--include=subdir/include.reseller.txt-->
When a file does not exist under the /Html directory, WebStore writes a FILE NOT FOUND message in the file's associated hidden text tag:
<!-- FILE NOT FOUND:  include.reseller.txt -->
Substitution of the reseller's information into the contents of the reseller text file is accomplished using hidden text tags containing the field names present in element zero of %RESELLER_FIELDS:
<!--name=rsc-->          Reseller Code
<!--name=name-->         Name
<!--name=company-->      Company
<!--name=addr1-->        Address 1
<!--name=addr2-->        Address 2
<!--name=city-->         City
<!--name=state-->        State
<!--name=country-->      Country
<!--name=zip-->          Zip/Postal Code
<!--name=phone-->        Phone Number
<!--name=fax-->          Fax Number
<!--name=email-->        E-mail Address
<!--name=urlpage-->      Web Page URL
Field names ending in email, case insensitive, are converted to MAILTO tags.
 
Field names ending in img or imgexist, case insensitive, are converted to IMG SRC tags. If present, the reseller's referring web page URL is wrapped around the IMG SRC tag in an HREF anchor which targets top.
 
Field names ending in url, urlexist, and urlpage, case insensitive, are converted to HREF tags which target top.
 
WebStore disables SSI tags detected in HTML documents.
 
Setting @reseller_include_files = () disables file includes.
 
 
Index
 
#                            Dbase Field    Field Label

$rsc_name_fld_num    = '2';  #  2           Company
$rsc_mail_fld_num    = '11'; # 11           E-mail Address
$rsc_urlpage_fld_num = '12'; # 12           Web Page URL
$rsc_name_fld_num, $rsc_mail_fld_num, and $rsc_urlpage_fld_num are the field numbers in the reseller database for the reseller's name, e-mail address, and web page URL respectively.
 
$rsc_name_fld_num can be set to the reseller's name field or company field.
 
When a client enters your store from a reseller advertising web page and a valid reseller code exists in a name=value pair for rsc= in the query string, WebStore uses the contents of these reseller database fields to replace the values for $return_link_url, $return_link_title, $email_link_url, and $email_link_title when printing links at the bottom of WebStore parsed pages.
 
A reseller code is valid when it exists in the reseller database.
 
The reseller's web page URL is also used to print an href anchor near the top of the confirmation of order HTML page, pointing back to the reseller's advertising web page.
 
 
Index
 
 
Real-time Payment Processing
 
 
$merchant_file = '';
$merchant_file is the merchant configuration file for the real-time payment processor you are using. WebStore supports the following real-time processors:
Processor Name    Merchant Configuration Filename
--------------    -------------------------------

Authorize.Net     merchant.authorizenet.cfg
Surepay           merchant.surepay.cfg
The Processor Name must be included in the Merchant Configuration Filename. For example, Surepay must be included as part of the filename for the Surepay merchant configuration file, merchant.surepay.cfg. The Processor Name is case insensitive in the Merchant Configuration Filename.
 
Merchant configuration files are located in the /Library sub-directory.
 
Protect your merchant file from viewing:
 
 
Modify the variables in the merchant configuration file you are using. Variables included in the configuration file are your merchant ID, merchant password, etc.
 
Setting $merchant_file = '' disables real-time payment processing.
$merchant_file is disabled in the WebStore distributions.
 
 
Index
 
 
Order Form
 
 
$country_file = 'outlet.state_country.setup';
$country_file contains two hash of arrays, %states and %countries, used to perform required fields checking of state and country form inputs on all froms used in WebStore.
 
%states and %countries are also used for calculating sales tax when $tax = '1'.
 
WebStore adds .setup to the filename listed in $country_file if the filename does not end in .setup.
 
 
Index
 
$pre_form_file = 'Pre.OrderForm.setup';
$pre_form_file is the form setup file WebStore will use to determine the client's sales tax liability, shipping method preference, payment method preference, etc.
 
WebStore adds .setup to the filename listed in $pre_form_file if the filename does not end in .setup.
 
WebStore will not print the form defined in $pre_form_file prior to printing WebStore's order form when only one order form file is defined in %form_files and the values requested by this form were previously determined during client form file verification.
 
 
Index
 
%form_files = (

# Not using real-time processing:
#
# KEYS     zero - Filename                        one - Label
  '10' => ['OrderForm.CreditCard.setup',         'Credit Card'],
  '11' => ['OrderForm.Check.setup',              'Personal Check - US citizens'],
  '12' => ['OrderForm.FaxMail.setup',            'Fax or Mail your order'],
# '13' => ['OrderForm.CreditFaxMail.setup',      'Credit Card, Fax, or Mail'],
# '14' => ['Demo.OrderForm.CreditFaxMail.setup', 'Demo: Credit Card, Fax, or Mail'],


# Authorize.Net real-time processing:
#
# '20' => ['OrderForm.AuthorizeNet.CreditCard.setup',      'Credit Card'],
# '21' => ['OrderForm.AuthorizeNet.Check.setup',           'Personal Check - US citizens'],
# '22' => ['Demo.OrderForm.AuthorizeNet.CreditCard.setup', 'Demo Authorize.Net: Credit Card'],


# Surepay real-time processing:
#
# '30' => ['OrderForm.Surepay.CreditCard.setup',      'Credit Card'],
# '31' => ['OrderForm.Surepay.Check.setup',           'Personal Check - US citizens'],
# '32' => ['Demo.OrderForm.Surepay.CreditCard.setup', 'Demo Surepay: Credit Card'],
# '33' => ['Demo.OrderForm.Surepay.Check.setup',      'Demo Surepay: Personal Check'],

); # DO NOT REMOVE - terminates %form_files
%form_files is a hash of arrays listing WebStore's order form setup files.
 
WebStore is packaged with pre-configured sets of order form setup files. One set of files is included for those who do not use real-time processing. One set of files is included for each real-time processor WebStore supports.
 
Information is available for configuring order form files.
Additional information is available for Authorize.Net and Surepay form files.
 
Element zero of each array lists an order form's filename in the /Databases sub-directory. WebStore adds .setup to the filename listed in element zero if the filename does not end in .setup.
 
Element one is the order form's descriptive label.
 
WebStore sorts the arrays in %form_files by their KEYS, in ascending order. The array with the least significant KEY becomes the default order form printed by WebStore when no payment method is selected by the client. $form_files{10} is the default order form in the WebStore distributions.
 
 
Index
 
$demo_form_file = 'Demo.OrderForm.CreditFaxMail.setup';
$demo_form_file is the order form setup file used when $demo = '1' in ws_global.setup or when the first URL accessing WebStore contains a name=value pair for demo:  ws400CS.cgi?demo=Y
 
The demonstration form file may be used to modify and test an order form setup file using demonstration mode while WebStore processes orders using the order form(s) defined in %form_files: