Add a WORKING Paypal button to a 2013 365 public site

101313_1928_addaworking1It’s well known that Paypal buttons don’t work on 2013 public sites. A basic html rule doesn’t allow forms to be nested so you can’t add the required PP form tag within the aspnetForm page tag. If you wrap the PP code in
/form> …. your code here…. form>

tags they will work in Firefox/Chrome but not in IE.Oy vay! So here’s yet another “no code” workaround or 2 to compensate for the sloppy coding behind the public site editor.
Method 1: Buy Now Buttons.
If you only need a Buy Now (or simple Add To Cart) button you can use the email link Paypal provides.
Create your button at Paypal
In the last step, click the email tab and copy the link
Add some text or an image to a site page. You can grab the Paypal image url from another button.
Highlight the text/image and insert a link
Select “from address” and paste in the PP link copied earlier.
There’s an example at the top of this page »

Method 2: Add To Cart And Buttons With Options

First, paste your Paypal code into notepad (as many button codes as you need).
Save the file as an .aspx file
Upload it to the SITE ASSETS library in the public site (TIP:or create file directly in Sharepoint Designer).
Insert a Page Viewer web part on your page
Open the page viewer’s web part properties
Enter the url of your uploaded file as the target link

101313_1928_addaworking2The page viewer web part includes a space for the title even if you leave the title box blank. If you want to eliminate the “gap”, simply open the web part properties box and select “none” under appearance » chrome type.
You can see examples of this procedure here »
Why do I have to use a page viewer web part?
The page viewer wp iframes the paypal aspx “page” on your public site page. The iframe isolates the paypal code from the form tags that wrap all content on the public site page and allows it to work correctly.
This issue existed in Office Live Small Business and it’s bizarre that such a simple thing to fix hasn’t been addressed in O365. I can’t explain that, but if you have any questions about this workaround, please ask them in my forum ». For development work, you can contact me here ». Click a social button up top to share this post if you found it useful!