View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Dynamic displays for eCart

Thread began 1/21/2010 9:59 am by fdotmedia | Last modified 1/22/2010 1:16 pm by fdotmedia | 783 views | 7 replies


works like a charm thank you...

I have run into a different problem though...

I'm adding the "add to cart" button as a recordset and when you click on the 2nd button the script redirects to the same page and empties the recordset... It's eCart_2_ID_Add I'm not getting anything from eCart_1_ID_Add works as expected...

// WA eCart AddToCart
if (isset($_POST["eCart1_2_ATC"]) || isset($_POST["eCart1_2_ATC_x"])) {
$ATC_itemID = $_POST["eCart1_2_ID_Add"];
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "";
$ATC_RedirectIfIn = "";
if (isset($totalRows_products) && $totalRows_products > 0) {
$row_products = WAEC_findRecordMySQL($products, "Pid", $ATC_itemID);
if ($row_products) {
$ATC_itemName = "".$row_products['PFGtitle'] ."";// column binding
$ATC_itemDescription = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["eCart1_2_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_products['PFGprice'] ."");// column binding
mysql_data_seek($products, 0);
$row_products = mysql_fetch_assoc($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_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'];
// WA eCart Redirect
if ($eCart1->redirStr != "") {
header("Location: ".$eCart1->redirStr);

<?php if($row_products['PFGid'] != "" || $row_products['PFGid'] != "") { ?>
<p> <span style="color:#000; font-weight:bold; font-size:11px;"><?php echo $row_products['PFGid']; ?> - <?php echo $row_products['PFGtitle']; ?> - <?php echo $row_products['PFGprice']; ?></span>
<form name="eCart1_2_ATC_<?php echo $row_products['PFGid']; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="eCart1_2_ID_Add" value="<?php echo $row_products['PFGid']; ?>" >
<input type="text" name="eCart1_2_Quantity_Add" value="1" size="4" >
<input type="submit" value="Add to Cart" name="eCart1_2_ATC">
</p><?php } ?>

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