close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Products - one Add to Cart button

Thread began 8/10/2011 12:37 am by mark284265 | Last modified 8/10/2011 4:44 pm by Jason Byrnes | 1282 views | 3 replies |

mark284265

Multiple Products - one Add to Cart button

I know this has been asked before, but I can't seem to come up with a solution yet. My page has a repeat region that pulls up two different ticket types - General Admission and VIP. Next to each ticket I have a drop-down where the user can select how many tickets. Right now there are Add to Cart buttons next to each ticket type. This becomes a pain because selecting 2 VIP tickets and clicking on the associated Add to Cart button immediately takes me to the cart. What I really want to do is select 2 VIP tickets, 3 General Admission tickets, click on a single Add to Cart button and them be redirected to the cart.

I should add that the Add to Cart buttons are set to "Look up item ID from recordset" and I have about 8 items bound on the bindings page.

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to use data assist for this.

In the Archived Documentation section of the eCart support page, see the "Building a Multiple Item Add to Cart Interface" tutorial:
ecart/

Sign in to reply to this post

mark284265

I read through the archived documentation, but it only shows how to add checkboxes next to each item, not drop-down quantity boxes.

Sign in to reply to this post

Jason ByrnesWebAssist

the quantity requires a little hand coding, but it can be done.

set the quantity filed name to contain the ID from the recordset:

<input name="quantity_<?php echo $row_RsName['ID']; ?>" id="quantity_<?php echo $row_RsName['ID']; ?>" type="text" value="1" />



then modify the quantity for the get contents from recordset to use the ID column to:
$cartNameCart_itemQuantity = floatval("".((isset($_POST["quantity_".$row_RsName['ID']."]))?$_POST["quantity".$row_rsaddselected['ItemID."]:"") ."");

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