Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-30-2009, 05:07 PM   #1 (permalink)
georgiepants
Recruit
 
Join Date: Jun 2009
Posts: 1
georgiepants is on a distinguished road
Coding Paypal Merchant form...help!

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!
georgiepants is offline   Reply With Quote
Old 06-30-2009, 07:47 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,706
sde is on a distinguished road
it looks like that paypal form is not setup to be able to handle multiples like you want to. i think you need to look at paypal documentation for any luck with it.
__________________
Mike
sde is offline   Reply With Quote
Old 12-09-2009, 11:22 AM   #3 (permalink)
wfc2009
Recruit
 
Join Date: Dec 2009
Posts: 1
wfc2009 is on a distinguished road
yes, from what I understand, paypal does not allow this and you actually have to have this on their page. you may need to look at a different solution other than paypal.
wfc2009 is offline   Reply With Quote
Old 12-10-2009, 08:23 AM   #4 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 841
DJMaze is on a distinguished road
Use Paypal IPN or PDT
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Reply

Bookmarks

Tags
button, form, options, paypal, submit

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit form to multiple emails using a PHP form suforum PHP 3 07-28-2008 06:04 AM
Paypal SDK Redline PHP 1 05-04-2006 04:35 AM
Passing Values from Popup Form to Main Form chrislopezz PHP 7 03-28-2005 12:45 PM
Merchant Account, Card Processing vb707 Lounge 4 03-23-2004 05:03 PM


All times are GMT -8. The time now is 12:35 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting