tax based on either or session
Can someone please help me with this code. I am close but...
This code works:
//eCart Rule
function WAEC_cali_cart_PaotherSalesTax() {
$totalTax = 0;
if (true && (((isset($_SESSION['PayPal_ExpressCheckout_ship_countypp2'])?$_SESSION['PayPal_ExpressCheckout_ship_countypp2']:"") == "PAOTHER")) && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "PA"))
{
$totalTax += ($this->GetTaxableTotal() * 0.06);//Result
This creates tax based on two session variables needing to be satisfied but I want to add an either / or session variable as well like below (but it does not work):
//eCart Rule
function WAEC_cali_cart_PaphiladelphiaSalesTax() {
$totalTax = 0;
if (true && (((isset($_SESSION['eCartCheckoutForm_ship_countypa'])?$_SESSION['eCartCheckoutForm_ship_countypa']:"") == "PAOTHER")) || (((isset($_SESSION['PayPal_ExpressCheckout_ship_countypp2'])?$_SESSION['eCartCheckoutForm_ship_countypp2']:"") == "PAOTHER")) && ((isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:"") == "PA")) {
$totalTax += ($this->GetTaxableTotal() * 0.06);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
Thank you in advance.