close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Item Add to Cart Interface

Thread began 3/19/2009 5:28 pm by KevinK303762 | Last modified 4/21/2009 3:54 pm by sandy170299 | 2028 views | 8 replies |

KevinK303762

Multiple Item Add to Cart Interface

I am trying to implement a multiple item add to cart interface on a quick order entry page, but cannot find the old technote nor any other information or tutorials on how to accomplish this with eCart 4.

I would like the customers to be able to enter up to 20 item numbers and select a quantity to purchase for each from a respective drop-down.

If you would be able to point me in the right direction or be able to provide any resources to utilize it would be greatly appreciated.

Best Regards,
Kevin

Sign in to reply to this post

carlene353689Beta Tester

me too

I'm also trying to implement a adding multiple items to cart interface. My problem is the tutorial only gives a checkbox solution. I need them to be able to add quantities as this is a site for a wholesale manufacturer.

Is there a solution for that? Plus I did go through the tutorial once and I an error in the SQL.

I don't know why this isn't a wee bit easier as this is a very common thing...urgh.

Sign in to reply to this post

Ray BorduinWebAssist

We don't have a specific user interface to support this functionality. It would require some level of hand coding to accomplish, but it has been done many times so it is possible.

Do your product options come from a database? Are you getting it to display properly and you just need to get the add to cart functionality? If not, concentrate on that first. Once you have the display created getting the add to cart working shouldn't be too difficult with a little hand coding.

The exact steps depend on your database design if any and the final form structure you are trying to support, and that has to be done outside of the cart, so my suggestion would be to get the page looking the way you want, then post the url of the page and a description of the database and I can try to direct you in how to get the add to cart working.

Sign in to reply to this post

KevinK303762

I am not really displaying any data from the database for this page. Basically I want to have a form with text fields for item numbers with corresponding quantity dropdown boxes. What I would like to happen is that when a user clicks the add to cart button, any text fields populated with item numbers are validated against the database (which is DB2 by the way) and valid items are then added to the shopping cart along with the quantity specified for each one. The following page is purely for testing and development purposes, but helps to show what I am trying to accomplish. Categories.asp and go to quick order entry on the tabbed panel object. I was hoping to utilize DataAssist in some fashion for this, but unfortunately it does not support DB2 databases. My main issue at this point is being able to filter or create a new recordset of the user entered item numbers from the text fields. I can hard code a recordset with one item number and successfully add that to the cart with the corresponding quantity, but beyond that I am kind of stumped. Thanks!!

Sign in to reply to this post

Ray BorduinWebAssist

So the step you are actually getting stuck on is filtering your recordset to return multiple results. Normally you could use DataAssist Search to do this, but that isn't working because you have a DB2 database.

So... hate to say it, but in some cases you need to write a little code.

You need to create a where clause from the submitted fields so you can filter your recordset. Once your recordset is filtered you would probably loop through that recordset and have to loop back through the form to get the corresponding quantity and most likely store the values in an array.

Then you can loop through that array and add items to the cart. This will require some knowledge of SQL and ASP scripting to pull off.

Sign in to reply to this post

KevinK303762

Thank you Ray for the assistance.

Sign in to reply to this post

sandy170299

Ray, I'd like to take this one step further. This is my scenario. If I have a list of items, filtered by category, that contain checkboxes, I can then check all of the checkboxes that apply, loop through an array, and write the array contents to a database. Those items are connected to a user by a session variable. This is working fine and I've done this many times before.

My question is, how do I grab those items and add those items that are in the database to a shopping cart? I'm not sure how to start with that one.

Thanks!
Sandy

Sign in to reply to this post

Ray BorduinWebAssist

If you can get them into a recordset then you can use the "Add to cart from Recordset" server behavior to add them all to the cart. So it just becomes a matter of how to return all of the results into a recordset, possibly filtering by the user session variable you used when inserting.

Sign in to reply to this post

sandy170299

Yup - the records have already been inserted into the database. It's really that easy? Cool!!! Thanks, Ray!

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