Welcome to Islandnet.com  
Locally owned and operated since 1993  
Live Help
LOG IN:  Username:    Password:    

Basket Configuration File

The shopping basket config file is normally named "basket.cfg" and must be located in the "ms2" subdirectory in your account. It is a plain text file that contains one setting/value pair per line. Each setting is a three or four character UPPERCASE code. Each value is either a number or a string of text. Strings must be enclosed within double quotes. For example:

   TAX "BC,7.5|ON,8"
NOTE: If you want to have more than one "store" in your account then you'll need to use different config files. To use a config file named "mystore.cfg", for example, you must add "?store=mystore" to all your inBASKET cgi-bin references, like this:

GET Method requests

   <a href=/cgi-bin/ms2/guest/basket?store=mystore>View Your Basket</a>

POST Method requests

   <form method=post action=/cgi-bin/ms2/guest/basket>
   <input type=hidden name=store value=mystore>

Now we'll describe each setting and what it means. Note that every setting must be present in your config file.

MIN "string"
This setting defines a minimum order value and tells the shopping system how how to handle it. If the subtotal is less than the minimum order amount, the shopping system can either prevent the customer from proceeding to the order form, or it can automatically adjust the subtotal to meet the minimum order.

MIN "10,adjust"
Defines a minimum order of $10 and tells the system to automatically adjust the subtotal if necessary.
MIN "20"
Tells the system to simply not allow a customer to place an order until their subtotal is at least $20.
MIN 0
Indicates that there is to be no minimum order.

DIS "string"
This setting defines one or more global discounts to apply. Each discount is based on the subtotal amount, so for example you could have one discount for orders over $100 and a different one for orders over $500.

DIS "0,10"
Specifies a global discount of 10% for any order over $0 (ie: it applies to any order).
DIS "100,5"
Specifies a discount of 5% for any order over $100.
DIS "100,5|250,10|500,15"
Specifies three discounts: %5 on orders over $100, 10% on orders over $250, and 15% on orders over $500.

COU "string"
This is the UPPERCASE two-character country code where your "store" is located. This should reflect the location that product will be shipped from and is used in calculating taxes.

COU "CA"
Indicates your store is in Canada.
COU "US"
Indicates your store is in the United States.

TAX "string"
This lists each province or state where you are licenced to do business along with the sales tax rate in each of those places. The system will calculate sales tax when the shipping destination is in one of these locations. Provinces and states must be expressed using their UPPERCASE two-character abbreviations.

TAX "BC,7.5"
Will calculate PST of 7.5% on orders destined for BC.
TAX "BC,7.5|CA,8.25"
Will calculate PST of 7.5% on orders destined for BC, and an 8.25% state sales tax on orders heading to California.
TAX 0
Calculates no provincial or state sales taxes at all.

GST number
Defines the GST rate. If you remit GST then set this to 5. If you don't want to calculate GST at all, set this to zero.

GST 6
Where appropriate, the system will calculate 5% GST.
GST 0
The system will not calculate GST at all.

HST number
Defines the HST rate. HST is a tax that you must collect and remit if you are selling product to customers in Newfoundland, New Brunswick, or Nova Scotia (and your store is Canadian of course). It replaces both GST and PST. If you collect GST then you must also collect HST. Set this to fifteen to calculate 15% HST or zero to never calculate HST.

HST 14
Where appropriate, the system will calculate 14% HST.
HST 0
The system will not calculate HST at all.

SHP "string"
This lists zero or more customer selectable shipping options. Each option in this list consists of a brief description (which will appear in a pull-down list that the customer can choose from), a minimum shipping amount, a base amount, and a shipping rate.

The actual shipping charge is calculated by multiplying the subtotal by the shipping rate and adding the base amount. If this charge is less than the minimum shipping charge it is adjusted up.

If the shipping option ends with ",w" then the shipping rate is multiplied by the total "weight" instead of the subtotal. "Weight" is an arbitrary numeric value you can assign to each product.

If you replace the base amount with a file name (it must begin with a slash) then the base rate will be extracted from the file using either the weight or the subtotal as a key. The format of the file is two numbers per line separated with a space. The first number is the weight or subtotal to search for and the second is the shipping charge for that weight or subtotal. For example:

1 1.60
2 2.40
3 3.20
Examples:

SHP "Basic shipping,6,3,.20"
Specifies that there is only one shipping option which is calculated at $0.20 per dollar (of the subtotal) plus a $3 base amount. If this is less than $6, adjust it up to $6.

SHP "Basic Shipping,,5|UPS Overnight,,12"
This gives the customer two shipping options. Basic shipping costs them $5. There is no minimum and nothing extra based on the subtotal. UPS overnight shipping costs them $12.

