Changing a value in the eCart Object not working
Hi ya. I had previously (with your help) got shipping rules working...(previously as I wasnt using the Weight field in the ecommerce database I used that just to store a price value for shipping...it was all working fine...When I decided to create a proper field in the databse to store the shipping cost, after updating the eCart Object with the new value, the shipping rule doesnt work no more (before it was distingushing products that cost £7.0 and also products costing 99p). now after I updated the eCart object with the new column name (storing the shipping cost there, rather then the weight column) each time on my testing server the shipping costs is ALWAYS 99p).
What I dont understand is that it worked when I used the "Weight" column in the eCart object...but surely if i just create a new eCart column, and new database field (storing the shipping cost) and reference it together (exactly how I did previously with the weight field in the database and the weight eCart column - it should work right?)
attaching a few screen grabs of the eCart Object and also some code:
<?php
// WA eCart AddToCart
if (isset($_POST["DinkyCart_1_ATC"]) || isset($_POST["DinkyCart_1_ATC_x"])) {
$ATC_itemID = $_POST["DinkyCart_1_ID_Add"];
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "cart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_ItemDetail) && $totalRows_ItemDetail > 0) {
$row_ItemDetail = WAEC_findRecordMySQL($ItemDetail, "ProductID", $ATC_itemID);
if ($row_ItemDetail) {
$ATC_itemName = "".$row_ItemDetail['ProductName'] ."";// column binding
$ATC_itemDescription = "".$row_ItemDetail['ProductCartDesc'] ."";// column binding
$ATC_itemThumbnail = "".$row_ItemDetail['ProductThumb'] ."";// column binding
$ATC_itemWeight = floatval("".$row_ItemDetail['ProductWeight'] ."");// column binding
$ATC_itemQuantity = floatval("1");// column binding
$ATC_itemPrice = floatval("".$row_ItemDetail['ProductPrice'] ."");// column binding
$ATC_itemOptions = "".$optionText. "";// column binding
$ATC_itemOptionsPrice = floatval("".$addPrice ."");// column binding
$ATC_itemShippingCost = floatval("".$row_ItemDetail['ProductShippingCost'] ."");// column binding
mysql_data_seek($ItemDetail, 0);
$row_ItemDetail = mysql_fetch_assoc($ItemDetail);
}
}
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$DinkyCart->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemOptions, $ATC_itemOptionsPrice);
if ($ATC_RedirectAfter != "" && $DinkyCart->redirStr == "") {
$DinkyCart->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'];
}
}
}
?>