Originally Said By: Jason Byrnes
the problem is in the add to cart button server behaviors.
on any page that you have added the add to vcart button server behaviors, you need to edit the Add to cart button server behavior to make sure that a product name is being added to Name column in the cart.
I believe this fixed it, I modified the binding the in Server Behaviors. It now posts through to PayPal correctly.
However now I have a different problem, when I select a size option on the product page, it's supposed to increase the price (Medium, add $2, Large, add $4) and these prices are supposed to be pulled from the database. This no longer works, the price is not increased in the cart, even though the fact that the size has changed is showing correctly on the viewcart page. I can't figure this one out I've tried changing the binding to several different things and none are working. Could you show me how to set that binding right?
If I was just trying to echo the option, I would use this and it would work:
<?php echo $row_rsSize['OptionPriceIncrement']?>
I tried setting the binding to just that and it did not cause the actual item price to increase in the cart.
<?php
// WA eCart AddToCart
if (isset($_POST["softdipes_cart_1_ATC"]) || isset($_POST["softdipes_cart_1_ATC_x"])) {
$ATC_itemID = $_POST["softdipes_cart_1_ID_Add"];
$ATC_AddIfIn = 2;
$ATC_RedirectAfter = "viewcart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_rsProduct) && $totalRows_rsProduct > 0) {
$row_rsProduct = WAEC_findRecordMySQL($rsProduct, "ProductID", $ATC_itemID);
if ($row_rsProduct) {
$ATC_itemName = "".$row_rsProduct['ProductName'] ."";// column binding
$ATC_itemDescription = "".$row_rsProduct['ProductDesc'] ."";// column binding
$ATC_itemThumbnail = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["softdipes_cart_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_rsProduct['ProductPrice'] ."");// column binding
$ATC_itemcolor = "".$_POST["softdipes_cart_1_color_Add"] ."";// column binding
$ATC_itemsize = "".$_POST["softdipes_cart_1_size_Add"] ."";// column binding
$ATC_itemsizePriceInc = "".$_POST["softdipes_cart_1_sizePriceInc_Add"] ."";// column binding
mysql_data_seek($rsProduct, 0);
$row_rsProduct = mysql_fetch_assoc($rsProduct);
}
}
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$softdipes_cart->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemcolor, $ATC_itemsize, $ATC_itemsizePriceInc);
if ($ATC_RedirectAfter != "" && $softdipes_cart->redirStr == "") {
$softdipes_cart->redirStr = $ATC_RedirectAfter;
}
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
}
else {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
}
}
}
?>