Jump to content

shopping cart problem


fazzfarrell

Recommended Posts

HI I have a shopping cart (attached), it all works untill I add to cart and it puts two entries in to the cart - I have tried it with out drop downs etc and it then works - I have done something wrong, just wondered if any one can see what it is!!!!!

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/38312-shopping-cart-problem/
Share on other sites

<?php $paramID_rsColour = "1";
if (isset($row_rsProducts['ColRef'])) {
  $paramID_rsColour = (get_magic_quotes_gpc()) ? $row_rsProducts['ColRef'] : addslashes($row_rsProducts['ColRef']);
}
mysql_select_db($database_poles, $poles);
$query_rsColour = sprintf("SELECT Colour.Colour_ID, Colour.Name, Colour.ColRef, Colour.Code FROM Colour WHERE Colour.ColRef  = %s", GetSQLValueString($paramID_rsColour, "int"));
$rsColour = mysql_query($query_rsColour, $poles) or die(mysql_error());
$row_rsColour = mysql_fetch_assoc($rsColour);
$totalRows_rsColour = mysql_num_rows($rsColour);

// IntelliCART MX - Add Multiple Items
if ($HTTP_POST_VARS["imxmavf1"]) {
$IMXADD = new addition;
$IMXADD->quantityField = "Qty";
// Loop through the instances
$IMX_Q = $HTTP_POST_VARS["Qty"];
//Reference to posted size
$size_field = $HTTP_POST_VARS['size_selection'];

for ($k=0; $k < count($IMX_Q)+1; $k++) {
	if ($IMX_Q[$k] > 0) {
	$IMXADD->column[] = $row_rsProducts['Product_ID'];
	$IMXADD->column[] = $row_rsProducts['CatID'];
	$IMXADD->column[] = '';
	$IMXADD->column[] = $row_rsProducts['CatID2'];
	$IMXADD->column[] = $row_rsProducts['Style'];
	$IMXADD->column[] = $row_rsProducts['Name'];
	$IMXADD->column[] = '';
	$IMXADD->column[] = $IMX_Q[$k];
	$IMXADD->column[] = '';
	$IMXADD->column[] = $row_rsProducts['Misc'];
	$IMXADD->column[] = '';
	$IMXADD->addMultiRow($HTTP_SESSION_VARS["icPoles"]);
	}
	$row_rsProducts = mysql_fetch_assoc($rsProducts);
}
$IMXADD->redirect = "cart.php";
$IMXADD->urlparams = preserve($HTTP_GET_VARS);
$IMXADD->addMultiDone();
}
$HTTP_GET_VARS = preserve($HTTP_GET_VARS);
?>
<form id="frmProducts" name="frmProducts" method="POST" action="<?php echo $PHP_SELF; ?>?<?php echo arrToString($HTTP_GET_VARS); ?>">

Link to comment
https://forums.phpfreaks.com/topic/38312-shopping-cart-problem/#findComment-183620
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.