Home > PHP
Version Help > UPS shipping
UPS shipping integration
Integrating UPS online rates
Setting up your Ecommerce Plus template to automatically use the
UPS Online® Tools Rates & Service Selection to automatically
calculate your shipping costs is a simple matter. Just follow the
steps below.
Firstly, log in to the admin section for your Ecommerce Plus template
and click on "main settings" using the menu on the left.
From the Shipping Type dropdown menu select UPS Shipping.
On the same page you will see a setting "Shipping Units" where
you can define the weight units that are used to define your product
weights. Please note that the shipping units are limited in some
countries. Notably, the United States is limited to specifying
product weights in lbs and ounces.
Now, go back to the admin home page by clicking on "home" on
the left menu. Click on the text link near the bottom of the page
which says "Register with UPS" and follow the steps in
the registration wizard.
You are now ready to test your system. Try adding a product to
your cart where you know the weight of the product. Then in the
checkout phase after filling out your customer and shipping information,
you should see the available UPS shipping options along with the
associated costs. You should do a couple of tests to make sure
they match what you would expect from the UPS online shipping calculator
at www.ups.com.
If you receive the following error at this stage . . .
This measurement system is not valid for the selected country
. . . then this means that you have to return to the Ecommerce
Plus admin section, "main settings" page to change the
Shipping units you are using from lbs and ounces to Kilograms or
vice-versa.
Oversize packages
For each OS1 package, set the product weight to be 30 pounds.
For each OS2 package, set the product weight to be 70 pounds
UPS pick up
The way that you deliver your packages to UPS for
delivery can affect the total cost of delivering the package. You
can change the UPS Account Type by setting the following in your
vsadmin/includes.php
file . . .
$upspickuptype="03";
The code in quotes there would be taken from the following table...
01 - Daily Pickup
03 - Customer Counter
06 - One Time Pickup
07 - On Call Air
19 - Letter Center
20 - Air Service Center
Remember to enclose the code above in double quotes. Also, please
note that these options are not exactly the same
as you might find on the UPS website but we hear that is something
that UPS are working on.
UPS tracking tool
It's possible for customers to track their orders from a page
on your site - if you don't have the tracking page, all you
need to do to enable it is 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" ?>
UPS negotiated rates
For high volume shippers it is possible from version
5.5.2 to display your UPS Negotiated Rates as shipping charges
if required. Firstly you have to get in touch with your UPS representative
and ask them to return your negotiated rates from the UPS Rates
and Service Selection XML Tool. If they agree they will need to
supply you with a username, password
and access code which you will need to use to populate the fields below in
your vsadmin/includes.php file...
$upsnegotiatedrates=TRUE;
$upsaccountnumber="AA1111"; Your
UPS 6 digit account number
$upsnegotiateduser="yourupsusername"; Username
as supplied by UPS
$upsnegotiatedpw="abcdefg"; Password
as supplied by UPS
$upsnegotiatedaccess="2X3H295KPL2114K7"; Access
code as supplied by UPS
$defaultshipstate="CA"; Your state
/ County
Troubleshooting
When starting with the UPS wizard you receive an error message
like this:
Fatal error: Call to undefined function: curl_init()
... it probably means that the cURL component is not installed
on your server.
cURL is required for connecting to the
UPS server. UPS requires communication over a secure (HTTPS) connection
and cURL is the only way to do it really. if it's not available,
check with your host to see if they would add it. It's quite simple,
free and there are details here . . .
http://www.php.net/manual/en/function.curl-init.php
An alternative is provided for those that don't have cURL compiled
into PHP, but where the host provides cURL on the command line.
To use this feature you need to set the path to the cURL binary
on
your server in the parameter $pathtocurl in your vsadmin/includes.php
file. For instance...
$pathtocurl="/usr/local/curl";
This was introduced in version 4.3.0, and if that line doesn't
appear in your includes.php file, you can add it to the list. |