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

eCart Add to Cart - Error "At line 907...has no properties"

Thread began 11/30/2009 4:43 am by webassistdotcom261883 | Last modified 2/08/2010 11:04 am by webassistdotcom261883 | 5068 views | 11 replies


Hi Dani
Thanks for replying.

1. Following my posting to the forum, I made several more attempts, before realising that I could still proceed to the bindings panel, even though it wasn't being populated by the look-up (the original problem).

2. So I clicked on the lightning bolts to add the bindings from the database (DB).
Clicking OK produced an Add to Cart button for the Resources (henceforth 'catalogue') page.
However, first of all, it was treating all the rows the same (i.e. they all had the same value passed to the shopping cart (shopping-cart.php), then I realised that I must have had the option for "Add static item to cart" (even though I'd added the dynamic bindings).
So I reopened the Server Behaviour and made sure that "Look up item ID from recordset" was selected, and double-checked the bindings.

3. Now the catalogue page passed the correct the values to the shopping cart. However, as the 'catalogue' page wasn't redirecting to the shopping cart page after adding an item to the cart, I manually entered the URL to this row:
$ATC_RedirectAfter = "../shop/shopping-cart.php";

4. Now the catalogue page reloads, but seems to lose the recordset values (i.e. ProductName, ProductShortDesc & ProductPrice). It seems that only by clicking on the Add to Cart button for a second time are values are added to the cart, and then they're only from the second DB row!

There's something wrong somewhere!

I've attached screenshots of the General tab (after the OP error message comes up) and of the Bindings tab.

In the code, the bindings now show (if I've got this right!):

// WA eCart AddToCart
if (isset($_POST["eCart3_1_ATC"]) || isset($_POST["eCart3_1_ATC_x"])) {
$ATC_itemID = $_POST["eCart3_1_ID_Add"];
$ATC_AddIfIn = 4;
$ATC_RedirectAfter = "../shop/shopping-cart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_romeroRecordset1) && $totalRows_romeroRecordset1 > 0) {
$row_romeroRecordset1 = WAEC_findRecordMySQL($romeroRecordset1, "", $ATC_itemID);
if ($row_romeroRecordset1) {
$ATC_itemName = "".$row_romeroRecordset1['ProductName'] ."";// column binding
$ATC_itemDescription = "".$row_romeroRecordset1['ProductShortDesc'] ."";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["eCart3_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_romeroRecordset1['ProductPrice'] ."");// column binding
mysql_data_seek($romeroRecordset1, 0);
$row_romeroRecordset1 = mysql_fetch_assoc($romeroRecordset1);
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$eCart3->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice);
if ($ATC_RedirectAfter != "" && $eCart3->redirStr == "") {
$eCart3->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'];
// WA eCart Redirect
if ($eCart3->redirStr != "") {
header("Location: ".$eCart3->redirStr);

and the Form part:

<form name="eCart3_1_ATC_<?php echo $row_romeroRecordset1['ProductID']; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="eCart3_1_ID_Add" value="<?php echo $row_romeroRecordset1['ProductID']; ?>" >
<input type="text" name="eCart3_1_Quantity_Add" value="1" size="4" >
<input type="image" src="../../WA_eCart/Images/Desert Spice/Btn1_EN_addtocart.gif" border="0" value="Add to Cart" name="eCart3_1_ATC" alt="Add to shopping basket">

Thanks again!

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