#################################################################
# This is the only part of any script that needs to be
customized
# For full info on setting up this file, please
see
# http://www.hostahoy.com/cartmanual
#
$ordernumber = "1234567";
Te
ordernumber variable is REQUIRED for all scripts. If you do not know your
order number, contact support@hostahoy.com. If you are a current Hostahoy
customer, use your Hostahoy username as the order number.
$script_location="http://yourdomain.com/cgi-bin/cart/cart.cgi";
Script location is the full URL to the cart.cgi file
(including the http://). Do not use https:// here if you have a secure server
because running the entire script in a secure environment increases server load
dramatically as well as decreases performance.
$domain = "yourdomain.com";
The
full domain name including any subdomain such as "www". The script can only be
called by the domain stated here. For example, if you have
"www.domain.com" then calling the script by "http://domain.com" (without the
www) will return an error.
$path_to_stores =
"/home/yourusername/homes/httpd/html/stores";
This
is the directory that will hold the data for the Web store(s). A "path" is the
location of a file according to the server. There is no "http" involved.
The $path_to_stores requires the absolute path from the root of the
server. There should be no trailing slash at the end.
$web_path = "/stores";
The
$web_path variable is not an absolute path, but rather the path from the html
(or html) directory of the directory that will hold the data for the Web
store(s). This begins with a "/" and should be the same as the last part of the
$path_to_stores variable.
$date_path = '/usr/bin/date';
$mailprog = '/usr/lib/sendmail';
These variables are the absolute paths to the date and
sendmail program on your server. They should be correct as is but you can
check with your system administrator if you are not sure.
NOTE: This file uses associative arrays.
These arrays begin with a "%". The format is quite simple: %ARRAYNAME =
('key1','value2','key2','value2');
Just make sure you
surround each key and value with single quotes and end each line with a
semicolon.
# Global Discounts (optional)
%QUANTITYDISCOUNTS =
('2','.10','5','.20','10','.30','15','.40');
%NUDGE =
('cuistid1','15','cuistid2','10');
This
can be set if you wish to give customers discounts based on the number of
orders they have already placed. In the "%QUANTITYDISCOUNTS" array you
would enter the number of orders followed by the discount percentage for that
quantity. In this example, a customer with 5-9 orders would get a discount of
20% (must be entered as .20).
The
"%NUDGE" array accounts for orders that customers may have already placed that
will not appear in the processed_orders.txt database text file. In this
example, the customer with the ID "custid1" would start off with 15 orders, so
even if no previous orders appear in the processed_orders.txt database they
would still get the 40% discount. The customer with ID "custid2" would start
off with a 30% discount and if they were to place 5 more orders, they would
then receive the 40% discount automatically.
# Custom Discounts (optional)
%CUSTOMDISCOUNTS = ('Enter Your Reseller ID','resellers.txt');
The
custom discount feature searches the additonal customer information fields that
you set up in your basic configuration for a description match. From
there, it compares the value of the field entered by the customer with the
entries in the text file specified seaching for a match. If it does find
a match it uses the discount specified in the text file's second argument (say
what?)... this is an advanced feature so it can be best demonstrated than
explained:
If
you have a list of resellers that get discounts based on their reseller ID (not
customer ID), then this is what you would do:
1)
In the basic administration area, setup an additional customer information
field asking for the resellers ID like "Enter Your Reseller ID".
2)
Create a text file consisting of the reseller IDs and the discounts they will
get - one entry per line. This must be in the following
format:
texttomatch [tab] discount (in decimal format) [hard
return]
Example:
jsmith
.25
jdoe
.20
bjones
.30
3)
Modify this customize.pl file and make sure the %CUSTOMDISCOUNT array is not
commented. The first part of the array
%CUSTOMDISCOUNTS = ('Enter Your Reseller
ID','resellers.txt');
is
the exact text you have entered in the additional customer information. The
second part of the array
%CUSTOMDISCOUNTS = ('Enter Your Reseller ID','resellers.txt');
is
the name of the file that the cart will use to search for the vaules entered by
the customer. The cart will look for an exact - case sensitive match of
the variable on the left hand side of the tab then apply the discount on the
right hand side of the tab. So if a user entered "bjones" as their
reseller ID in this example, they would receive a 30 percent (.30) discount on
their entire order before shipping and taxes.
The
text file MUST be placed in your admin directory for the store.
# Custom Submit Buttons
# Files MUST be named using all lower case like below:
#
"go","get_order","order","order_check_out","do_not_order","edit_order",
#
"edit","enter","continue","place_order","enter_secure_area"
# %CSB = ('STORE
USERNAME','/stores/buttons/alt_buttons');
$csb_ext =
".gif";
You
can replace all the Hostahoy Shopping Cart standard grey box submit buttons
with your own icons. To do this, uncomment the %CSB array and enter your
username as the key and web path to the directory where the images are stored
as the value. If you have multiple stores that are using their own set of
images, simply create a key/value for each one in the %CSB array. Note that
file names MUST match the names in the lines above exactly. If the images
are ".jpg" rather than ".gif", change the $csb_ext variable.
The
Hostahoy Shopping Cart is now linked to exact areas of the manual for quick
reference. If you choose to duplicate the manual on your site, you can
change this URL to link to your copy of the manual.
# Authorize.Net Required Variables
$authorizenet30 =
"https://secure.authorize.net/gateway/transact.dll";
$authorizenet30cr = "https://secure.authorize.net";
%LOGIN = ('YOUR_USERNAME','AUTHORIZENET_USERNAME');
This
is where you enter the AuthorizeNet info if you are using their service to
process your secure payments. For full setup info on this, please see
our page in this
handbook.
# CardServices International Required
Variables
$linkpointHTML =
"https://secure.linkpt.net/cgi-bin/hlppay";
$linkpointHTML
= "https://secure.linkpt.net/admin/LOGIN/vlp";
%STORENAME =
('cartusername','linkptusername');
#################################################################