close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Bug in eCart - Add to Cart behaviour is incorporating recordset code?

Thread began 2/11/2019 4:21 pm by Nathon Jones Web Design | Last modified 2/19/2019 8:27 am by Nathon Jones Web Design | 390 views | 4 replies

Nathon Jones Web Design

Bug in eCart - Add to Cart behaviour is incorporating recordset code?

Hi. I can't get the Add to Cart behaviour to work.

I have a recordset on my page called rsBANNERS and whenever I try to apply the Add to Cart behaviour on the page, for a static item, it saves the Add to Cart behaviour code like this:

<?php
// WA eCart MySQLi AddToCart
if (isset($_POST["eCartSMC_1_ATC"]) || isset($_POST["eCartSMC_1_ATC_x"])) {
$ATC_itemID = $_POST["eCartSMC_1_ID_Add"];
$ATC_AddIfIn = 4;
$ATC_RedirectAfter = "health-screening-form-checkout.php";
$ATC_RedirectIfIn = "";
if (function_exists("rel2abs")) {
$ATC_RedirectIfIn = $ATC_RedirectIfIn?rel2abs($ATC_RedirectIfIn,dirname(__FILE__)):"";
$ATC_RedirectAfter = $ATC_RedirectAfter?rel2abs($ATC_RedirectAfter,dirname(__FILE__)):"";
}
if ("rsBANNERS" != "") $rsBANNERS->FindRow("SMCbannerID",$ATC_itemID);
$ATC_itemName = "Sports Medical Certificate";// column binding
$ATC_itemDescription = "Doctor approved medical certificate for your sporting event/s.";// column binding
$ATC_itemThumbnail = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = floatval("1");// column binding
$ATC_itemPrice = floatval("65.00");// column binding
if ("rsBANNERS" != "") $rsBANNERS->Index = 0;
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$eCartSMC->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice);
if ($ATC_RedirectAfter != "" && $eCartSMC->redirStr == "") $eCartSMC->redirStr = $ATC_RedirectAfter;
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING']?"?".htmlentities($_SERVER['QUERY_STRING']):"");
}
}
?>



Why is it pulling in this recordset when I've selected static item? How do I fix this?
Thank you.
NJ

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