View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Please help ups shipping code worng?

Thread began 8/04/2009 10:48 am by toleehua356796 | Last modified 8/04/2009 1:58 pm by toleehua356796 | 785 views | 1 replies

toleehua356796

Please help ups shipping code worng?

Hi. i used the power store102. I am not set it up the usps shipping. I used the e cart to add the ups shipping on the comfirm.php page server behavior add the ecart UPS shipping.
e cart made the code
link 45
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".WA_eCart_FormatNumber($WA_St45ore_Cart->TotalColumn('TotalWeight'), true, 1) ."";

when i load up the firefox show this:
Fatal error: Call to undefined function: wa_ecart_formatnumber() in /homepages/19/d292133172/htdocs/confirm.php on line 45


can toll me how to fix? i follow the ecat to made the page. this is all the ECART MADE THE CODE ON THE PAGE:

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
//WA eCart (Copyright 2007, WebAssist)
//WA eCart UPS Shipping - UPS
$Shipping_SuccessURL = "";
$Shipping_FailureURL = "checkout_failure.php";
$Shipping_Packaging = 0;
$Shipping_PackageArray = array();
$Shipping_PackageIndex = 0;
$Shipping_Counter = 0;
$Shipping_Parameters = array();
$Shipping_Parameters["UserID"] = "XXXX";
$Shipping_Parameters["Password"] = "XXXXX";
$Shipping_Parameters["AccessKey"] = "XXXXXXX";
$Shipping_Parameters["CarrierCode"] = "03";
$Shipping_Parameters["PickupType"] = "01";
$Shipping_Parameters["CustomerClass"] = "04";
$Shipping_Parameters["ShipperNumber"] = "";
$Shipping_Parameters["ShipperCity"] = "new york";
$Shipping_Parameters["ShipperState"] = "NY";
$Shipping_Parameters["ShipperZip"] = "10013";
$Shipping_Parameters["ShipperCountry"] = "US";
$Shipping_Parameters["ShiptoCity"] = "".((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:"") ."";
$Shipping_Parameters["ShiptoState"] = "".((isset($_POST["state_province"]))?$_POST["state_province"]:"") ."";
$Shipping_Parameters["ShiptoZip"] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$Shipping_Parameters["ShiptoCountry"] = "US";
while (($Shipping_Packaging == 1 && !$WA_Store_Cart->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)?$WA_Store_Cart->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($WA_Store_Cart->TotalColumn('TotalWeight'), true, 1) ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "02";
$Shipping_PackageArray[$Shipping_PackageIndex]["SizeUnits"] = "IN";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageLength"] = "12";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWidth"] = "10";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageHeight"] = "5";
//Special Services
}
$Shipping_Counter++;
if ($Shipping_Packaging == 1) $WA_Store_Cart->MoveNext();
}
if ($Shipping_Packaging == 1) $WA_Store_Cart->MoveFirst();
$Shipping_Result = WA_eCart_UPS_GetRateQuote($WA_Store_Cart, $Shipping_Parameters, $Shipping_PackageArray);
if ($Shipping_Result && $Shipping_SuccessURL != "")
$WA_Store_Cart->redirStr = $Shipping_SuccessURL;
else if (!$Shipping_Result && $Shipping_FailureURL != "") {
Header("Location: " . $Shipping_FailureURL); exit;
}
}
else if (!isset($_SESSION["WA_Store_Cart_UPS_Success"])) {
WA_eCart_UPS_SetSessionDefaults($WA_Store_Cart);
}
?>

Any one can help ? help me looking all the ecart made the code. is right or how to fix the code. Thanks!

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