close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

multiple add to cart problem

Thread began 5/13/2011 4:41 am by CraigR | Last modified 5/16/2011 12:14 pm by Jason Byrnes | 3339 views | 17 replies |

CraigRBeta Tester

multiple add to cart problem

i have a combined search and results page created with dataassist, and i have added select and quantity fields to the results table to enable multiple item add to cart.

if i click several check boxes, then only the checked items are added to the cart, which is what i want,

but if i don't select any check boxes, all of the items in the current page view are added to the cart.

Attached Files
search.zip
Sign in to reply to this post

Jason ByrnesWebAssist

In the data assist search server behavior, set the default where clause to:
0 <> 0

Sign in to reply to this post

CraigRBeta Tester

Hi Jason,

I tried that for both, around lines 260 and 299

I also tried 'AND ItemID =0', based on the tutorial, but I get the same result

Sign in to reply to this post

Jason ByrnesWebAssist

Most likely because the old result is stored in a session.

close the browser completely before testing to end the session.

Sign in to reply to this post

CraigRBeta Tester

I tried in FF, Chrome and IE, all new sessions, still have the issue.

The only way I can avoid it is to set the default quantity to 0

Sign in to reply to this post

Jason ByrnesWebAssist

set the trigger of the data assist search to use the checkbox.

for the trigger, click the lightning bolt, and select the checkbox from the form.

Sign in to reply to this post

CraigRBeta Tester

doing that reloads the form and nothing is added to the cart.

Sign in to reply to this post

Jason ByrnesWebAssist

go back to the submit button trigger, send the latest copy of your page and a link where i can see the problem.

Sign in to reply to this post

CraigRBeta Tester

I have created a page to simulate the problem with dummy data and uploaded it to my test server.
Sorry for lack of css, just wanted to keep it clean and simple.
I have also separated the search and results to make things clearer.
I have removed the default where string
Several things are apparent.
When adding items to the cart, selecting one or more item and a quantity will add those items (only) to the cart correctly.
If no items are selected and add to cart is clicked, all items on the current page are added to the cart.
On return to the results page, trying to add the same item to the cart again has no effect.

Link to the results page is here

newresultsjason.php

Attached Files
newresultsjason.zip
Sign in to reply to this post

Jason ByrnesWebAssist

Line 22 must set the default where:

$WADbSearch2_DefaultWhere = "";

change that to:
$WADbSearch2_DefaultWhere = "ItemID = 0";

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