Outline:
Return to Table of Contents
The shopping system includes functionality to calculate shipping charges. These charges are automatically calculated and shown in the cart and on the invoice. The calculations are made according to the shipping rules you specify. The shipping charge can be based on ranges of dollar amount or weight. Charges can be presented by different service levels - such as "UPS Next Day" or "UPS 2nd Day". Also, the shipping charges can be broken down by ZONE, where the customer chooses his zone from a pull down list.
If the customer makes a selection that requires shipping charges and you have created the appropriate tables, the charges will automatically appear in the cart panel as a line item. When more than one method is available, a shipping panel will be presented to the customer to select a method for shipping. This panel is presented prior to the presentation of the cart panel when a selection is appropriate. To allow customers to change their shipping method, you can add a shipping button to the cart panel. When selected, this button will present the shipping panel and allow the customer to review the methods offered and select a new choice.
Shipping is a flexible features which gives your customers the opportunity to choose shipping time frames and costs that are appropriate for their needs. This process also provides you with an easy way to directly bill your customers for this overhead cost.
Shipping files can be placed in any directory to which tame has access rights. The default location,~shop/shipping, is set in the shop administration screen. The location of this folder can be changed through the administration screens or by designating the directory in the config.tag file using the &shipdir variable. The entry to define the shipping folder in the shop directory would be:
&shipdir = "~shop/shipping" ;
To use the mall wide shipping tables the directory is ~mall/SHIPPING. This places the shipping tables in tameroot/mirror/mall/SHIPPING. Another location that is used to store the shipping files is the shop's mirror tree: ~//shop/SHIPPING. In this case the files are store in the tameroot/mirror/SHOPNAME/SHIPPING directory.
If you provide your customers with one way to ship, then there is only one shipping table in your shipping directory. This file MUST be named shipping.tdb. The shipping file must follow the format for a *.tdb file. The first line is a field definition line that begins with a semicolon and contains the column names. The first field in each row must be unique and each row must end with an appropriate record terminator. For an overview of *.tdb files, see Database Access: Creating a Database.
The shipping file has two keyword column definitions. The first, COST, bases shipping on the total cost of the items the customer selects. WEIGHT, the second, bases shipping on the total weight of the customer selected items. The table must include a range of COSTs or WEIGHTs and a price to charge for shipping. The first row of every table must be a header in the format:
;COST ZONE1 ZONE2 . . .
or
;WEIGHT ZONE1 ZONE2 . . .
If the header specifies COST, then the first column contains the merchandise total which selects that row. The comparison is always made greater than (or equal to) the prior row and less than the current row. If the header specifies WEIGHT, then the first column contains the total shipment weight. The weight for each product is specified in the column named "weight" in the product database. Here is an example of a shipping.tdb file by weight:
Note: There must be a column in the product.tdb with the name "weight" (lower case). This weight column must be complete for all items to ensure that the shipping charges are accurate.
;WEIGHT "Shipping Amount" 0 0.00 1 2.00 2 4.00 3 6.00 4 8.00 999999 10.00
Note: No symbols, such as "$", are used. The system will automatically add the appropriate symbols when the value is presented on the cart panel.
In this example anything less than 1 weight unit, i.e., kilogram or pound, will be shipped at the $2 rate. An item weighing 2.5 weight units will cost the customer $6.00. To ensure that an appropriate shipping charge is assessed, a maximum weight amount is placed in the last row. A customer ordering items weighing more than 4 weight units will be charge $10.00 for shipping.
The other basic shipping.tdb file, by cost, would look like this:
;COST "Shipping Amount" 0 0.00 10 1.00 100 10.00 1000 50.00 10000 100.00 9999999 200.00
In this example, a customer who spends $9 would pay $1 for shipping.
In some situations, you may wish to cover shipping if the customer spends a certain amount of money. To do this include shipping charges up to the amount you determine is appropriate and do not put in a maximum amount. If you used this shipping table, your customers would receive free shipping if they spent over $1000.
;COST "Shipping Amount" 0 0.00 10 1.00 100 10.00 1000 50.00
These are the simplest forms of a shipping table. In more advanced cases the table can contain the ranges of COST or WEIGHT and prices based on the location of the customer. This is generally referred to as ZONE shipping. ZONE shipping can be completed by cost or by weight. In the field definition line each zone is typed exactly as you wish it to appear to the customer on the shipping panel. Each zone must be enclosed within quotation marks and separated by white space. Here is an example of a shipping table by weight with zones:
;WEIGHT "48 UNITED STATES" "HAWAII, ALASKA" "PUERTO RICO" "ALASKA EXTENDED" 0 6.00 9.50 9.00 13.00 1 6.25 10.75 10.25 21.25 2 7.25 12.00 11.75 22.75 3 8.00 13.25 13.50 24.25 4 8.50 14.50 15.00 25.25 9999999 9.25 15.75 16.25 26.25
This shipping table will present the customer with a drop down list from which he selects the appropriate location, and then shipping charges are applied to the purchase based on weight.
The most flexible shipping option for the customer is to provide multiple shipping options by using the method.tdb file and service level option files. Method.tdb files are discussed in the next section.
If there are multiple shipping options to present to your customer then designate these in a file named methods.tdb. This file contains pointers to all the individual shipping files you create. When this method is used, the customer will be presented with a variety of shipping choices.
To use the method file, first determine the types of shipping to be offered and create *.tdb files for each option. Then create a method.tdb file that references each of these options. Here is an example of the process.
The *.tdb shipping files you create can be in any of the shipping formats described in the previous section. In this case, the Federal Express 2 day table (fedex2day.tdb) is defined by the weight of the package and might look like:
;WEIGHT "United States" "Alaska" "Hawaii" "Puerto Rico" 0 10.10 20.20 30.30 40.40 1 11.10 21.20 31.30 41.40 2 12.10 22.20 32.30 42.40 3 13.10 23.20 33.30 43.40 9999999 19.10 29.20 39.30 49.40
You may determine the international rates by the cost of the products purchased and the table (fedexintl.tdb) might appear as follows:
;COST "Europe" "Australia" "New Zealand" "South America" "All Other" 0 10.00 20.00 30.00 40.00 50.00 10 11.00 21.00 31.00 41.00 51.00 100 12.00 22.00 32.00 42.00 52.00 1000 13.00 23.00 33.00 43.00 53.00 99999999 14.00 24.00 34.00 44.00 54.00
Now that the individual shipping files have been created, they are combined together in the method.tdb file. The method file has two columns method and file. In the method column type the title of the option as you wish it to appear on the shipping panel. Quotations or square brackets are used to enclose white space. In the file column type the complete file name of the shipping file that you created for the option. Here is the method.tdb file sample:
;method file [FEDEX 2ND DAY] fedex2day.tdb [FEDEX INTERNATIONAL] fedexintl.tdb [UPS 2ND DAY] ups2nd.tdb [UPS GROUND] upsgrd.tdb
The following table would appear for shipping in your site using this method file.
As this shows, each line in the methods.tdb will cause a radio button to appear on the Shipping Screen.
You may wish to place additional instructions on the shipping panel for your customers. There are two ways to provide this information. The first is to add the information as a heading on the screen using the shipping_screen_top definition. To include the instruction, add a screen_top definition to the custom.tag file for the shop, or the custom.tag file for the mall. For example, to add "Shipping is Free in Idaho" to the screen place the following tag in the custom.tag file:
<tame> define: shipping_screen_top <h3>Shipping is Free in Idaho</h3></tame>
Another way to add this information is to copy the shipping.pan file to the shop directory and edit the file directly. Use the following steps to make changes.
Using either of these methods allows you to customize the shipping, or any panel, to contain appropriate information for your customers.
In addition to the standard shipping methods discussed above, the system is flexible and can be adapted for new ideas. Here are a few ways the shipping panels can be adapted to support your needs.
Shipping cost by quantity:
You can create a ship-by-quantity method. By using the weight method and setting all weights in the product.tdb to the value "1" this method is created. Since the weight is multiplied by the quantity, this will produce a shipping value relative to the quantity of items purchased. You must still use the keyword WEIGHT in the field definition line. Here is an example of a shipping file and the associated product.tdb. In the method.tdb this file is referenced as "Shipping via Quantity".
;WEIGHT "Amount" 0 0.00 1 10.00 2 20.00 3 30.00 4 40.00 5 50.00 10 55.00 20 60.00 999999 65.00 ;item price descrip weight keywords
example 2.90 "This is an example product" 1 "cool"
thing 3.90 "This is a thing" 1 ""
widget 4.90 "This is a widget" 1 ""
Note the use of the keyword "weight" in the product.tdb file. Each item has a value of "1" in this column to enable the shipping by quantity method to work correctly. Here is what the cart panel would look like of the customer purchased 5 widgets.
The Shop Next Door shopping cart view
Transposing the shipping table
If you operate a business where you have a consistent shipping charge across your product line, you can use the following method to present shipping charges. For example if your product will fit in a standard Federal Express, UPS or US Priority Mail envelop then you can create a table for each zone and populate it with the shipping options. This is the reverse of the standard shipping table, but it can work well in special situations. Here is an example of two table:
North America table:
;WEIGHT "UPS Ground" "UPS 2nd Day" "UPS Overnight" 0 20.00 30.00 40.00 1 21.00 31.00 41.00 2 22.00 32.00 42.00 3 23.00 33.00 43.00 99999999 "no charge" "no charge" "no charge"
Europe table:
;WEIGHT "UPS 2nd Day" "UPS Overnight" 0 30.00 40.00 1 31.00 41.00 2 32.00 42.00 3 33.00 43.00 99999999 "no charge" "no charge"
These tables will present the following shipping table:
As these examples show, the shipping interface is very flexible and allows you to be creative. Remember though, when creating any shipping tables always test the results to ensure accuracy.
Created: Katherine C.
Davis 4/15/97
Edited: Katherine C. Davis 10/14/97