0

Ok, the code below works. But the thing is that it doesn't allow the user to alter the amount purchased.

I'm trying to figure out how to have the user, once they've purchased a ticket and get to paypal page, to be able to alter the amount of tickets they would like to have.

As it is, once you land on the paypal page, it shows what you purchased, and that's it, pretty much.

Any advice?

EDIT

If anyone needs an example of what I'm talking about, here's one: Paying for multiple items (at once) via paypal

Look at the image at bottom. Do you see the quantity column? That's what I meant. But when I tried what they did in that one, it doesn't work. I think it's because in that one, it uses _cart, wheres mine is _donation?

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">

<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Name Of Business">

<input type="hidden" name="item_number" value="Tickets"> 
<select name="amount">
    <optgroup label="Sponsorship">
         <option value="15000" name="platinum">$15,000 - Platinum Sponsorship</option>
         <option value="10000">$10,000 - Gold Sponsorship</option>
         <option value="5000">$5000 - Silver Sponsorship</option>
         <option value="2500">$2,500 - Bronze Sponsorship</option>
   </optgroup>
   <optgroup label="Individual Seating">
         <option value="500">$500 per seat</option>
   </optgroup>
         <optgroup label="Program Book Tribute Journal Ad">
         <option value="600">$600 - Half Page</option>
         <option value="1000">$1000 - Full Page</option>
   </optgroup>

</select>
<input type="hidden" name="currency_code" value="USD">


<br /><br />
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
 src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"
 alt="PayPal - The safer, easier way to pay online">
 <img alt="" border="0" width="1" height="1"
 src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
 </form>

EDIT TWO

Ok, kinda confused about how to get the item increments to show up.

Advice would be appreciated.

These are the changes I've added to the post above:

<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">

Then to have the increment ability added ... I'm really confused by these lines and how to make it work for mine.

<input type="hidden" name="item_name_1" value="Item Name 1">
<input type="hidden" name="amount_1" value="1.00">

So, for the first item in my drop-down box (ie, the platinum ticket), I've modified it slightly, adding the name value:

<option value="15000" name="platinum">$15,000 - Platinum Sponsorship</option>

And then,

<input type="hidden" name="item_name_1" value="platinum">
<input type="hidden" name="amount_1" value="15000.00">

But as far as I can tell, that doesn't allow the user to change the quantity to what they want.

End of EDIT TWO

EDIT THREE Based on Jared's code beneath but posting a full version of it.

  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">

   <!-- Identify your business so that you can collect the payments. -->
   <input type="hidden" name="business" value="BLAHBLAH">

   <!-- Specify a Donate button. -->
   <input type="hidden" name="cmd" value="_cart">
   <input type="hidden" name="upload" value="1">

   <!-- Specify details about the contribution -->
   <input type="hidden" name="item_name" value="Corporation">

   <input type="hidden" name="item_number" value="Ticket Purchase"> 
   <select name="amount">
      <optgroup label="Sponsorship">
         <option value="Platinum Sponsorship">$15,000 - Platinum Sponsorship</option>
         <option value="Gold Sponsorship">$10,000 - Gold Sponsorship</option>
      </optgroup>
  </select>
  <input type="hidden" name="currency_code" value="USD">
  <input type="hidden" name="option_select0" value="Platinum Sponsorship">
  <input type="hidden" name="option_amount0" value="15000.00">
  <input type="hidden" name="option_select1" value="Gold Sponsorship">
  <input type="hidden" name="option_amount1" value="10000.00">
  <input type="hidden" name="option_index" value="0">
  <br /><br />
  <!-- Display the payment button. -->
  <input type="image" name="submit" border="0"
  src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"
  alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1"
 src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
 </form>

All I get from this form is Your shopping cart is empty.

END OF EDIT THREE

EDIT FOUR

1. <input type="hidden" name="item_name" value="Donation">
2. <input type="hidden" name="button_subtype" value="products">
3. <input type="hidden" name="no_note" value="1">
4. <input type="hidden" name="no_shipping" value="2">
5. <input type="hidden" name="currency_code" value="USD">
6. <input type="hidden" name="weight_unit" value="lbs">
7. <input type="hidden" name="add" value="1">
8. <input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">

