close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

FedEx Shipping "Per Item" Charge

Thread began 6/28/2009 6:58 pm by psychobilly1165508 | Last modified 6/29/2009 9:32 am by psychobilly1165508 | 1059 views | 1 replies |

psychobilly1165508

FedEx Shipping "Per Item" Charge

I'm trying to have FedEx shipping quotes based on a "One package per item purchased".
It's selected in FedEx eCart server behavior screen.

It still calculates as one package for the entire order. This is important because I have products that will exceed the 150lbs limit unless shipped as separate packages.

Here's my FedEx code:
<%
if (Request.ServerVariables("Request_Method") = "POST") then
'WA eCart (Copyright 2007, WebAssist)
'WA eCart FedEx Shipping - FedEx
Dim Shipping_SuccessURL, Shipping_FailureURL, Shipping_Packaging, Shipping_PackageIndex, Shipping_Counter, Shipping_Parameters, Shipping_SubPackage, Shipping_PackageArray
set Shipping_Parameters = new WA_eCart_FedEx_Parameters
set Shipping_SubPackage = new WA_eCart_FedEx_Package
Shipping_SuccessURL = ""
Shipping_FailureURL = "shipping_failure.asp"
Shipping_Packaging = 1
Shipping_PackageArray = Array()
Shipping_PackageIndex = 0
Shipping_Counter = 0
Shipping_Parameters.ShiptoState = "" & cStr(Request.Form("shipping_state_province")) & ""
Shipping_Parameters.ShiptoZip = "" & cStr(Request.Form("shipping_postcode")) & ""
Shipping_Parameters.ShiptoCountry = "" & cStr(Request.Form("shipping_country")) & ""
Shipping_Parameters.FedExAccount = "xxxxxxxx"
Shipping_Parameters.FedExMeter = "xxxxxx"
Shipping_Parameters.FedExServer = "https://gateway.fedex.com:443/GatewayDC"
If cStr(Request.Form("FedEx_Service")) = "FEDEXGROUND" Then
Shipping_Parameters.CarrierCode = "FDXG"
else
Shipping_Parameters.CarrierCode = "FDXE"
end if
Shipping_Parameters.FedExService = "" & cStr(Request.Form("FedEx_Service") ) & ""
Shipping_Parameters.FedExPickUp = "REGULARPICKUP"
Shipping_Parameters.ReturnShipmentIndicator = "none"
Shipping_Parameters.ShipperState = "CA"
Shipping_Parameters.ShipperZip = "92649"
Shipping_Parameters.ShipperCountry = "US"
while ((Shipping_Packaging = 1 AND not WA_eCart_EOF(madrid)) OR (Shipping_Packaging = 0 AND Shipping_Counter = 0))
if (WA_eCart_FedEx_IsTrueValue("true")) then
ReDim Preserve Shipping_PackageArray(Shipping_PackageIndex+1)
set Shipping_SubPackage = new WA_eCart_FedEx_Package
if (Shipping_Packaging = 1) then
Shipping_SubPackage.eCart_Quantity = WA_eCart_DisplayInfo(madrid, "Quantity")
else
Shipping_SubPackage.eCart_Quantity = 1
end if
Shipping_SubPackage.IsPackage = "true"
Shipping_SubPackage.Quantity = "" & cStr(WA_eCart_DisplayInfo(madrid, "Quantity")) & ""
Shipping_SubPackage.DeclaredValue = "0"
Shipping_SubPackage.WeightUnits = "LBS"
Shipping_SubPackage.PackageWeight = "" & cStr(WA_eCart_FormatNumber(WA_eCart_DisplayInfo(madrid, "Weight"), true, 1)) & ""
Shipping_SubPackage.PackageType = "YOURPACKAGING"
Shipping_SubPackage.SizeUnits = "IN"
Shipping_SubPackage.PackageLength = "2"
Shipping_SubPackage.PackageWidth = "2"
Shipping_SubPackage.PackageHeight = "2"
'Special Services
Shipping_SubPackage.RESIDENTIALDELIVERY = ""
Shipping_SubPackage.RESIDENTIALPICKUP = ""
Shipping_SubPackage.INSIDEDELIVERY = ""
Shipping_SubPackage.INSIDEPICKUP = ""
Shipping_SubPackage.SATURDAYDELIVERY = ""
Shipping_SubPackage.SATURDAYPICKUP = ""
Shipping_SubPackage.HOLDATLOCATION = ""
Shipping_SubPackage.DRYICE = ""
Shipping_SubPackage.DANGEROUSGOODS = ""
Shipping_SubPackage.HOMEDELIVERYTYPE = ""
Shipping_SubPackage.SIGNATUREREQUIRED = ""
Shipping_SubPackage.AOD = ""
Shipping_SubPackage.AUTOPOD = ""
Shipping_SubPackage.NONSTANDARDPACKAGE = ""
Shipping_SubPackage.COD = ""
Shipping_SubPackage.CODCOLLECTAMOUNT = ""
Shipping_SubPackage.CODCOLLECTTYPE = ""
set Shipping_PackageArray(Shipping_PackageIndex) = Shipping_SubPackage
Shipping_PackageIndex = Shipping_PackageIndex+1
end if
Shipping_Counter = Shipping_Counter + 1
if (Shipping_Packaging = 1) then
set madrid = WA_eCart_MoveNext(madrid)
end if
wend
if (Shipping_Packaging = 1) then
set madrid = WA_eCart_MoveFirst(madrid)
end if
Shipping_Result = WA_eCart_FedEx_GetRateQuote(madrid, Shipping_Parameters, Shipping_PackageArray)
if (Shipping_Result) then
if (Shipping_SuccessURL <> "") then
madrid_redirStr = Shipping_SuccessURL
end if
elseif (Shipping_FailureURL <> "") then
Response.Redirect(Shipping_FailureURL)
end if
elseif (cStr(Session("madrid_FedEx_Success")) = "") then
WA_eCart_FedEx_SetSessionDefaults(madrid)
end if
%>

Thanks

Sign in to reply to this post

psychobilly1165508

This is working, my client had the wrong weights in the database.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...