close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Shipping Quote inconsistent

Thread began 5/31/2012 8:16 pm by steve204795 | Last modified 6/04/2012 12:33 pm by steve204795 | 771 views | 5 replies

steve204795

multiple shipping choice

Hi Jason ... some time it does match but it varies if I go back to modify my choice of shipper type ... my client just gave me a sample address and product to use to compare with his online calculations when runinng it thru UPS.com or USPS.com

i pre-populated the checkout page with the info .. the address state is INDIANA the product is Structo Wrecker Auto Truck

here's a bit explanation of how i did the shipping choices which maybe the issue?:

on the checkout i have a dropdown with the choices then that is set on the confirm as a session var eCartCheckoutForm_Ship_Type ... then i use that for WAGLOBAL_Shipping which i use to select the WA shipping include and code with the settings of Priority, express etc ...

<?php
if($_SESSION['eCartCheckoutForm_Ship_Type'] == "01")
{
$WAGLOBAL_Shipping = 1;

}
else if($_SESSION['eCartCheckoutForm_Ship_Type'] == "02")
{
$WAGLOBAL_Shipping = 2;

}
else if($_SESSION['eCartCheckoutForm_Ship_Type'] == "03")
{
$WAGLOBAL_Shipping = 3;

}
else if($_SESSION['eCartCheckoutForm_Ship_Type'] == "04")
{
$WAGLOBAL_Shipping = 4;

}
else if($_SESSION['eCartCheckoutForm_Country'] != "US")
{
$WAGLOBAL_Shipping = 5;
}

// if Using UPS
?>
<?php
// calculate shipping costs using UPS
?>
<?php
if($WAGLOBAL_Shipping == 1) {
?>
<?php
//WA eCart UPS Shipping Include
require_once("WA_eCart/WA_eCart_UPS_PHP.php");
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
//WA eCart (Copyright 2007, WebAssist)
//WA eCart UPS Shipping - UPS
$Shipping_SuccessURL = "";
$Shipping_FailureURL = "shipping_failure.php";
$Shipping_Packaging = 1;
$Shipping_PackageArray = array();
$Shipping_PackageIndex = 0;
$Shipping_Counter = 0;
$Shipping_Parameters = array();
$Shipping_Parameters["UserID"] = "americantoys";
$Shipping_Parameters["Password"] = "Toys4u2012";
$Shipping_Parameters["AccessKey"] = "FC98C4007ED02F08";
$Shipping_Parameters["CarrierCode"] = "03";
$Shipping_Parameters["PickupType"] = "06";
$Shipping_Parameters["CustomerClass"] = "03";
$Shipping_Parameters["ShipperNumber"] = "471V5W";
$Shipping_Parameters["ShipperCity"] = "Chester";
$Shipping_Parameters["ShipperState"] = "NJ";
$Shipping_Parameters["ShipperZip"] = "07930";
$Shipping_Parameters["ShipperCountry"] = "US";
$Shipping_Parameters["ShiptoCity"] = "".((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:"") ."";
$Shipping_Parameters["ShiptoState"] = "".((isset($_POST["shipping_state_province"]))?$_POST["shipping_state_province"]:"") ."";
$Shipping_Parameters["ShiptoZip"] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$Shipping_Parameters["ShiptoCountry"] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
while (($Shipping_Packaging == 1 && !$eCart3->EOF()) || ($Shipping_Packaging == 0 && $Shipping_Counter == 0)) {
if (WA_eCart_UPS_IsTrueValue("true")) {
$Shipping_PackageArray[] = array();
$Shipping_PackageIndex = sizeof($Shipping_PackageArray)-1;
$Shipping_PackageArray[$Shipping_PackageIndex]["eCart_Quantity"] = (($Shipping_Packaging == 1)?$eCart3->DisplayInfo("Quantity"):1);
$Shipping_PackageArray[$Shipping_PackageIndex]["IsPackage"] = "true";
$Shipping_PackageArray[$Shipping_PackageIndex]["Quantity"] = "1";
$Shipping_PackageArray[$Shipping_PackageIndex]["WeightUnits"] = "LBS";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".WA_eCart_FormatNumber($eCart3->DisplayInfo('Weight'), true, 1) ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "02";
$Shipping_PackageArray[$Shipping_PackageIndex]["SizeUnits"] = "IN";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageLength"] = "".$eCart3->DisplayInfo("Length") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWidth"] = "".$eCart3->DisplayInfo("Width") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageHeight"] = "".$eCart3->DisplayInfo("Height") ."";
//Special Services
}
$Shipping_Counter++;
if ($Shipping_Packaging == 1) $eCart3->MoveNext();
}
if ($Shipping_Packaging == 1) $eCart3->MoveFirst();
$Shipping_Result = WA_eCart_UPS_GetRateQuote($eCart3, $Shipping_Parameters, $Shipping_PackageArray);
if ($Shipping_Result && $Shipping_SuccessURL != "")
$eCart3->redirStr = $Shipping_SuccessURL;
else if (!$Shipping_Result && $Shipping_FailureURL != "") {
Header("Location: " . $Shipping_FailureURL); exit;
}
}
else if (!isset($_SESSION["eCart3_UPS_Success"])) {
WA_eCart_UPS_SetSessionDefaults($eCart3);
}
?>

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...