View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Allow customer to choose shipping

Thread began 6/12/2009 7:30 am by Travis250923 | Last modified 6/16/2009 4:55 pm by Travis250923 | 2435 views | 19 replies


So I looked back at my code and I did have it in quotes. It works for express but for priority I get a redirect error. So perhaps its not with the package type. I labeled the code lines

$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "FLAT RATE BOX";
Warning: Cannot modify header information - headers already sent by (output started at C:\Apache2\htdocs\ecochic\confirm.php:110) in C:\Apache2\htdocs\ecochic\confirm.php on line 127

Here is the full code for the shipping:

//WA eCart (Copyright 2007, WebAssist)
//WA eCart USPS Shipping - USPS
$Shipping_SuccessURL = "";
$Shipping_FailureURL = "shipping_failure.php";
$Shipping_Packaging = 0;
$Shipping_PackageArray = array();
$Shipping_PackageIndex = 0;
$Shipping_Counter = 0;
$Shipping_Parameters = array();
$Shipping_Parameters["UserID"] = "999999999";
$Shipping_Parameters["USPSServer"] = "";
$Shipping_Parameters["CarrierCode"] = "".$_SESSION['USPS_Shipping'] ."";
$Shipping_Parameters["DefaultIntl"] = "none";
$Shipping_Parameters["ShipperZip"] = "48197";
$Shipping_Parameters["ShiptoZip"] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$Shipping_Parameters["ShiptoCountry"] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
while (($Shipping_Packaging == 1 && !$ecochic->EOF()) || ($Shipping_Packaging == 0 && $Shipping_Counter == 0)) {
if (WA_eCart_USPS_IsTrueValue("true")) {
$Shipping_PackageArray[] = array();
$Shipping_PackageIndex = sizeof($Shipping_PackageArray)-1;
$Shipping_PackageArray[$Shipping_PackageIndex]["eCart_Quantity"] = (($Shipping_Packaging == 1)?$ecochic->DisplayInfo("Quantity"):1);
$Shipping_PackageArray[$Shipping_PackageIndex]["IsPackage"] = "true";
$Shipping_PackageArray[$Shipping_PackageIndex]["Quantity"] = "1";
$Shipping_PackageArray[$Shipping_PackageIndex]["WeightUnits"] = "lb";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".$ecochic->DisplayInfo("TotalWeight") ."";

if($_SESSION['USPS_Shipping'] == "PRIORITY"){
LINE110 echo '$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "FLAT RATE BOX"; ';
} else {
echo '$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "YOURPACKAGING"; ';

$Shipping_PackageArray[$Shipping_PackageIndex]["PackageSize"] = "LARGE";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageMachinable"] = "True";
$Shipping_PackageArray[$Shipping_PackageIndex]["IPackageType"] = "none";
//Special Services
if ($Shipping_Packaging == 1) $ecochic->MoveNext();
if ($Shipping_Packaging == 1) $ecochic->MoveFirst();
$Shipping_Result = WA_eCart_USPS_GetRateQuote($ecochic, $Shipping_Parameters, $Shipping_PackageArray);
if ($Shipping_Result && $Shipping_SuccessURL != "")
$ecochic->redirStr = $Shipping_SuccessURL;
else if (!$Shipping_Result && $Shipping_FailureURL != "") {
LINE127 Header("Location: " . $Shipping_FailureURL); exit;
else if (!isset($_SESSION["ecochic_USPS_Success"])) {

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





Ease of use


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