Multiple Add to Cart Problems...
Hi
I'm trying to add multiple items to my cart, but nothing happens when I hit the add to cart button on the site. Here is the URL: counsellors_Results.php
Here is the filter:
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: counsellorsAddSelected;
//Searchpage: ;
//Form: ;
$WADbSearch2_DefaultWhere = "AND counsellorID = 0";
if (!session_id()) session_start();
if (isset($_POST["AddToCartBtn_x"])) {
$WADbSearch2 = new FilterDef;
$WADbSearch2->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
//comparison list additions
$WADbSearch2->addComparisonFromList("counsellorID","ATCCheck","AND","=",1);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch2_counsellors_Results"]=$WADbSearch2->whereClause;
}
}
else {
$WADbSearch2 = new FilterDef;
$WADbSearch2->initializeQueryBuilder("MYSQL","1");
//get the filter definition from a session variable
if (1 == 1) {
if (isset($_SESSION["WADbSearch2_counsellors_Results"]) && $_SESSION["WADbSearch2_counsellors_Results"] != "") {
$WADbSearch2->whereClause = $_SESSION["WADbSearch2_counsellors_Results"];
}
else {
$WADbSearch2->whereClause = $WADbSearch2_DefaultWhere;
}
}
else {
$WADbSearch2->whereClause = $WADbSearch2_DefaultWhere;
}
}
$WADbSearch2->whereClause = str_replace("\\''", "''", $WADbSearch2->whereClause);
$WADbSearch2whereClause = '';
?>
Here is the form:
<form method="post" name="add_to_cart" id="add_to_cart">
<table width="800">
<tr>
<td width="638">Click the <strong>Book Personal Assessment Now</strong> button to add all selected counsellors to the shopping cart.</td>
<td width="150"><input type="image" name="AddToCartBtn" id="AddToCartBtn" src="images/counselling/book-pa-now.gif" /></td>
</tr>
</table>
<table class="WADAResultsTable" border="0" cellpadding="0" cellspacing="0">
<tr>
<th class="WADAResultsTableHeader">Counsellor Name:</th>
<th class="WADAResultsTableHeader">Town:</th>
<th class="WADAResultsTableHeader">County/Country:</th>
<th class="WADAResultsTableHeader">Counsellor Bio:</th>
<th class="WADAResultsTableHeader">Professional Body:</th>
<th class="WADAResultsTableHeader">Ongoing Fees/Session:</th>
<th class="WADAResultsTableHeader">Type of Therapy:</th>
</tr>
<?php do { ?>
<tr class="<?php echo $WARRT_AltClass1->getClass(true); ?>">
<td class="WADAResultsTableCell"><?php echo($row_WADAcounsellors['first_name']); ?>
<input name="ATCCheck[]" id="ATCCheck[]" type="checkbox" value="<?php echo $row_counsellorsAddSelected['counsellorID']; ?>" />
<span class="WADAResultsTableCellname"> Include this counsellor in your booking.</span></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAcounsellors['town']); ?></td>
<td class="WADAResultsTableCell"><?php echo $row_WADAcounsellors['county_country']; ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAcounsellors['bio']); ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAcounsellors['professional_body']); ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAcounsellors['fees_session']); ?></td>
<td class="WADAResultsTableCell"><?php echo($row_WADAcounsellors['type_of_therapy']); ?></td>
</tr>
<?php } while ($row_WADAcounsellors = mysql_fetch_assoc($WADAcounsellors)); ?>
</table>
</form>
Thanks