Ecommerce Templates > Shipping Help > USPS shipping
Setting up your Ecommerce Plus template to automatically use USPS shipping is pretty simple as the majority of the the integration has been done for you. Just follow the steps below.
US and overseas shipping costs are automatically calculated according to product weight and destination. To activate USPS shipping method you need to register for a username. The process is quite simple and the registration form is available at https://registration.shippingapis.com/
You will receive a long email from USPS with information regarding testing the system before going live on the production server. We have already done this step for you so that can be ignored. All that is needed is to follow the instructions for going live on the production server.
You can then open your main admin settings of the control panel and select USPS for your shipping choice
Next enter the username given to you by USPS
Now enter your ZIP code. Do be sure to use your 5 digit zip code, not the extended version. This is used in determining shipping costs within the USA.
Finally click on the top menu link entitled "Shipping Methods" and select "Edit USPS Shipping Methods"
You should now see a list of domestic and international USPS shipping methods
Select only those that you want to support on your store. The customer will be able to choose the method that they want to use on checkout, only applicable methods will be made available to them. The "FSA" field is provided if you want to offer Free Shipping, which needs to be set up in the discounts admin page.
There's no more to it than that really, and as all the integration has already been provided in the software you should be up and running with USPS.
All that is left to do is to add the weight of each product as they are added through the product admin section. The shipping cost will then be calculated on checkout depending on the origin, destination and weight of the order.
It's possible for customers to track their orders from a page on your site - if you don't have the tracking page, you can set it up yourself...
ASP Version
Take a copy of products.asp and call it tracking.asp
Then go to HTML view and change the line
<!--#include file="vsadmin/inc/incproducts.asp"-->
to
<!--#include file="vsadmin/inc/inctracking.asp"-->
PHP Version
Take a copy of products.php and call it tracking.php
Then go to HTML view and change the line
<?php include "vsadmin/inc/incproducts.php" ?>
to
<?php include "vsadmin/inc/inctracking.php" ?>
After you apply to the USPS, you will receive an email from them with your username. In this email will be a couple of lines about how to switch your profile to allow you access to the production server. Until you follow this step you will receive an error in checkout about not being authorized on the server. Remember to mention to USPS that the set up is "pre-tested" and you are using Ecommerce Templates.
If you need to specify container types for USPS shipping then you'll need the following addition to the vsadmin/includes file
ASP Version:
uspsprioritycontainer="flat rate
box"
available options for priorirty mail: flat rate envelope
/ flat rate box / lg flat rate box
uspsexpresscontainer="flat
rate envelope"
To make the system use whatever flat rate box fits rather than having to specify container types explicitly, use the following...(Version 5.8 minimum)
uspsprioritycontainer="auto"
uspsexpresscontainer="auto"
PHP Version
$uspsprioritycontainer="flat rate box";
available options for priorirty mail: flat rate envelope / flat rate box / lg
flat rate box
$uspsexpresscontainer="flat rate envelope";
To make the system use whatever flat rate box fits rather than having to specify container types explicitly, use the following...(Version 5.8 minimum)
$uspsprioritycontainer="auto";
$uspsexpresscontainer="auto";
If you receive the following error
"Invalid XML Element content is invalid according to the DTD/Schema."
then make sure you have selected "Pack Products Together" in your main admin settings. USPS has a hard limit of 25 package ratings per request so unfortunately anything over 8 items in the cart exceeds this limit if you are using "Pack Products Separately".
If you get the following error:
Authorization failure. Perhaps username and/or password is incorrect.
Double check the username you have entered in the main admin settings. Make sure you have received an email from USPS, the content of which will be something like this:
Congratulations on completing your testing using the U.S. Postal Service's Internet Shipping Application Program Interfaces (APIs). Your profile has been updated to allow you access to the Production Server.