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

Bug - Add to Cart button

Thread began 12/19/2010 1:09 am by Steve | Last modified 12/21/2010 10:28 am by Steve | 1586 views | 13 replies

Steve

selectedindex can't seem to link to the recordset....

How about someone posts an add to cart properly constructed snippet and then I
ll simply manaually set all my values?

Tech support? Is this possible, can I have a full snippet to configure manually?

I'll post what was constructed via the dialog window even with errors:

Button:

php:
<form name="eCart1_1_ATC_0" 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_1_ID_Add" value="0" >
                        <input type="text" name="eCart1_1_Quantity_Add" value="1" size="4" >
                        <input type="submit" class="eC_FormButton" value="Add to Cart" name="eCart1_1_ATC">
                      </form>




Add to cart code:

php:
<?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 "cart.php";
  
$ATC_RedirectIfIn  "";
  if (isset(
$totalRows_rs_inventory) && $totalRows_rs_inventory 0)     {
    
$row_rs_inventory WAEC_findRecordMySQL($rs_inventory""$ATC_itemID);
    if (
$row_rs_inventory)     {
      
$ATC_itemName "".$row_rs_inventory['ProductName']  ."";// column binding
      
$ATC_itemDescription "".$row_rs_inventory['ProductShortDesc']  ."";// column binding
      
$ATC_itemThumbnail "".$row_rs_inventory['ProductThumb']  ."";// column binding
      
$ATC_itemWeight floatval("".$row_rs_inventory['ProductWeight']  ."");// column binding
      
$ATC_itemQuantity "".$_POST["eCart1_1_Quantity_Add"]  ."";// column binding
      
$ATC_itemPrice floatval("".$row_rs_inventory['ProductPrice']  ."");// column binding
      
mysql_data_seek($rs_inventory0);
      
$row_rs_inventory mysql_fetch_assoc($rs_inventory);
    }
  }
  
$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);
    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'];
    }
  }
}
?>



Anyone have a clean set of snippets I can use as a starting point to hand code the required values?

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