Do we need 2, 3, 4, & 6?

I get one, it's a way to label it, right?

2, what is button_subtype?

3, that's to say that there is no more additional info included, right?

4, is that needed? it's just purchase of a ticket online.

5, obviously needed.

6, is weight_unit really needed? as mentioned previously, it's just an online ticket.

7, is? I'm guessing a way for the incrementation to happen?

8, is to denote that the button is not hosted from paypal, right?

You don't have to answer any of those questions, and your answer has been accepted. Just wondering, is all.

Thank you again, Jared.

END OF EDIT FOUR

Community
  • 1
  • 1
user273072545345
  • 1,536
  • 2
  • 27
  • 57

3 Answers3

0

The donation button does not allow you to use a quanity because its intended for a donation, not a purchase. You can, however have the function of the add to cart button but appear as a donation button. Simply:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<!-- Specify a Add to Cart button. -->
<input type="hidden" name="cmd" value="_cart">

<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Name Of Business">

<input type="hidden" name="item_number" value="Tickets"> 
<select name="amount">
    <optgroup label="Sponsorship">
         <option value="15000" name="platinum">$15,000 - Platinum Sponsorship</option>
         <option value="10000">$10,000 - Gold Sponsorship</option>
         <option value="5000">$5000 - Silver Sponsorship</option>
         <option value="2500">$2,500 - Bronze Sponsorship</option>
   </optgroup>
   <optgroup label="Individual Seating">
         <option value="500">$500 per seat</option>
   </optgroup>
         <optgroup label="Program Book Tribute Journal Ad">
         <option value="600">$600 - Half Page</option>
         <option value="1000">$1000 - Full Page</option>
   </optgroup>

</select>
<input type="hidden" name="currency_code" value="USD">


<br /><br />
<!-- Display the Donation payment button. -->
<input type="image" name="submit" border="0"
 src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"
 alt="PayPal - The safer, easier way to pay online">
 <img alt="" border="0" width="1" height="1"
 src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
 </form>
Jared
  • 471
  • 1
  • 3
  • 17
0
<input type="hidden" name="Ticket"><select name="os0">
<optgroup label="Sponsorship">
    <option value="Platinum Sponsorship">$15,000 - Platinum Sponsorship</option>
    <option value="Gold Sponsorship">$10,000 - Gold Sponsorship</option>
</optgroup>
</select> 
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="option_select0" value="Platinum Sponsorship">
<input type="hidden" name="option_amount0" value="15000.00">
<input type="hidden" name="option_select1" value="Gold Sponsorship">
<input type="hidden" name="option_amount1" value="10000.00">
<input type="hidden" name="option_index" value="0">
Jared
  • 471
  • 1
  • 3
  • 17
0
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" >
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="Your Email Here">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Donation">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="weight_unit" value="lbs">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">
<table>
<tr><td><input type="hidden" name="on0" value="Sponsorship"></td></tr><tr><td><select name="os0">
<optgroup label="Sponsorship">
    <option value="Platinum Sponsorship">Platinum Sponsorship $15,00.00 USD</option>
    <option value="Gold Sponsorship">Gold Sponsorship $10,000.00 USD</option>
</optgroup>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="option_select0" value="Platinum Sponsorship">
<input type="hidden" name="option_amount0" value="15000.00">
<input type="hidden" name="option_select1" value="Gold Sponsorship">
<input type="hidden" name="option_amount1" value="10000.00">
<input type="hidden" name="option_index" value="0">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

This is how your button should look, this is from paypal.

Jared
  • 471
  • 1
  • 3
  • 17
  • And you wont be able to do the 15,000 option btw, Paypal only allows 10,000 max per transaction. – Jared Feb 20 '14 at 15:26
  • oh my gosh! this worked!!!!!! yay!!!!! and thank you for telling me that the max is 10,000. wasn't aware of that. will pass that info onwards. just a couple of questions though, which i'm posting in my post, but otherwise, this answer is totally accepted! thank you again!!!! – user273072545345 Feb 20 '14 at 18:49
  • have included my questions in edit 4. It's totally up to you if you want to answer it or not. – user273072545345 Feb 20 '14 at 18:55