close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Changing a value in the eCart Object not working

Thread began 4/04/2012 2:32 pm by Christopher West | Last modified 4/04/2012 2:38 pm by Christopher West | 396 views | 1 replies |

Christopher WestCommunity Expert

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 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:

// 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'];

Attached Files
Sign in to reply to this post

Christopher WestCommunity Expert

...actually...its all good...i found the problem :) I hadnt edited this line of code:

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, $ATC_itemShippingCost);

I forgot to put the new field reference at the end :)


Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...