I just wanted to run this code by you one more time to make sure I've set everything up correctly. If it looks okay and there seems to be an issue somewhere else, then we can set up a support ticket and go from there. I really appreciate your help with this.
I set up a test page to check the shipping charges in the cart display, and it does show the same result, which is no charge (or label) for shipping at all.
Flat rate set session:
<?php
if (!session_id()) session_start();
if((((isset($_POST["UPS_Service"]))?$_POST["UPS_Service"]:"") != "")) {
$_SESSION["flat_shipping"] = "".((isset($_POST["UPS_Service"]))?$_POST["UPS_Service"]:"") ."";
}
if(($_POST["UPS_Service"] != "") && (($_POST["UPS_Service"] == '50') || ($_POST["UPS_Service"] == '100')) ) { // I used 50 for US and 100 for internationsl
$_SESSION["flat_shipping"] = $_POST["UPS_Service"];
}
?>
UPS set session:
<?php
if (!session_id()) session_start();
if((((isset($_POST["UPS_Service"]))?$_POST["UPS_Service"]:"") != "")) {
$_SESSION["UPS_Service"] = "".((isset($_POST["UPS_Service"]))?$_POST["UPS_Service"]:"") ."";
}
?>
The beginning and end code of my UPS server behavior:
<?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_Parameters = array();
etc., etc. ...
$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 } ?>
Shipping Rules from cart object:
UPS Shipping Rule:
function WAEC_TJCart_UPSShipping() {
$totalShipping = 0;
if (true && (("UPS"=="UPS")&&(isset($_SESSION["TJCart_UPS_Quote"]))&&(floatval($_SESSION["TJCart_UPS_Quote"]) != 0) && ((isset($_SESSION['flat_rate'])?$_SESSION['flat_rate']:"") != "0") && ((isset($_SESSION['flat_rate'])?$_SESSION['flat_rate']:"") != "0"))) {
$totalShipping += floatval($_SESSION["TJCart_UPS_Quote"]) + 0;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
Flat-Rate Rules:
//eCart Rule
function WAEC_TJCart_FlatRateUSA() {
$totalShipping = 0;
if (true && ((isset($_SESSION['flat_shipping'])) && ((isset($_SESSION['flat_rate'])?$_SESSION['flat_rate']:"") == "50"))) {
$totalShipping += 0;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_TJCart_FlatRateInternational() {
$totalShipping = 0;
if (true && ((isset($_SESSION['flat_rate'])) && ((isset($_SESSION['flat_rate'])?$_SESSION['flat_rate']:"") == "100"))) {
$totalShipping += 0;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}