Here’s another hair-pulling issue I know has troubled many people. Just how in blue-blazes do you insert Paypal code into a post?
It seems such a stupendously SIMPLE thing to do and if you were just running a static html site it would be no hassle at all. But WordPress won’t let you do it – something about their editor thingy and php code and violations of something or other and the end of the world as we know it….. I’m not one for details like that.
Anyway, the upshot is that there’s a mob of people running around on the net desperately trying to find a way around it. I know because I’ve found all their posts and read all their plaintive cries for help.
The problem is that everything you find is either a full-fledged ecommerce solution like Zen Cart or so simple and stripped back it doesnt cater for more than one actual physical product.
If you want a WordPress plugin that offers a full-featured solution there are a couple of up-to-date plugins such as wp-ecommerce or Yak that might work (both have ‘issues’ I’ve discovered). Or if you’re looking to sell your content or subscriptions or downloads there are a number of useful plugins available (just search for “paypal” in the WordPress Extensions Directory). And if you just want to insert ONE button, especially a “donate” button the solutions are many and mostly very simple, though you can’t use them to sell multiple products – just the one.
But….. should you want to take the wildly unusual step of having a very simple way of selling a couple or three things from your site using Paypal’s built in system….. suddenly it all goes to hell in a handbag.
There are some kind souls posting lengthy complex “manuals” on how to achieve this (here’s one example if you are comfortable with changing core files – www.webmaster404.com though it’s a little out of date) which I’m certain have helped many a geek more code-savvy than myself. But for me, the words start to run into each other, my eyes start to glaze over and if I keep reading the instructions – my head explodes, swear to God! It’s just too complex for a simple girl like me.
And this WordPress support post is fairly useful too, if you’re not doing this for a client who might need to add their own later.
Geez!! All this frustration just to insert a paypal button or two!!! Please! There MUST be something better for this purpose (though thanks must go to the people out there sharing these brilliant solutions with the public – they just don’t work in this instance).
I have been working on this one simple issue day and night for weeks now for one of my clients. She is being very patient, thank goodness, but meanwhile I’ve gone almost completely grey and my dogs, (who recently totally gave up on the concept of ever going for walks again) keep barking at me coz they don’t recognise this scary-eyed, grey-haired skeletal harridan that keeps emerging from the study, screaming obscenities!!
Anyway, if you’ve stuck with me this far you’re obviously as desperate as I was to find the solution to this bizarre problem so I will torture you no longer and skip to the point.
I accidentally stumbled on a brilliant solution.
By using a plugin called awsomnews you can insert paypal codes into posts to your hearts content. This provides a simple way to get paypal integrated with your site if you want to sell less than 10 products and don’t need all the other complicated features of ecommerce plugins.
It’s not actually meant to be a plugin for Paypal, but it doesn’t matter. The fact is it works as a plugin for Paypal whether or not the creator intended it to.
Setting up the Awesom News Plugin
To use the plugin for Paypal do the following:
1. Download the awesomnews plugin, upload it to your site and activate it (obviously!).
2. Go to the awesomnews configuration page (it’ll be in the box of options for “Posts”), scroll down to the last bit that says “General Options” and make sure you:
- set “No” where it asks you if you want to use the “Visual Editor”
- set “Yes” for the option to allow php
- set “No” for the option to have your “news announcements” appear on the index page above the content.
- Click “update options”
3. Then go to to the list of ‘current news posts’ and you should have just the one default welcome message. Delete it (it’s been announcing away on the front of your site since you installed the plugin!).
4. Now go to “New News Post Instructions” – this is where you will be putting the code for your Paypal button (assuming you already have it handy).
Okay, for the actual posts keep in mind this is NOT where you describe whatever it is you’re selling. This is ONLY for the actual Paypal code. Later you will insert a line of code into a page or post for the button to appear.
- Choose a display name (only for admin purposes so you can recognise each one, it wont show on your site)
- Leave “Order Position” blank.
- Select “Yes” to make it active (otherwise you wont be able to test it – you can always inactivate later if you want to hide it while completing the site)
- Select who should be able to see it (usually all visitors unless you only want to sell something to registered members)
- And the important bit – select location. This is where you can define each button. Give it a number that you assign to the line of code you will later insert in your posts/pages. So, for example, your first Paypal button will probably be “optional location 1″. So select that.
- Then paste in your products Paypal code into the “news announcement” box and hit “add new news post”. Don’t worry. It’s not visible anywhere on the site yet – until you tell the plugin where to display it (or where location 1 is).
- The new “news announcement post” should now show up in your list. You can keep adding more news posts for each product’s Paypal button code and assign them each an individual location.
Setting up your Paypal page in your content
5. Now, once you have that all set up, go to your usual WordPress posts or pages editor and make a post as you would normally do. Type in your fabulous description of your product, throw in a picture if you like and perhaps explain that they can use the Paypal button “below” to buy it online immediately (before they all rush out the door ‘n all that!!!).
6. Then – switch to “html” (do not do this in visual mode) and type in %% awsomnewsxx %% (without spaces and replace xx with your location number you assigned to the button earlier).
Save and publish the post/page and check it out on your site. Give it a minute to all load properly and you should then see your Paypal button under your content.
If it doesn’t appear it usually means there’s something wrong in your Paypal code. The most common problem is that old chestnut of Paypal mysteriously adding breaks into their code where there shouldn’t be breaks. Almost invariably they put a break right at the end before the very last </form> bit. If you find any random breaks remove them.
7. Don’t forget to put in your Paypal Cart button. I used a text widget in the sidebar to add the Paypal code for the “view cart” function to the site.
So there ya go. Pretty simple really once you get all the code sorted and pasted in.
And my client finds it very simple to use – which is the most important thing.
Have fun! And if you cant figure out how to use it – just ask. I’ve tested it, found bugs and squashed them – so I know how to get it doing exactly what you need it to do.
Click here for a demo (while it’s still there anyway).
You were saying