If you are having trouble with UPS not having the product dimensions calculated correctly before requesting the rates, the following code may help. It multiplies the dimensions by the number of products you have and works out the correct dimensions for a package containing all items purchased.
Add this to the top of upsxmlrealtime.asp below the other DIM statements
Dim totdim1, totdim2, totdim3, totalvolume, cubed1
Then, locate the following code -
If getupsconfig("xdimensionfield",false, dbc)<>"" then
tempdimensions=rs(getupsconfig("xdimensionfield",false, dbc))
if not isnull(tempdimensions) then
productdimensions=tempdimensions
end if
end if
Change to -
If getupsconfig("xdimensionfield",false, dbc)<>"" then
tempdimensions=rs(getupsconfig("xdimensionfield",false, dbc))
if not isnull(tempdimensions) then
productdimensions=tempdimensions
dim tempdim1, tempdim2, tempdim3, tempdim4
tempdim1 = left(productdimensions, instr(productdimensions, " ") - 1)
tempdim2 = right(productdimensions, len(productdimensions) - instr(productdimensions, " "))
tempdim3 = left(tempdim2, instr(tempdim2, " ") -1)
tempdim4 = right(tempdim2, instr(tempdim2, " ") -1)
totdim1=totdim1 + (tempdim1 * prodquantity)
if tempdim3>totdim2 then
totdim2=tempdim3
else
totdim2=totdim2
end if
if tempdim4>totdim3 then
totdim3=tempdim4
else
totdim3=totdim3
end if
totalvolume = int(totdim1 * totdim2 * totdim3)
cubed1 = int(totalvolume ^ (1/3))
productdimensions = cubed1 & " " & cubed1 & " " & cubed1
end if
end if