This is a simple fix that I did on my site and it works great.
In uspostalrealtime.asp look for this section of code:
Sub FormatMethods
dim i, tempoption, price
dim errors(10),errorcount
shippingcount=0
for i =0 to tempmethodscount-1
Price=Tempprices(i)
tempoption=TempMethods(i)
if Price<>0 then
If getconfig("xLCID")="" Then
TempOption= TempOption & " [" & formatcurrency(Price,2) & "]"
else
TempOption= TempOption & " [" & formatnumber(Price,2) & "]"
end if
ShippingMethods(shippingcount)=TempOption
shippingcount=shippingcount+1
end if
next
and replace with this:
Sub FormatMethods
dim i, tempoption, price
dim errors(10),errorcount
shippingcount=0
for i =0 to tempmethodscount-1
Price=Tempprices(i)
tempoption=TempMethods(i)
if Price<>0 then
If isnumeric(xMerchantsurcharge) then
price=price+xmerchantsurcharge
end if
If getconfig("xLCID")="" Then
TempOption= TempOption & " [" & formatcurrency(Price,2) & "]"
else
TempOption= TempOption & " [" & formatnumber(Price,2) & "]"
end if
ShippingMethods(shippingcount)=TempOption
shippingcount=shippingcount+1
end if
next
Next in your uspostalconfig.asp add this:
' Merchant Surcharge
' The amount to be added to the USPS returned value
Const Xmerchantsurcharge=0
Change Xmerchantsurcharge=0 to the dollar amount you wish to charge over. Example: Xmerchantsurcharge=4 would add $4 over the base shipping charge retried from usps
What i havent been able to figure out is how to do a % surcharge instead of a fixed amount. Any ideas would be helpful.
NOTE: The message board is removing a key charecter from the code i posted. The price=price+xmerchantsurcharge
should have a plus symbol between price and xmerchantsurcharge with no spaces.
Kamin