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!