close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add to Cart Button not Working Properly on Results Page

Thread began 9/03/2012 2:41 pm by barnet429299 | Last modified 9/06/2012 9:36 am by Jason Byrnes | 1660 views | 7 replies |

barnet429299

Add to Cart Button not Working Properly on Results Page

I've added an "Add to Cart" button to my results page. I've checked and rechecked many times to make sure the setup is correct. The form attributes and action appear to be correct, and the button setup seems correct, and resides inside the repeatable area. The problem is that no matter which item's Add to Cart button I click on, it will only add the last item on the page and nothing else. In other words if I click on 10 different items to add, I'll only get the last item with a quantity of 10. Any help would be greatly appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a link where i can see the problem and a copt of the page so i can see the code.

Sign in to reply to this post

barnet429299

Thanks for your help Jason. I've attached one of 3 results pages I'm using. They're all the same except for the recordset filter.

Here's the link to that page on my test site:
results-products-jewelry.htm

I'm also having one other small problem. Not that anyone purchasing something might do this, but I was just curious. If you click on the add button, it will add the item to the cart, click the same button a second time and it increments the item in the cart to 2, but if I click that same item again, instead of incrementing it to 3, it adds another line to the cart like it's a totally new item. Any thoughts?

As before, thanks for your help.

Attached Files
results-products-jewelry.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in the results page, the form tag is outside the repeat region.

Move the form tag from line 400:
<form name="eCart1_1_ATC_<?php echo $row_WADAitems["ItemID"]; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>" class="DetailsPage Cool_Default" id="Results_Cool_Default" >




so that it is just before the eCart1_1_ID_Add hidden element:

<input type="hidden" name="eCart1_1_ID_Add" value="<?php echo $row_WADAitems["ItemID"]; ?>" >




also move the closing form tag so that it is just after the add to
cart submit button.

Sign in to reply to this post

barnet429299

Jason, never would have figured that out in a million years. Thanks again for your quick and accurate response. Any thoughts on my one other small problem below?

Not that anyone purchasing something might do this, but I was just curious. If you click on the add button, it will add the item to the cart, click the same button a second time and it increments the item in the cart to 2, but if I click that same item again, instead of incrementing it to 3, it adds another line to the cart like it's a totally new item. Any thoughts?

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the WA_eCart/eCart1_PHP.php so i can see how the cart object is configured.

Sign in to reply to this post

barnet429299

Jason, attached is the eCart1_PHP.php file.

Attached Files
eCart1_PHP.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

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