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

Database Item Price Shipping

 
Database Item Price Shipping costs are based on item shipping prices stored in the shipping field in WebStore's product database, outlet.data.
 
%SHIPPING is a hash of arrays in WebStore's setup file, /Web_store/Databases/outlet.setup. listing all shipping variables.
 
%SHIPPING arrays in this file are configured for Database Item Price Shipping.
Example:  $SHIPPING{1}[2]

 {1}  An array's KEY value. KEY values will be referenced by their
      numeric value in the explanations below (0, 1, 2, etc.).

 [2]  An array's element reference. Element numeric values will
      be spelled in the explanations below (zero, one, two, etc.)

      Specific arrays will be referenced as $SHIPPING{1}.

      A specific element within a specific array will be referenced
      as $SHIPPING{1}[2].
Arrays 1, 2, and 10 must exist in %SHIPPING. If any of these arrays are not present in %SHIPPING or the value of their KEY (1, 2, 10) is altered, shipping is disabled in WebStore.
 
Numeric array KEYS allow the Webstore script to sort the shipping methods in ascending order for printing to the client's web browser.
 
Arrays 0 and 3 - 9 are reserved and can not be used.
 
%SHIPPING = (

	# Determines type of shipping
	# Database Field, Handling, Free Shipping
	'1' => ['2',   '',   ''],


	# Domestic Shipping
	'2' => ['319',  '10','11','12','13'],


	# Shipping Methods
	# 10  UPS Ground or Priority Mail:  Add  $0.00 to Shipping Subtotal
	# 11  2nd Day Air:                  Add $10.00 to Shipping Subtotal
	# 12  Standard Next Day Air:        Add $18.00 to Shipping Subtotal
	# 13  Alaska & Hawaii:              Add  $5.00 to Shipping Subtotal
	# 14  Canadian Orders:              $10.00 plus 17% of order's subtotal
	# 15  International Orders:         $20.00 plus  8% of order's subtotal

	'10' => ['UPS Ground or Priority Mail'],
	'11' => ['2nd Day Air',                 '10.00'],
	'12' => ['Standard Next Day Air',       '18.00'],
	# State Specific Shipping Method
	'13' => ['Alaska & Hawaii',             '5.00',  '',    '11:21'],
	# Country Specific Shipping Method
	'14' => ['Canadian Orders',             '10.00', '.17', '132'],
	'15' => ['International Orders',        '20.00', '.08', ''],

); # DO NOT REMOVE - terminates %SHIPPING
 
Array 1 - $SHIPPING{1}
$SHIPPING{1} must exist in %SHIPPING. If $SHIPPING{1} is removed or the numeric value of it's KEY (1) is altered, shipping is disabled in WebStore.
 
$SHIPPING{1} consists of the following elements:

 KEY     zero  one     two
 '1' => ['2',  '3.50', '150.00'],
zero    Database Shipping Field
Element zero is the item shipping price field in the store's database, outlet.data. Shipping is calculated using the dollar amounts (fixed decimal values) stored in the Shipping field.
The database Shipping field must be defined in element zero for Database Item Price Shipping.
 
one    Handling Charge
Element one is the labor charge for packaging an order for shipment.
Setting element one = '' disables the addition of a handling charge.
Do not include a dollar sign or commas in element one. Element one is a fixed decimal number.
 
two    Free Shipping
When the value of an order's subtotal is greater than the value listed in element two, no shipping or handling is charged for the order. The shipping drop down select element is not printed to the client's web browser.
Setting element two = '' disables free shipping checks, all orders pay shipping.
Do not include a dollar sign or commas in element two. Element two is a fixed decimal number.
 
 
%SHIPPING
 
Array 2 - $SHIPPING{2} - Domestic Shipping
$SHIPPING{2} must exist in %SHIPPING. If $SHIPPING{2} is removed or the numeric value of it's KEY (2) is altered, shipping is disabled in WebStore.
 
$SHIPPING{2} consists of the following elements:

 KEY     zero      one   two   three  four
 '2' => ['319',    '10', '11', '12',  '13'],
zero    Country Code
  Your 3 digit country code from %countries in outlet.state_country.setup.
 
one, two, three, etc.     Domestic Shipping Method KEYS
    Elements one, two, three, etc. is a listing off all domestic (your country's) shipping method KEYS in %SHIPPING.
List as many domestic shipping methods as you require.
 
Your 3 digit country code in element zero and the domestic shipping methods listed in elements one, two, three, etc. are used to determine if the client has chosen a shipping method which applies to their country of residence.
 
 
%SHIPPING
 
Arrays 10 - XX $SHIPPING{10} - Shipping Methods
$SHIPPING{10} must exist in %SHIPPING. If $SHIPPING{10} is removed or the numeric value of it's KEY (10) is altered, shipping is disabled in WebStore.
 
$SHIPPING{10} is the first shipping method array.
 
The default shipping method used by WebStore is defined in $SHIPPING{10}.
 
$SHIPPING{10} remains the shipping method until the client selects an alternative shipping method.
 
Each shipping method array (10, 11, 12, etc.) consists of a maximum of four elements:

 KEY     zero                           one  two  three
'10' => ['UPS Ground or Priority Mail', '',  '',  ''],
zero    Shipping Label
The shipping label used in the shipping drop down select element on the order form HTML page, confirmation of order HTML page, and e-mail messages.
 
one    Add Value
Additional charges added to shipping costs (surcharge, etc.).
When a value exists in element one of the selected shipping method, element one's value is added to the shipping subtotal which was obtained by adding the database shipping field prices for items ordered by the client.
Do not include a dollar sign or commas in element one. Element one is a fixed decimal number.
 
two    Multiply Value
The Multiply Value takes precedence over the shipping subtotal value and any value present in element one (Add Value) of the shipping method.
When a value exists in element two, the shipping subtotal is discarded. The order's subtotal is multiplied by the decimal value present in element two to obtain the order's shipping cost. If a value is present in element one, element one's value is added to the shipping cost product, producing the order's shipping subtotal.
Do not include a dollar sign or commas in element two. Element two is a fixed decimal number.
 
three    Country or State(s) Specific Shipping Method

'14' => ['Canadian Orders', '10.00', '.17', '132'],
For country-specific shipping methods, list the country's 3 digit code from %countries in outlet.state_country.setup in element three. Only one country code may be listed in element three for a country-specific shipping method.

'13' => ['Alaska & Hawaii', '5.00', '', '11:21'],
For state-specific shipping methods, list state 2 digit codes from %states in outlet.state_country.setup in element three. More than one state code may be listed in element three for a state-specific shipping method. Colon delimit multiple state codes.
 
 
%SHIPPING | Top of Page