Optionnal charges
Hi
I would like to have an optionnal charges with radio button "yes" & "no"
so i apply on the Ecart Merchandissing Rule the condition "Based on session variable value" and i've done on the cart page :
the session is
<?php
if (!session_id()) session_start();
if(!isset($_SESSION["choix"])) {
$_SESSION["choix"] = "".((isset($_POST["choix"]))?$_POST["choix"]:"") ."";
}
?>
the radio button :
oui : <input type="radio" name="choix" value="1" checked/><br>
non : <input type="radio" name="choix" value="0" />
the function call :
function WAEC_PIERROT_Assurance() {
$totalTax = 0;
if (true && (((isset($_SESSION['choix'])?$_SESSION['choix']:"") == "1"))) {
$totalTax += ($this->TotalColumn("TotalPrice") * 0.0285);//Result
}
return WA_eCart_FormatNumber($totalTax, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
but it doesn't work : no caluculation apply
Do you have an idea ?