Chechbox size options - Confused
I have read most of the forum posts and tutorials about checkbox options for eCart. Particularly, Product Options with eCart and Checkbox method for add to cart. I have gained some knowledge to understand how this functions. Unfortunately, none of the above match exactly what I need to achieve and with my limited knowledge of coding I am pretty much confused. Trying to cut and paste from a variety of posts is certainly not my speciality.
I have used dataAssist to generate my back end pages for the clothing. On my clothing details page I have the main recordset using a URL parameter for the ID which works well and I'm able to display all the clothing information I need.
My second recordset is for the size options that I would like to display using checkboxes/checkbox group. It is here that I am stumped.
I have successfully managed to get e-cart to work properly except for the checkbox size options.
I only have one option for the option group, namely: product sizes. Some in age, some in measurement and some in size.
I have three tables for the above functionality:
ssProductClothing,
ss_ClothingID
ss_ClothingName
ss_ClothingImage
ss_ClothingSizeGroup
ssSizeGroups,
ss_SizeGroupID
ss_SizeGroupName
ssSizes
ss_SizeID
ss_SizeGroupParentID
ss_SizeName
I specifically need step for step help (as I have never done this before) to add checkboxes that hold information from the size recordset.
Then I need to know how to filter this recordset to pass only the values of the sizes that the visitor has selected. ( not sure if must use the web assist search wizard to accomplish this - never used it before)
Here is the code for 2 recordsets on the detail page:
$colname_rsSchoolwearDetails = "-1";
if (isset($_GET['ClothingDetails'])) {
$colname_rsSchoolwearDetails = $_GET['ClothingDetails'];
}
mysql_select_db($database_connSSlist, $connSSlist);
$query_rsSchoolwearDetails = sprintf("SELECT ssProductClothing.ss_ClothingID, ssProductClothing.ss_ClothingCode, ssProductClothing.ss_ClothingName, ssProductClothing.ss_ClothingImage, ssProductClothing.ss_ClothingImageTitle, ssProductClothing.ss_ClothingColour, ssProductClothing.ss_ClothingSizeGroup, ssProductClothing.ss_ClothingOuterPackaging, ssProductClothing.ss_ClothingInnerPackaging, ssProductClothing.ss_ClothingComposition, ssProductClothing.ss_ClothingPrice, ssProductClothing.ss_ClothingPromote, ssProductClothing.ss_ClothingStatus, ssColours.ss_ColourName, ssSizes.ss_SizeName, ssPackagingOuter.ss_PackagingQuantity, ssPackagingInner.ss_InnerContent, ssFabricComposition.ss_CompositionContent FROM ssProductClothing INNER JOIN ssColours ON ssProductClothing.ss_ClothingColour = ssColours.ss_ColourID INNER JOIN ssSizes ON ssProductClothing.ss_ClothingSizeGroup = ssSizes.ss_SizeGroupParentID INNER JOIN ssPackagingOuter ON ssProductClothing.ss_ClothingOuterPackaging = ssPackagingOuter.ss_PackagingID INNER JOIN ssPackagingInner ON ssProductClothing.ss_ClothingInnerPackaging = ssPackagingInner.ss_InnerID INNER JOIN ssFabricComposition ON ssProductClothing.ss_ClothingComposition = ssFabricComposition.ss_CompositionID WHERE ssProductClothing.ss_ClothingID = %s AND ssProductClothing.ss_ClothingPromote = 0 AND ssProductClothing.ss_ClothingStatus = 1", GetSQLValueString($colname_rsSchoolwearDetails, "int"));
$rsSchoolwearDetails = mysql_query($query_rsSchoolwearDetails, $connSSlist) or die(mysql_error());
$row_rsSchoolwearDetails = mysql_fetch_assoc($rsSchoolwearDetails);
$totalRows_rsSchoolwearDetails = mysql_num_rows($rsSchoolwearDetails);
$paramItem_rsSizes = "-1";
if (isset($row_rsSchoolwearDetails['ss_ClothingSizeGroup'])) {
$paramItem_rsSizes = $row_rsSchoolwearDetails['ss_ClothingSizeGroup'];
}
mysql_select_db($database_connSSlist, $connSSlist);
$query_rsSizes = sprintf("SELECT * FROM ssSizes WHERE ssSizes.ss_SizeGroupParentID = %s", GetSQLValueString($paramItem_rsSizes, "int"));
$rsSizes = mysql_query($query_rsSizes, $connSSlist) or die(mysql_error());
$row_rsSizes = mysql_fetch_assoc($rsSizes);
$totalRows_rsSizes = mysql_num_rows($rsSizes);
Thanks in advance for your much-needed assistance