UPS Real Time

UPS Real Time

VP-ASP calculates the weight of the items, uses your zip code and sends a message to UPS. UPS returns with different costs and the customer can select the type of shipping based on the costs being displayed. The response normally only takes a few seconds. ShipRoutine=upsxmlrealtime.asp

UPS Ready is now included in the full versions of VP-ASP 6.00, and has been made easy for the user to set up.

The first step is to select the shipping link in Occassional tasks in your admin.

Once you have selected shipping, there is an option " Set up UPS Real-Time Shipping".

From here you have two options, "Add UPS shipping", and Configure UPS shipping. Start with add UPS shipping.

This will guide you through the registration steps required to get UPS shipping.

When completed with these steps go back to the shipping page and select "Configure UPS Shipping".

Here you will have to set up your merchant details, and also have other options you can configure depending on preference, like if you want to ship products seperately, or if you want to use test mode etc.

After you have completed adding and configuring UPS delete any other shipping routines you have set up in the shipping section, if you don't wish to offer any other shipping methods other than UPS.

Troubleshooting

Problem:Error " Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Chr'
/shop/shophash.asp, line 87"
Solution:This can occur if your webserver has the default codepage set to a unicode (two byte) codepage. This causes the Chr() function to fail as it only supports single byte characters.
You will need to edit shophash.asp and after the opening <% add a line of code:
session.codepage = 1252

Problem:Error "The XML document is well not formed" after the "UPS Online® Tools Licensing and Registration Wizard - Step 3" section.
Solution:In the data you have entered into the sign up form, ensure you haven't entered any reserved characters, such as & or ^ that could be causing this to fail.

Problem:Receive "ERROR: DATA RETRIEVAL FAILED" on Step 2.
Solution:Please ensure you have the latestVP-ASP Patchinstalled. Also, try a different XML method - you can change this by clicking the Configure UPS Real-Time link on the Shipping Set-Up Page.

Problem:Error Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''é±Y=Ít' at line 1
/shopupsincludes.asp, line 209
Solution: You will need to edit shopupsincludes.asp around lines 200 - 200 as follows. Change:

if ucase(xdatabasetype) = "MYSQL" OR  ucase(xdatabasetype) = "MYSQL351" OR getconfig("xMYSQL")="Yes" then
sql = "update ups_config set username = '"
if ucase(statusmessage) <> "SUCCESS" then
sql = sql & EnDeCrypt(statusmessage, upshashkey) & "', "
else
sql = sql & EnDeCrypt(getsess("username"), upshashkey) & "', "
end if
 sql = sql & "Password = '" & EnDeCrypt(getsess("password"), upshashkey) & "'"
myconn.execute sql
else
if ucase(statusmessage) <> "SUCCESS" then
 rs("Username") = EnDeCrypt(statusmessage, upshashkey)
else
rs("Username") = EnDeCrypt(getsess("username"), upshashkey)
end if
rs("Password") = EnDeCrypt(getsess("password"), upshashkey)
rs.update
end if

To:

if ucase(xdatabasetype) = "MYSQL" OR  ucase(xdatabasetype) = "MYSQL351" OR getconfig("xMYSQL")="Yes" then
sql = "update ups_config set username = '"
if ucase(statusmessage) <> "SUCCESS" then
sql = sql & converttoplain(EnDeCrypt(statusmessage, upshashkey)) & "', "
else
sql = sql & converttoplain(EnDeCrypt(getsess("username"), upshashkey)) & "', "
end if
sql = sql & "Password = '" & converttoplain(EnDeCrypt(getsess("password"), upshashkey)) & "'"
myconn.execute sql
else
if ucase(statusmessage) <> "SUCCESS" then
rs("Username") = converttoplain(EnDeCrypt(statusmessage, upshashkey))
else
rs("Username") = converttoplain(EnDeCrypt(getsess("username"), upshashkey))
end if
rs("Password") = converttoplain(EnDeCrypt(getsess("password"), upshashkey))
rs.update
end if

 

Problem:Receive "Error occurred getting shipping data. Status code=110971 Your invoice may vary from the displayed reference rates"
Solution:
UPS have recently made changes to their web services which now causes "Warnings" to be reported as errors thereby causing VPASP to fail when retrieving shipping costs.

To rectify this, you can tell VPASP to ignore Warnings by making the following changes to your code:

FOR VPASP 6.0

In UPSXMLREALINTERFACE.ASP around line 198, you should locate the following code:

