add the following script to the head:
<script type="text/javascript">
function showHideEmbroideryOptions(optionIndex) {
if(optionIndex == '2') {
document.getElementById('embroideryOptions').style.visibility = "visible";
} else {
document.getElementById('embroideryOptions').style.visibility = "hidden";
}
}
</script>
change the style tag for the embroideryOptions div to include visibility:hidden;
<div id="embroideryOptions" style="margin-top:15px;padding:5px;border: 2px solid #C00;visibility:hidden;">
and add an onchange event to the embroidery select list:
<select name="eCart1_1_Embroidery_Add" onChange="showHideEmbroideryOptions(this.selectedIndex);">
the checkout behaivor code:
<?php
//WA eCart Redirect Check Out
if (isset($_POST["eCart1_Checkout"]) || isset($_POST["eCart1_Checkout_x"])) {
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
if (strpos($Redirect_redirStr, "?") < 0) {
$Redirect_redirStr .= "?".$_SERVER['QUERY_STRING'];
}
else {
$Redirect_redirStr .= "&".$_SERVER['QUERY_STRING'];
}
}
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "Checkout";
}
?>
does not set a redirect page, change:
if (isset($_POST["eCart1_Checkout"]) || isset($_POST["eCart1_Checkout_x"])) {
$Redirect_redirStr="";
to:
if (isset($_POST["eCart1_Checkout"]) || isset($_POST["eCart1_Checkout_x"])) {
$Redirect_redirStr="checkout.php";