Thanks, that worked for one group but not the other
There are actually three options for embroidery (select menus show relevant options by product)
-- plain (no embroidery)
-- embroidery with $15 surcharge
-- embroidery with price included in product price
The $15 surcharge OR price included is option #2 in their respective select lists (either way customer has to make embroidery selection). Plain (no embroidery) always being #1
For some reason the $15 surcharge menu item works with the validation
product_detail.php?ProductID=1
The price included does not, validation is ignored.
product_detail.php?ProductID=13
<?php
if (isset($_POST["eCart1_1_ATC_x"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_productdetail_366_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_Color_Add"]))?$_POST["eCart1_1_Color_Add"]:"") . "",true,1);
if ($totalRows_rsEmbroidery > 0) {
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_Embroidery_Add"]))?$_POST["eCart1_1_Embroidery_Add"]:"") . "",true,2);
}
if (isset($_POST["eCart1_1_Embroidery_Add"]) && $_POST["eCart1_1_Embroidery_Add"] == "2") {
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_EmbroideryType_Add"]))?$_POST["eCart1_1_EmbroideryType_Add"]:"") . "",true,3);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["eCart1_1_embroiderystyle_Add"]))?$_POST["eCart1_1_embroiderystyle_Add"]:"") . "",true,4);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["EmbroideryText"]))?$_POST["EmbroideryText"]:"") . "",true,5);
}
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"productdetail_366");
}
}
?>
Could it be related to the database table options.Options ID?
Plain is 1
+$15 is 2
Included is 12
I did try changing == "2" to >= "2" but that messed with the Plain #1 option, causing the embroidery selection validation to activate again