if statuscode = "110208" then
Serror=Serror & "UPS can't ship to the country you have requested. Please go back and change your shipping selection.
"
else
Serror=Serror & Statusmessage & "
"
end If

Immediately after these lines of code add the following:

'VP-ASP modification
'Handle UPS 2007 Web Services Changes
If statuscode = "110971" Then
serror = ""
End If


You will also need to add some changes to SHOPUPSINCLUDES.ASP

Add the following code around line 9:

'VP-ASP modification
'Handle UPS 2007 Web Services Changes
Dim ignoreerror
ignoreerror = True

The above code should be added immediately BEFORE the line of code that reads:

Sub AnalyzeXML


Around line 127 locate the following code:

Case "ERRORDESCRIPTION"
MoreWords=FALSE
Statusmessage=words(wordloc+1) & "
"
exit sub

Change this code so that it reads:

Case "ERRORDESCRIPTION"
If Not ignoreerror Then
MoreWords=FALSE
Statusmessage=words(wordloc+1) & "
"
End If
exit sub
Case "ERRORSEVERITY"
If UCase(words(wordloc+1)) = "WARNING" Then
ignoreerror = True
Else
ignoreerror = False
End If
Exit sub

Save and re-upload these two files and the error message should be removed and UPS should function as it did previously.

FOR VPASP 5.50:

If you are using VPASP 5.50 you will need to add the following code around line 15 of upsxmlrealinterface.asp:

'VP-ASP modification
'Handle UPS 2007 Web Services Changes
Dim ignoreerror
ignoreerror = True

The above code should be added immediately BEFORE the line of code that reads:

Sub GetUPSRates (totalweight)


Also locate around line 130 the following code:

If Statuscode<>"1" then
Serror="Error occurred getting shipping data. Status code=" & statuscode & "
"
Serror=Serror & Statusmessage & "
"
end if

Change this to read:

If Statuscode<>"1" then
Serror="Error occurred getting shipping data. Status code=" & statuscode & "
"
Serror=Serror & Statusmessage & "
"

'VP-ASP modification
'Handle UPS 2007 Web Services Changes
If statuscode = "110971" Then
serror = ""
End If
end if


Around Line 185 locate the following code:

Case "ERRORDESCRIPTION"
MoreWords=False
Statusmessage=statusmessage & words(wordloc+1) & "
"
exit sub


Change this to read:
Case "ERRORDESCRIPTION"
If Not ignoreerror Then
MoreWords=FALSE
Statusmessage=words(wordloc+1) & "
"
End If
exit sub
Case "ERRORSEVERITY"
If UCase(words(wordloc+1)) = "WARNING" Then
ignoreerror = True
Else
ignoreerror = False
End If
Exit sub

Save your changes and re-upload this file.


Configuring UPS Real-Time

Configuring UPS real-time shipping has been made easier in VP-ASP Version 6 by allowing you to make changes in your shop administration site.

Go to Occasional Tasks>Shipping>Shipping

Click the Configure UPS real-time shipping link under the Set up UPS real time shipping heading

In the Merchant details section of the form, you will enter details relevant to your shop location.

Options

Zero-weight error - If set to Yes, this option will produce an error when a product with zero weight is selected

Auto-seperate packages - If set to yes, the cart will seperate packages for shipping if their weight is above the value in the Auto-seperate weight field

Delivery address is residential - If set to Yes, PO Boxes will not be accepted

Packaging Type - Here you can select the packaging type you will be using to send your products to your customers

Pick up Type - Select the method relevant to you

Use supplier zip - If you will be shipping directly from your supply, and youw would like to calculate shipping costs relevant to your suppliers location select Yes here

Weight units - Select here whether you would like to calculate the weight in pounds or kilograms

Advanced Fields

XML Version - Most commonly servers use XML2, if your server uses a different XML version, then select this from the drop down list

Supplier Ship field - The field in the products record where you record the suppliers zip code (this is used when Use supplier Zip is set to Yes)

UPS TRACKING

The tracking number should be provided to you when you ship the order through UPS. You will then need to associate the customer's order with this tracking number by entering the number into the order record.

You can do this by going to your admin and going to Orders > View/Edit Orders

Click the "Edit" button for the order you wish to add the UPS tracking number to.

Locate the field "upstrackno" and add the tracking number into this field.

Click the "Update Record" button.

Now when your customer enters their order id into the field on the shopa_ups_track.asp they will be able to obtain the tracking information for their order.


Times Viewed:
6359
Added By:
Steve Baldwin
Date Created:
10/6/2005
Last Updated:
2/24/2009