SHP "Basic Shipping,,10,1,w"
The customer will be charged $10 plus $1 for every unit of "weight".

SHP "Via UPS,,/ms2/upsrates,,w"
The shipping charge will be looked up in the "ms2/upsrates" file using the weight as the key.

SHP "Shipping,,/ms2/shiptab"
The shipping charge will be looked up in the "ms2/shiptab" file using the subtotal as the key.

SHX "string"
This setting lists additional shipping charges that should be applied based on the shipping destination. It is similar to the SHP setting in format, except there is one extra field which appears after the description and before the minimum amount. The extra field is a four character string consisting of a country code and a province/state code. This value can also use the '*' wildcard. For example, "CA*" matches a shipping destination anywhere in Canada while "USCA" matches a shipping destination of California only. This option also supports the use of external files for shipping tables in the same manner as SHP above.

SHX ",CA*,0,0,0|US Shipping,US*,0,6,0|Foreign Shipping,*,0,15,0"
This will add no extra shipping charges as long as the destination is within Canada. If the destination is in the US then it will add $6. It will add $15 for any other destination.

OLD number
This setting specifies how old a shopping basket can get (in minutes) before it is considered "stale" and is deleted. This is necessary or your account will eventually fill up with old baskets that haven't been emptied or processed.

OLD 120
Deletes baskets older than two hours.

DEL number
This setting must be either 0 or 1. It controls whether or not the system will remove items from the basket when their quantity is zero. Normally you would set this to 1, it is intended for specialty setups.

CUR number
This setting must be either 0 or 1. It controls whether or not the customer will be allowed to view the total in an alternate currency. If you enable this you should note that exchange rate information fluctuates considerably and that the value presented to them may not match the actual exchange value at the time their purchase is processed.

DCO "string"
This setting controls whether or not the shopping basket contents will be displayed on the order form page. Set this to zero if you don't want the basket contents displayed, or "top" to display it above the order form, or "bottom" to display it below the order form.

DCO "top"
The basket contents will be displayed on the order form page ABOVE the order form.

FRQ "number"
Controls whether or not fractional quantities are allowed. Set this value to 0 if you want all quantities to be whole numbers, or to 1 if you want customers to be able to specify fractional quantities.

TMP "string"
Specifies the name of a directory where basket files will be stored while a customer is shopping. This directory MUST exist and it should be empty of other files. If you are using more than one store in your account, this variable should be set to different values for each store.

LOG "string"
Specifies a log file name. The system will record information about the life cycle of each basket in this file. The filename is relative to your root directory and may contain time codes.

LOG "ms2/basket.log"
The system will log information to the "basket.log" file in your "ms2" subdirectory.

LOG "ms2/%Y-%m.log"
The system will use a file name based on the year and month (eg: 1999-01.log).

REQ "string"
Specifies a list of HTML form variables on the order form that are required to be filled in before the customer can submit the order. Any form values not listed here are optional and may be left blank.

REQ "Name,Address,Email"
Requires that the fields called Name, Address, and Email are filled in.

MSG "string"
Specifies a file containing HTML code that will be displayed within the message area of the shopping basket display. This is useful for highlighting special features or important information. The filename is relative to your root directory.

MBC "string"
This is the HTML color code to be used for the background of the message area in the basket contents display.

MBC "00ff00"
Specifies a bright green background.

CCP "string"
Specifies a template file to be used for processing credit card orders.
We have pre-built template files for: Authorize.net and Beanstream. Template files can be made for pretty much and credit-card company out there. The file needs to be saved in your "MS2" directory, and called whatever this variable is with a .cct extension.

Example: if the entry in basket.cfg looked like CCP "beanstream" then the file beanstream.cct would be in the ms2 directory and look something like:

https://www.beanstream.com/scripts/process_transaction.asp?merchant_id=MERCHANT_ID&trnOrderNumber={~bid}
&errorPage=https://www.beanstream.com/secure/USERNAME/error.asp&trnCardOwner={~name}&trnCardNumber={~ccnum}
&trnExpMonth={~ccmon}&trnExpYear={~ccyear}&ordName={~name}&ordEmailAddress={~email}&ordPhoneNumber={~phone}
&ordAddress1={~address}&ordAddress2={~address}&ordCity={~city}&ordProvince={~province}&ordPostalCode={~postal}
&ordCountry={~country}&trnAmount={~tot}&trnType=P&ref1={~bid}&ref2={~country}&ref3={~province}
All on one line

Example: if the entry in basket.cfg looked like CCP "authorizenet" then the file authorizenet.cct would be in the ms2 directory and look something like:

