View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Add a flat-rate shipping option to UPS list

Thread began 9/23/2009 4:32 pm by christy342106 | Last modified 9/30/2009 8:49 pm by christy342106 | 4199 views | 11 replies

christy342106

I deleted the segment of code, but I am still getting the same results - no shipping charges at all. I also noticed that the flat_shipping session was toward the top of the page instead of down with the rest of the shipping rules, so I moved it down in case that made a difference. Below is my new code on the confirm page. Thanks again -

<?php
//WA eCart UPS Shipping Include
require_once("WA_eCart/WA_eCart_UPS_PHP.php");
?>
<?php
if (!session_id()) session_start();
if(($_POST["UPS_Service"] != "") && (($_POST["UPS_Service"] == '50') || ($_POST["UPS_Service"] == '100')) ) {
$_SESSION["flat_shipping"] = $_POST["UPS_Service"];
}
?>
<?php
if (!session_id()) session_start();
if((((isset($_POST["UPS_Service"]))?$_POST["UPS_Service"]:"") != "")) {
$_SESSION["UPS_Service"] = "".((isset($_POST["UPS_Service"]))?$_POST["UPS_Service"]:"") ."";
}
?>
<?php if( !(isset($_SESSION["flat_shipping"])) ) { ?>
<?php
if ((((isset($_POST["Checkout_x"]))?$_POST["Checkout_x"]:"") != "")) {
//WA eCart (Copyright 2007, WebAssist)
//WA eCart UPS Shipping - UPS
$Shipping_SuccessURL = "";
$Shipping_FailureURL = "shipping_failure.php";
$Shipping_Packaging = 0;
$Shipping_PackageArray = array();
$Shipping_PackageIndex = 0;
$Shipping_Counter = 0;

$Shipping_Counter++;
if ($Shipping_Packaging == 1) $TJCart->MoveNext();
}
if ($Shipping_Packaging == 1) $TJCart->MoveFirst();
$Shipping_Result = WA_eCart_UPS_GetRateQuote($TJCart, $Shipping_Parameters, $Shipping_PackageArray);
if ($Shipping_Result && $Shipping_SuccessURL != "")
$TJCart->redirStr = $Shipping_SuccessURL;
else if (!$Shipping_Result && $Shipping_FailureURL != "") {
Header("Location: " . $Shipping_FailureURL); exit;
}
}
else if (!isset($_SESSION["TJCart_UPS_Success"])) {
WA_eCart_UPS_SetSessionDefaults($TJCart);
}
?>
<?php } ?>

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