paypal buttons

joehark
Contributor
Contributor

I am trying to install a button in a WordPress-based page. The button code is: 

 

<form 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="F9U4KSGVSFRMA" />
<table>
<tbody>
<tr>
<td><input type="hidden" name="on0" value="Number of Tickets" />Number of Tickets</td>
</tr>
<tr>
<td><select name="os0"> <option value="One Person">One Person $200.00 USD</option> </select> <select name="os0"> <option value="2 Persons">2 Persons $400.00 USD</option> </select> <select name="os0"> <option value="3 Persons">3 Persons $600.00 USD</option> </select> <select name="os0"> <option value="4 Persons">4 Persons $800.00 USD</option> </select> <select name="os0"> <option value="5 Persons">5 Persons $1,000.00 USD</option> </select> <select name="os0"> <option value="6 Persons">6 Persons $1,200.00 USD</option> </select> <select name="os0"> <option value="7 Persons">7 Persons $1,400.00 USD</option> </select> <select name="os0"> <option value="8 Persons">8 Persons $1,600.00 USD</option> </select> <select name="os0"> <option value="9 Persons">9 Persons $1,800.00 USD</option> </select> <select name="os0"> <option value="10 Persons">10 Persons $2,000.00 USD</option> </select></td>
</tr>
</tbody>
</table>
<input type="hidden" name="currency_code" value="USD" /> <input type="image" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" alt="PayPal - The safer, easier way to pay online!" /><img src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" alt="" width="1" height="1" border="0" /></form>

 

But what I am getting is a mess. The display is not a drop down, but all the items. I was hoping that a shortcode would work but it does not.

 

I suspect i am reinventing wheel but I find nothing either in the button creation page to **bleep** (only dreamweaver and HTML in general, but nothing WP specific) and I a search here found nothing. No answer in the dev forum.


So I am getting desperate.

 

Help, please?  

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

joehark
Contributor
Contributor

So that plugin did not work. Premature evaluation.

 

But as I said, I am a "stubborn ole b**tard" and I did have my nap this afternoon (highly recommended that habit; een doing that since I was 55 years old and look how that has worked out).

 

I found another way around the prolem. I knew that your buton code form worked from within a plain old HTML page. So I installed that cod in page using my fav WYSYWG editor (Kompozer) and then used a plugin called "WordPress Popup Scheduler" to display that page as a popup window on the Eevent page. 

 

The PayPal button code works from there. 

 

(this time I checked before saying that).

 

Hope this helps someone else some day. 

 

 

View solution in original post

Login to Me Too
8 REPLIES 8

joehark
Contributor
Contributor

So what four letter word that means help deserves a **bleep**???

 

So far, it does not earn a respponse. That is pretty discouraging. 

Login to Me Too

PayPal_Frank
Administrator
Administrator

Hi joehark,

 

These forums are designed for member to member help (learn more here). I'm sorry you didn't receive a response right away.

 

Looking at the button code, I can already tell that the website editing software you are using is modifying the code. The <select></select> element should only appear once for each drop down menu.  I've repaired the code you provided and pasted it below.

 

<form 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="F9U4KSGVSFRMA" />
<table>
<tbody>
<tr>
<td><input type="hidden" name="on0" value="Number of Tickets" />Number of Tickets</td>
</tr>
<tr>
<td>
<select name="os0">
<option value="One Person">One Person $200.00 USD</option>
<option value="2 Persons">2 Persons $400.00 USD</option>
<option value="3 Persons">3 Persons $600.00 USD</option>
<option value="4 Persons">4 Persons $800.00 USD</option>
<option value="5 Persons">5 Persons $1,000.00 USD</option>
<option value="6 Persons">6 Persons $1,200.00 USD</option>
<option value="7 Persons">7 Persons $1,400.00 USD</option>
<option value="8 Persons">8 Persons $1,600.00 USD</option>
<option value="9 Persons">9 Persons $1,800.00 USD</option>
<option value="10 Persons">10 Persons $2,000.00 USD</option> 
</select></td>
</tr>
</tbody>
</table>
<input type="hidden" name="currency_code" value="USD" /> <input type="image" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" alt="PayPal - The safer, easier way to pay online!" /><img src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" alt="" width="1" height="1" border="0" /></form>

 

This page may also be helpful depending on what version of DreamWeaver you are using:

Pasting HTML code onto webpages in DreamWeaver

 

 

I hope this helps! 🙂

 

- Frank

 

If you see a helpful post, please accept it as a solution or give the author kudos. 🙂 Thanks!
Login to Me Too

joehark
Contributor
Contributor

Thank you for the response. I appeeciate the willingnes to help.

 

Please look at 

 

