VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 USPS Realtime First Class problems
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

revrat
Starting Member

47 Posts

Posted - June 03 2005 :  23:26:56  Show Profile  Reply with Quote
I finally got First Class to show up as a choice by editing the following line.

const DomesticServiceTypes="Express,Priority,Media,First Class"

Oddly enough if you change the order it doesnt work.

My problem is this. First class shipping stops at 13 Ounces. If my orders are over 13 ounces the shipping script gives and error about the order being over 13 ounces and fails. I would like the script to not check for first class if the order is over 13 ounces. Is there a way to do this?

Another oddity that was asked in another thread is that the script total ignores the internation shipping line. you can add or remove any of the choices you want but the script still gives you all the choices including ones you can't use. it makes it very confusing for the Customers.

PhilWilliams
Starting Member

USA
8 Posts

Posted - June 20 2005 :  15:06:48  Show Profile  Visit PhilWilliams's Homepage  Reply with Quote
Hi Revrat,
I fought with this one for a while:

Here's the solution for the First Class over 13 ounces...Look in the file: USPOSTALINTERFACE.ASP
Add the small section where it starts with "if servicetype="First Class". This will exit the routine if 1) the weight is 1 pound or greater, or 2) the total ounces are greater than 13.

Sub GenerateLocalPackage(msg, i, servicetype, weight, Shiptozip, ocountry, shipfromzip, ounces)
dim machine
machine="FALSE"
If i=2 then
machine="TRUE"
end if
if servicetype="First Class" then
if weight>0 then
exit sub
end if
if ounces>13 then
exit sub
end if
end if
msg=msg & "<Package ID=""" & i & """>"
msg=msg & "<Service>" & ServiceType & "</Service><ZipOrigination>" & shipfromzip & "</ZipOrigination><ZipDestination>" & shiptozip
msg=msg & "</ZipDestination><Pounds>" & weight & "</Pounds><Ounces>" & ounces & "</Ounces><Container>None</Container>"
msg=msg &"<Size>REGULAR</Size><Machinable>" & machine & "</Machinable></Package>"
end sub

The second part of the problem is considerably more complicated. Unfortunately, the USPS does NOT allow you to send up the types of service you want for international. You just get them all. I ended up having to write several different routines that filter out the services I didn't want. You can set up the services in the USPOSTALCONFIG.ASP file, but there's no code in the VP-ASP to filter out the services you don't want.

Hope this helps a little...
Best,
Phil


Phil Williams
http://www.photosolve.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000