Items in cart even when nothing selected

I'm not sure how to specify 'no items' when nothing is selected in my order form. When I open my form and click 'Add to Cart' and nothing has been changed, it adds one of each of the three products to the cart:

Also, if a user goes back using 'continue shopping' they're going to have multiple products going into the cart again. Can I even have a form like this, or do I need a separate Add to Cart button for each product?

So, the issue is that you're not specifying a quantity. You have a name and price, and a 2:name and 2:price, so the quantity of 1 is assumed. The "location" select box you have just sets an arbitrary product option called "location", but doesn't do anything else.

That said, the easy options I see are:
A) Add a select box or input for the quantity, which probably wouldn't really help usability.

Make the delivery location dropdowns actually be the quantity field, but I'm not actually sure that'd work.

C) Set a hidden input for quantity and default it to 0. Use a little bit of javascript to set it to one onchange of the appropriate select element.

I'd go with option C. How are your javascript chops? We can try to assist if you get stuck.

That'll work for the gift subscription functionality. The checkboxes are a bit different. There are a few ways to tackle it. You could either make each checkbox represent a new product in the cart, or you could make each checkbox just be a modifier to one single product, and have each one modify the price by $4.95.

Let's see if you can get that javascript for the gift subs working, then we'll help you tackle the checkboxes.

then if I change the dropdown select for the One Year Subscription only it shows 'Gift Subscription' in the cart rather than 'One year subscription.'

Also, the checkboxes for 'is this a renewal' and 'do you want a gift notice' are not being shown in the cart if checked, and the Recipient Name (tied to multiship.js) is also not showing in the cart.

So... I don't know if I can spend more time on this, should I just go back to having one 'add to cart' button for each block? That was working fine, I just wanted to try to streamline it into a single form, but I don't think I know enough js to make this happen quickly...

It's applying the recipient Ann Clarke to the one year sub but not the gift sub, and the other elements like the single issue and the text area are also showing up under Ann Clarke. Is there a way to change that so Ann Clarke and the GiftNotices are only visually connected to the Gift Subscription in the cart?

Actually, you're doing multiship (which is cool and makes sense here), but two things:
1. Your multiship javascript is 404ing.
2. It'll need to be modified ever so slightly. We'll do that once you have it up there correctly.

Or... not sure you actually need the multiship js. You could just change the name="shipto" to name="2:shipto"

I think we discussed this on another thread, but you're including jQuery twice: once in the foxycart_includes, and once in an explicit call. That's messing up the multiship javascript, so you should remove that extra jquery call sitewide (or at least on every template that's also calling the foxycart_includes).

- Remove the "Recipient Name" from the value attribute on the shipto input.
- You need to add a 2:quantity hidden input, value="0".

- Change all your checkbox names to stuff like 3:SingleCopies_Fall_2007. They all need to be unique, and they need to have the 3: in order to be related to that 3rd product. If the name of the checkbox isn't unique, it won't come through in the cart.

This is your complete javascript. Replace all the other javascript from this thread with this one big chunk.:

A few other things:
- Your screen.js file is causing a js error. Not sure what it's doing, but supersubs() isn't working at all.
- Research and implement the <label> element on your checkboxes. They're pretty helpful.

--found the extra jquery call and removed it
--added labels to the checkboxes
--removed the "Recipient Name" from the value attribute on the shipto input
--added a 2:quantity hidden input, value="0" to the Gift Subs section
--replaced my js after the FoxyCart includes statement with what you provided

The items and quantities in the cart seem to be just fine now.

Still a few major problems though:

--The cart no longer comes up in the template, it's on a page by itself.
--Multiship isn't working - there's no way to use the dropdown box under Gift Subs to select another recipient

Ah, glad you got it closer! Fwiw, you may be able to break down the pieces to try to figure it out yourself. Not saying you shouldn't hire somebody to help you real quick (you should), but the best way to learn is to just hunker down and figure out why your stuff is broken. That's actually how I learned everything I know.

If you just have some values switched, you could dig in and see which inputs in your form have (or don't have) the 1: 2: 3: prefixes. If it's a multiship value, it might be being generated in the ...

Yeah:

<input type="text" name="shipto" id="shipto" value="" /></p>

That should be 2:shipto.

And in your multiship js see if you can figure out what to change. I'll put the answer below in white, so you can copy/paste or highlight to see it.

Change the 'input[name="shipto"]' to 'input[name=2\:shipto]'. The colon is a special character in jQuery so you need to escape it with the backslash.

I tried your suggestions - I must just have something very basic wrong in this page and not enough js understanding to get it. I'm hiring one of the recommended developers to help me finish up, it's so close to being done...