https://secure.authorize.net/gateway/transact.dll?x_login=yourlogin&x_tran_key=yourtrankey&x_Amount={~tot}
&x_card_num={~ccnum}&x_Exp_Date={~ccexp}
All on one line

If the company you'll be using can be configured, it should send the shopper back to the following URL:

http://www.islandnet.com/cgi-bin/ms2/guest/basket/end/{~bid}/{~country}/{~province}
If you need help writing a template file, please contact inbasket@islandnet.com.

If you aren't using a credit card processing company set this to zero.

MID "string"
Only needed if you are using a credit card processing company. This setting specifies your "Merchant ID" or "Username" at that company.

ICI "string"
Specified your i-Check ID number. If you don't have an i-Check account then set this to zero. If this is non-zero and the payment method equals the ICM value then the customer will be passed to i-Check for final processing.

USD number
Specifies whether prices in this store are in US Dollars or Canadian dollars. If you are using US dollar amounts then set this to 1, otherwise set this to 0.

CAN "string"
This specifies an URL to jump to if the customer clicks on any CANCEL button.

CON "string"
This specifies an URL to jump to (by default) when the customer clicks on any CONTINUE SHOPPING button.

HDR "string"
This specifies an HTML file to display as the header or top of any generated pages. It is relative to your root directory.

FTR "string"
This specifies an HTML file to display as the footer or bottom of any generated pages. It is relative to your root directory.

FRM "string"
This specifies an HTML file to display (sandwiched between the header and footer) when the customer decides to place the order. It contains the actual order form and must have certain form values.

SEC number
If set to 1, the order form will be presented via the secure server. Set this to 0 to disable the use of the secure server (not recommended).

END "string"
This specifies an HTML file to be displayed at the end of a purchase.

END2 "string"
This specifies an HTML file to be displayed at the end of a purchase when an online payment service has been used. This allows you to have an alternate final display for credit card or i-check transactions.

STO number
This setting controls whether or not customer information entered on the order form is stored ("remembered"). If a customer returns and places another order later on, their order form will already be filled out for them. Set this to zero to disable this, otherwise set it to the number of days that the information should persist. The information is stored in a cookie on the customers own computer.

STO 0
Disable this feature.

STO 30
Store customer information for up to 30 days.

REC number
Controls whether or not a recipt is sent to the customer. Set this to one to send a receipt or zero to not send one.

MTO "string"
This is the email address that completed orders should be emailed to.

MFR "string"
This is the email address that any generated email messages should use in the From: line. This applies to receipts sent to the customer. Note that this does not apply to any email receipts generated by your credit card processing company.

MSU "string"
This specifies the Subject: line that should appear in the mail message the shopkeepers receive.

MBT "string"
This specifies a text file that contains a template for the body of the emailed order the shopkeepers receive. This file is a plain text file that should contain a placeholder wherever you want a form value to appear. For example, if the string {name} appears anywhere in this file it will be replaced with the value of the "from" form field. You can include environment variables (such as the remote IP address), i.e. {REMOTE_ADDR}. A copy of the basket contents will be appended to this when the email is sent.

MSU2 "string"
The same as MSU except it applies to the message that gets sent to the customer as a receipt. If undefined it will use the value of MSU instead.

MBT2 "string"
The same as MBT except it applies to the message that gets sent to the customer as a receipt. If undefined it will use the value of MBT instead.

BCO "string"
This specifies the label that should appear on the "Continue Shopping" button.

BPO "string"
This specifies the label that should appear on the "Proceed With Order" button which takes the customer from the basket contents to the order form.

BRE "string"
This specifies the label that should appear on the "Recalculate" button.

BCA "string"
This specifies the label that should appear on the "Cancel Order" button.

BHE "string"
This specifies the label that should appear on the "Help" button.

BPR "string"
This specifies the label that you've placed on the "Preview" button in the order form file. This must match what you have used in the order form exactly (unless you don't want a preview button at all, in which case just set this to zero).

BSO "string"
This specifies the label that you've placed on the "Proceed" button in the order form file. This must match what you have used in the order form exactly and it must NOT be the same as the BPO value.

CUB "string"
If you don't like the look or the layout of the basket buttons, define this option. It is the name of a file that contains a snippet of HTML code to display the buttons the way you want them to be. This code snippet is inserted at the bottom of the basket display.

Each button you define must have the name "action" and must have a value that matches one of BCO, BPO, BRE, BCA, or BHE (as defined in your config file).

If this is set, the regular buttons will not be displayed.

An sample CUB file:

