USPS Shipping Module Installation Instructions
(This feature is now built into ShopSite directly.)
Requirements:
- Shopsite Pro 6.1 or greater
- Perl 5.6.0 or newer
- Perl modules - XML::Parser, XML::RegExp, and XML::DOM
Files:
- The file usps2.cgi should be placed in your Shopsite shopping cart directory (i.e. "sb" or "sc"). The file must be executable (chmod a+x or chmod 755). This file should be uploaded as an ASCII file.
- The file country.txt should be placed in your Shopsite shopping cart directory (i.e. "sb" or "sc"). This file should be uploaded as an ASCII file.
- The file usps_check.cgi can be used to determine if your server has the required Perl modules installed. It can be placed in your cgi-bin directory and needs to be executable (chmod a+x or chmod 755). You can then run it from the web and it will check that your system is compatible with the script. This file should be uploaded as an ASCII file.
NOTE: You may need to change the 1st line of the script usps.cgi and usps_check.cgi if your Perl location is not:
/usr/bin/perl
How to Install:
1. Go to the website below and register for the USPS API:
https://secure.shippingapis.com/registration/
2. Contact the USPS ICCC (Internet Customer Care Center) to get your username activated:
E-mail: icustomercare@usps.com
Telephone: 1-800-344-7779 (7:00AM to 11:00PM ET)
3. In the Shopsite backoffice, go to: Commerce Setup -> Shipping
and select "Custom Shipping Add-on" as the shipping option.
4. Click on the lower "Configure" button to configure the USPS API.
5. Enter the following information:
Add-On File Name: usps2.cgi
Ship From Country: United States
Ship from zipcode: Your shipping zipcode
Parameter 1: Your USPS Username|Your USPS Username
Parameter 2: Insurance(Y/N)|Maximum weight/box|Min. Default Product Weight|Use First Class Mail(Y/N)|Use Domestic Parcel Post(Y/N)|Use Media Mail(Y/N)|Use Priority Mail(Y/N)|Use Express Mail(Y/N)|Use Priority Mail International(Y/N)|Use Global Express Mail(Y/N)|X|First-Class Mail International(Y/N)|X|X
Parameter 3: Shipping option to appear when there is a problem with USPS system
Parameter 4: Other shipping entries you want displayed after USPS rates are shown [optional]
Example:
Parameter 1: LEXI0834|LEXI0834
Parameter 2: Y|30|1|Y|Y|Y|Y|Y|Y|Y|Y|X|Y|X|X
Parameter 3: Shipping calculation not available. Please call for shipping.
Parameter 4: Free shipping in July::0.00|Fedex overnight::50.00
Note: The "|" character is the pipe character on your keyboard (normally above the "Enter" key).
Insurance(Y/N): Enter a Y or N for this option. If you enter a "Y", the fees associated with insuring a package will be added to the shipping total based on the total price of all products ordered.
Maximum weight/box - The script uses this value to determine how many packages are going to be sent to USPS for a rate calculation. For example, if you set the max. value to 25 pounds, and someone ordered four 10 lb. widgets, the script would send 2 packages to USPS, 1 box weighing 25 pounds, and one box weighing 15 pounds.
NOTE: You should set your max. weight to the weight of your heaviest product that does not have a specific box dimension defined.
The exception to this max weight rule is if a product you have has a set shipping box dimension, then that product will be sent as a separate package to USPS for the rate calculation.
Min. Default Product Weight: Minimum default weight in pounds that you want assigned to any product that does not have a weight assigned or is set to 0.
Parameter 4: Enter shipping text and price in the following format, with multiple options separated by the "|" character:
Shipping text to be displayed::Shipping Price
Note: You should set a weight for all products in Shopsite to work seamlessly with this API and ShopSite's default shipping methods.
5. If you want the Country dropdown list to appear in the shopping cart, you must enable it in the ShopSite backoffice by going to: Commerce Setup -> State and Country and selecting the countries you wish to display. For the zipcode box to appear, you must select this in the Commerce Setup -> Sales Tax section (Use ZIP Code to determine sales tax).
How the scripts works:
If a customer selects the United States as a country and enters a valid zipcode, the script will return shipping rates for Priority and Express Mail. If they enter an invalid zipcode, a warning will appear at the top of the screen indicating they need to re-enter their zipcode.
If a customer selects a country other than the US, the script will return the shipping costs for Airmail Parcel Post and Global Express if available. If USPS cannot calculate a rate, a warning will appear and one shipping option will be available that states "Please call for shipping" (This text can be customized).
Notes:
- The maximum shipping weight for USPS packages is 75 pounds.