close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Undefined variable: ATC_itemQuantity

Thread began 8/19/2011 8:45 am by Base5 Designs | Last modified 8/30/2011 8:01 am by Base5 Designs | 3387 views | 5 replies

Base5 Designs

Undefined variable: ATC_itemQuantity

Hi I am having a problem with my add to cart buttons

Notice: Undefined variable: ATC_itemQuantity in /albionwineshippers.co.uk\httpdocs\startlist.php on line 137

i dont understand why its not getting set, as in firebug it shows the correct ID being posted along with the quantity:

Posted Vars from firebug are:
eCart1_1_ATC Add to Cart
eCart1_1_ATC.x 43
eCart1_1_ATC.y 17
eCart1_1_ID_Add 53
eCart1_1_Quantity_Add 1


I have attached the php file in a zip, the page can be viewed at:
albion.base5.eu (its on an index page and included using framework

the standalone page is here:
startlist.php

here is the code generated by ecart:

<?php
// WA eCart AddToCart
if (isset($_POST["eCart1_1_ATC"]) || isset($_POST["eCart1_1_ATC_x"])) {
$ATC_itemID = $_POST["eCart1_1_ID_Add"];
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "";
$ATC_RedirectIfIn = "";
if (isset($totalRows_rs_products) && $totalRows_rs_products > 0) {
$row_rs_products = WAEC_findRecordMySQL($rs_products, "id_prd", $ATC_itemID);
if ($row_rs_products) {
$ATC_itemName = "".$row_rs_products['name_prd'] ."";// column binding
$ATC_itemDescription = "".$row_rs_products['shortdesc_prd'] ."";// column binding
$ATC_itemThumbnail = "".$row_rs_products['image_prd'] ."";// column binding
$ATC_itemWeight = floatval("".$row_rs_products['weight_prd'] ."");// column binding
$ATC_itemQuantity = "".$_POST["eCart1_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_rs_products['price_prd'] ."");// column binding
$ATC_itemBottles = floatval("".$row_rs_products['bottles_prd'] ."");// column binding
$ATC_itemOnSale = "".$row_rs_products['onsale_prd'] ."";// column binding
$ATC_itemSalePrice = floatval("".$row_rs_products['saleprice_prd'] ."");// column binding
mysql_data_seek($rs_products, 0);
$row_rs_products = mysql_fetch_assoc($rs_products);
}
}
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$eCart1->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemBottles, $ATC_itemOnSale, $ATC_itemSalePrice);
if ($ATC_RedirectAfter != "" && $eCart1->redirStr == "") {
$eCart1->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'];
}
}
}
?>
<?php
// WA eCart Redirect
if ($eCart1->redirStr != "") {
session_commit();
header("Location: ".$eCart1->redirStr);
}
?>

Attached Files
startlist.zip

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

Content

rating

Layout

rating

Ease of use

rating

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