View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Trouble adding item from Recordset...

Thread began 11/12/2009 10:45 am by fdotmedia | Last modified 11/12/2009 7:12 pm by fdotmedia | 795 views | 3 replies


Trouble adding item from Recordset...

I have got the dynamic portion of the script working so it adds the product. But when I set up the scipt to redirect on add it doesn't go anywhere, so you have to click on the "view cart" button to actually view the cart...

any suggestions?

see code below...

//WA eCart Include
// 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 = "shopping-cart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_LabTest) && $totalRows_LabTest > 0) {
$row_LabTest = WAEC_findRecordMySQL($LabTest, "LID", $ATC_itemID);
if ($row_LabTest) {
$ATC_itemName = "".$row_LabTest['LabTitle'] ."";// column binding
$ATC_itemDescription = "";// column binding
$ATC_itemWeight = floatval("".$row_LabTest['LabWeight'] ."");// column binding
$ATC_itemQuantity = "".$_POST["eCart1_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_LabTest['LabPrice'] ."");// column binding
mysql_data_seek($LabTest, 0);
$row_LabTest = mysql_fetch_assoc($LabTest);
$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_itemWeight, $ATC_itemQuantity, $ATC_itemPrice);
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'];

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