close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Bug - Add to Cart button

Thread began 12/18/2010 10:09 pm by Steve | Last modified 12/21/2010 7:28 am by Ray Borduin | 2851 views | 13 replies |

Steve

Bug - Add to Cart button

I can not get the add to cart button behavior to work with a recordset value.

Using the most recent release on Mac , again all recent versions of DW and Mac OS

Also using the eCommerse Db offered from WA

Errors attached. ID column select menu does not work.

.dat file deleted and still no success.

Sign in to reply to this post

Steve

Tried to get around the bug by creating a recordset that only returns the product_id value but that still fails.

Also tested on two different computers.

Sign in to reply to this post

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?

Sign in to reply to this post

Steve

Here is the missing data when creating an Add to Cart button and you get the same error I received

Corrected:
$row_rs_inventory = WAEC_findRecordMySQL($rs_inventory, "ProductID", $ATC_itemID);

Incorrect set by bug:
$row_rs_inventory = WAEC_findRecordMySQL($rs_inventory, "", $ATC_itemID);

Note the column id (ProductID) needed to be set in the empty quotes.
Hope this help others that get this same bug...

Now on to figure out the dynamic shipping and lack of tutorials on this subject.

Sign in to reply to this post

Ray BorduinWebAssist

What version of eCart do you have installed? I believe this error may be corected in a more recent build.

It could be an issue with naming your recordset with underscores. Dreamweaver has issues with that syntax which may be cascading into your add from recordset eCart behavior.

The code snippet you sent looks right... what is the issue you are having with it runtime?

Sign in to reply to this post
Did this help? Tips are appreciated...

Steve

Ray,
You can see the resulting code and it's missing key in my other posts in this thread.

I have the latest version 5.0.3

I saw others having this problem and was able to manually insert the column name to "manually" solve this issue. Bug still exists where you can not get any populated values in the select list under the recordset on the first tab.

Now I need figure how to get a dynamic set of shipping options and returned values that update the cart Display page prior to taking a customers credit card data... No tutorials on this I can find. Created the page that polls the shipper but do not see how to set it to the cart page and then get an update to the same cart page.

There has to be some documentation on this to add the dynamic shipping after you use the cart wizard but I can not find this. Looks like I have to erase and start again using the wizard...

Sign in to reply to this post

Ray BorduinWebAssist

The problem with trying to get the shipping amount prior to the card data is that you need to know the ship to address before you can get an accurate quote, and that isn't asked for until the checkout page where the card data is entered.

The wizard doesn't directly support what you are trying to do, so running that again won't help. I think you will have to find a way to get the shipping address and use the server behaviors associated with shipping quotes manually in order to achieve your desired result.

Sign in to reply to this post
Did this help? Tips are appreciated...

Steve

Ray,
I tested without the underscore in the recordset naming and that did not change anything. There is an error thrown in reference to a .js file noted in the initial post.

Sign in to reply to this post

Ray BorduinWebAssist

We have been unable to reproduce that issue. If it keeps coming up we can create a support incident and debug it with you directly over the phone since we are unable to replicate the problem here.

Sign in to reply to this post
Did this help? Tips are appreciated...

Steve

Originally Said By: Ray Borduin
  We have been unable to reproduce that issue. If it keeps coming up we can create a support incident and debug it with you directly over the phone since we are unable to replicate the problem here.  




Ray,
I would be glad to help. Let's schedule some time and we can share a session and you can see the problem on my system.

In the mean time I am able to manually set the values properly so not a show stopper.

Sign in to reply to this post
loading

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