raphael
Starting Member
10 Posts |
Posted - January 10 2004 : 11:43:38
|
Some of you were wondering how to change the default USPS realtime shipping options from [EXPRESS / PRIORITY / PARCELPOST] to your desired options.
Our company needed PRIORITY / MEDIAMAIL only. I made a few code changes that work great. Here's the code and a few comments. My changes have a <<<<<<<<<<<<<<<< after them.
[ IN FILE NAME: uspostalrealtime.asp ]
Sub FormatMethods dim i, tempoption, price dim errors(10),errorcount shippingcount=0 '<<<<<<<<<<<<<<<<< changed i=0 to i=1 (removes Express Mail) for i = 1 to tempmethodscount-1 Price=Tempprices(i) tempoption=TempMethods(i) if Price<>0 then If getconfig("xLCID")="" Then ' <<<<<<<<<<<<<<<<< START EDIT if TempMethods(i) = "Parcel" Then TempOption= "Media Mail [" & formatcurrency(Price,2) & "] (media/books/dvds/videos/docs only)" else ' <<<<<<<<<<<<<<<<< END EDIT TempOption= TempOption & " [" & formatcurrency(Price,2) & "]" ' <<<<<<<<<<<<<<<<< START EDIT end if ' <<<<<<<<<<<<<<<<< END EDIT else TempOption= TempOption & " [" & formatnumber(Price,2) & "]" end if ShippingMethods(shippingcount)=TempOption shippingcount=shippingcount+1 end if next ' <<<<<<<<<<<<< changes may have to be made here also... test If intshippingcount>0 then for i = 1 to intshippingcount-1 changed 0 to 1 Price=intshippingprices(i) tempoption=intshippingmethods(i) If getconfig("xLCID")="" Then TempOption= TempOption & " [" & formatcurrency(Price,2) & "]" else TempOption= TempOption & " [" & formatnumber(Price,2) & "]" end if intShippingMethods(i)=TempOption next end if end sub
Hope someone finds this helpful.
Raphael Neff www.chesshouse.com [email protected]
|
|