http://iinj.org/event/test-event/

 

I am pasting the button code (copied from the version you posted above) into the HTMLediting page of a WordPress post.

 

You will note that the problem persists. 

 

I am surpised that I seem to be the only one who has ever had this problem, given the widespread use of PayPal in WordPress-based web sites. 

 

If you or anyone can suggest a solution, I will appreciate it. 

 

Thank you

Login to Me Too

PayPal_Frank
Administrator
Administrator

Hi joehark,

 

Sorry, I completely overlooked that you were using WordPress in your initial post.  This is a common issue we see.

Unfortunately WordPress doesn't allow forms in a post.

 

http://en.support.wordpress.com/paypal/

 

From the wordpress website:

"...WordPress.com does not let users put post web forms so the website code would be stripped. You must use the code found in Link for Emails. This is the link that you want to attach to your actual button image ..."

 

Unfortunately the use of drop down menus with a PayPal button would require the use of a form.  You could get around this by creating a separate PayPal button for each option.  The wordpress link above has instructions for a Donate button. Those instructions will also work for a Buy Now button just use this image instead:

 

 

https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif

 

- Frank

If you see a helpful post, please accept it as a solution or give the author kudos. 🙂 Thanks!
Login to Me Too

joehark
Contributor
Contributor

again, Frank, I appreciate your help. It was getting grim therer for while until you stepped up.

 

Before I continue, let me tell you that I am a stubborn ole b**tard. In a few weeks I will be 79 years old. I have been building web site since Jan 04th 1994. I have been doing that despite the fact that I still can't write a single line of code. I still need an WYSIWIG editor to write hyperlinks. But I'm fairly talented at work-arounds and copy/pste of code I find else where. As a result I have paying clients in 9 countries, whose web site I build and host. Over the years I probably have built a few hundred web site sites using WordPress, Drupal, Joomla and so on. Also, I own a leased / managed server that hosts about 150 domains, mostly paying clients, plus a few NFPs on a pro bono basis. I actually make a small but comfortable living at this. 

 

Have explained that background, I am now happy to report I have solved the problem and here is the solution.

 

I recall seeing WordPress sites that contained forms. In fact, I suddenly recalled I once built a WP web site containing a very elaborate form. (At this age, I am amazed at the things I have known and forgotten). 

 

I did that using a WordPress plug-in called "advanced iframe."  I had so totally forgotten, that I had to go back and deconstruct the page that used it before I could rememebr how to configure the plugin and apply the PayPal form code.

 

Once I did that, and as soon as I applied the PayPal code to it, problem solved.

 

See: http://iinj.org/event/14th-annual-american-dream-celebration-fundraising-dinner/

 

When I say I appreciate the help, I am being serious. I doubt I would have remebered that I already had solved this problem had your explanation not jogged my recollection. When I say I am happy to share the solution, I mean I am always happy to find a solution problem that someone much smarter than me says cannot be done. 

 

I respectfully suggest that this solution be added to the explanation on your web site for DreamWeaver and HTML for the benefit of those who encounter the problem and for the benefit of PayPal in being able to use butttons within a wordPress page. 

Login to Me Too

joehark
Contributor
Contributor

OPPS - I also overlooked the "gotcha" factor.

 

If you visit that page, http://iinj.org/event/14th-annual-american-dream-celebration-fundraising-dinner/

 

You will se that the form looks and behaves nicely. However, when you select a ticket pakage, and click on the button, nothing happens. 

 

I hope that this is not fatal to my brilliant solution. 

 

May I ask (with the taste of humble pie still in my mouth) for your advice on why the button does not take the user to the gateway? 

Login to Me Too
Solved

joehark
Contributor
Contributor

So that plugin did not work. Premature evaluation.

 

But as I said, I am a "stubborn ole b**tard" and I did have my nap this afternoon (highly recommended that habit; een doing that since I was 55 years old and look how that has worked out).

 

I found another way around the prolem. I knew that your buton code form worked from within a plain old HTML page. So I installed that cod in page using my fav WYSYWG editor (Kompozer) and then used a plugin called "WordPress Popup Scheduler" to display that page as a popup window on the Eevent page. 

 

The PayPal button code works from there. 

 

(this time I checked before saying that).

 

Hope this helps someone else some day. 

 

 

Login to Me Too

PayPal_Frank
Administrator
Administrator

Thanks for reporting back about the solution! 🙂

 

I knew there were plugins for WordPress designed specifically for PayPal buttons but I've never seen a solution like this.  Thanks for sharing this with the community. 😄

 

I'm going to mark your post as the solution so others can find it easier.

 

- Frank

If you see a helpful post, please accept it as a solution or give the author kudos. 🙂 Thanks!
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.