<input type=submit name=action value="Continue">
<input type=submit name=action value="Recalculate">
<input type=submit name=action value="Submit It">

HLP "string"
This specifies an URL that the customer should jump to when they click the HELP button. If you don't want a help button set this to zero.

CCT "string"
If you use the special "ccnum" field on your order form it can be awkward testing your site because it'll insist on a valid credit card number. If this option is set then it will ALSO accept this value as if it were a valid credit card number. It can be any string you want to use for testing. Remember to set this back to 0 when your site goes live.

CCM "string"
If the purchase method selected by the customer matches this value exactly and you have specified a merchant ID, then the customer is transferred to your credit card processing company for final processing. This would normally be set to something like "credit card". It must match whatever value you've used in your order form though.

ICM "string"
If the purchase method selected by the customer matches this value exactly and you have specified an i-Check account number, then the customer is transferred to i-Check for final processing. This would normally be set to something like "i-check". It must match whatever value you've used in your order form though.

BOR number
Specifies the width of the table border used when displaying the basket contents.

PAD number
Specifies the width of the table cell padding used when displaying the basket contents.

BCH "string"
Specifies the HTML color code to use for the background of the header row on the basket contents display.

FCH "string"
Specifies the HTML color code to use for the foreground of the header row on the basket contents display.

BCF "string"
Specifies the HTML color code to use for the background of the footer row on the basket contents display.

FCF "string"
Specifies the HTML color code to use for the foreground of the footer row on the basket contents display.

BC1 "string"
Specifies the HTML color code to use for the background of odd-numbered product rows in the basket contents display.

FC1 "string"
Specifies the HTML color code to use for the foreground of odd-numbered product rows in the basket contents display.

BC2 "string"
Specifies the HTML color code to use for the background of even-numbered product rows in the basket contents display.

FC2 "string"
Specifies the HTML color code to use for the foreground of even-numbered product rows in the basket contents display.

ORD "string"
Specifies a directory to store all order information. Each order is stored in it's own file in case you have E-mail problems or accidently delete orders.

SYM "string"
If left undefined, your basket will use the $ symbol. By defining this to an alternate value, you can specify for instance Euros - € by using "&#8364;" or Yen - ¥ by using "&yen;" etc.

DEM "string"
You can enter a list of banned E-mail addresses in this file (Relative to your root directory), and they will not be allowed to process their order. (One entry per line)

DIP "string"
You can enter a list of banned IP addresses in this file (Relative to your root directory), and they will not be allowed to process their order. (One entry per line)

DLOG "string"
if you want to log any disallowed instances, you need to enter a log file in this field.

DLOG "ms2/disallowed.log"

Sample Config File:

MIN "10,adjust"
DIS "0,0|25,5|50,10"
COU "CA"
TAX "BC,7.5|ON,8"
GST 5
HST 14
SHP "Shipping,0,5.95,0|UPS Second Day Air,0,12.91,0"
SHX ",CA*,0,0,0|US Shipping,US*,0,6,0|Foreign Shipping,*,0,15,0"
OLD 120
DEL 1
CUR 1
DCO 0
FRQ 0
TMP "temp"
LOG "ms2/%Y-%m.log"
MSG "ms2/basket.msg"
MBC "CCFFCC"
MID "1000003"
USD 0
CAN "http://www.islandnet.com/~guest/demo.html"
CON "http://www.islandnet.com/~guest/demo.html"
HDR "ms2/basket.hdr"
FTR "ms2/basket.ftr"
FRM "ms2/basket.frm"
SEC 1
STO 30
END "ms2/basket.end"
END2 "ms2/basket.end2"
REC 1
MTO "guest@islandnet.com"
MFR "guest--order@islandnet.com"
MSU "*** ORDER ***"
MBT "ms2/basket.mai"
MSU2 "Your Order"
MBT2 "ms2/basket.mai"
BCO "Continue Shopping"
BPO "Submit Order"
BRE "Recalculate"
BCA "Cancel"
BPR "Preview"
BSO "Proceed"
BHE "HELP"
CUB 0
HLP "http://www.islandnet.com/~guest/help.html
CCT 0
CCM "credit card"
BOR 0
PAD 5
BCH "339966"
FCH "ffffff"
BCF "339966"
FCF "ffffff"
BC1 "eeeecc"
FC1 "0"
BC2 "ffffff"
FC2 "0"

Sample Email Template:

{date}

CUSTOMER INFORMATION:

{name}
{company}
{address}
{city}, {province}
{country} {postal}
{phone}
{email}


PAYMENT METHOD:

{method}


COMMENTS:

{comments}


ORDER DETAILS:

<< BACK



Page generation time: 0.02 seconds