I'm coding my website's cart page using Paypal's "Add to Cart" code which comes in its standard form like this:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="6474763">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
I was able to modify the code to add in my own options like a
drop-down menu (paypal offers only 10 choices) for color choices and a
quantity text box (that miraculously works) next to each item.
So now instead of just an item description with a button, I have this:
QUESTION: How can I get the form to correctly submit using just ONE "add to cart" button for the whole page (instead of one for each choice).
I tried taking out the <form> tags except for the beginning and end but then the submit button only submits the last info, not ALL the info entered in the form. Arrrgh!!!! The only way I could get any of the buttons to react correctly was by separating each in its own <form></form> but all those buttons are ugly.
I was tooling around with getElementsByName() but I'm not very familiar with writing java or tweaking it.
If anyone has a clue please post
Thanks!