'Swapping' an ID on same Item page
Hi guys,
What I am trying to do, is on the Item page, the user is able to select a size variation of the product.
What the code is effectively doing is 'swapping' one id, with another when the user picks a 'size' from a dropdown whilst staying on the current item page.
The _POST for the variations is simply $_POST['variation']
Item 13 is selected so the form appears like so:
<form name="eCart1_1_ATC_13"
and:
<input type="hidden" name="eCart1_1_ID_Add" value="13" >
When the drop down is changed, we stay on this page and reload with the the form changing like so:
<form name="eCart1_1_ATC_909090"
and:
<input type="hidden" name="eCart1_1_ID_Add" value="909090" >
So this part is fine, but I don't know how to edit the code so it inserts this id ..
This is the part Im guessing needs editing:
$ATC_itemID = $_POST["eCart1_1_ID_Add"];
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "cart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_rsProducts01) && $totalRows_rsProducts01 > 0) {
print $row_getItem = WAEC_findRecordMySQL($rsProducts01, "product_id", $ATC_itemID);
if ($row_getItem) {
$ATC_itemName = "".$row_getItem['product_name'] ."";// column binding
$ATC_itemDescription = "".$row_getItem['product_cart_desc'] ."";// column binding
$ATC_itemThumbnail = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["eCart1_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_getItem['product_price'] ."");// column binding
mysql_data_seek($rsProducts01, 0);
$row_getItem = mysql_fetch_assoc($rsProducts01);
}
}
Any help would be great.
Thank in advanced.