Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Paypal ButtonsPaypal Buttons
Previous
 
Next
New Post
2/15/2011 10:18 PM
 
Hi...I am desperate for help installing Paypal buttons. From what I can gather the code Paypal give you won't work without alterations because of the form. I have tried playing around with it based on an old net posting about Paypal buttons in DNN...but can't crack the right code.

I am using a simply "Buy Now" button - one per page. I have it set up from the Paypal end but can't get it to work on my site. When you click on the link it simply stays at the current page. Can anyone advise what part of the code I have to change.

With many thanks!
Margit
 
New Post
2/16/2011 1:27 AM
 
Margit- the problem is that DotNetNuke already uses a 'form' which is a way for the current page to post back information to the server. All DotNetNuke pages are forms-based, so that all the links like login, search, etc can work by sending the response back to the DotNetNuke website.

The PayPal buttons need to be on a form as well - if you look at the sample html you'll see the form tags. This is because the PayPal buttons post the information back to the PayPal server, and, as DNN already is setup to post back to your own server, it doesn't work (as you've found out).

Basically, at this point, your choices are this:
1) set up a html page with the paypal code, and locate it in an iframe on your DNN page somewhere.
2) purchase a paypal buttons module - there are some on snowcovered.
3) get a developer to write you a custom dnn module for your needs.

I can heartily recommend option 2 - the modules aren't very expensive and will save you far more time than they cost to implement.
 
New Post
2/16/2011 6:16 AM
 
Margitc
This is relatively simple to do. First you need to add an onclick to the submit button
<input type="submit" name="sendMessage" onclick="PostThisForm()" id="sendMessage" value="Send Message" />
  

Then you will need to add some javascript


function PostThisForm(){
document.forms[0].action = "PayPal URL + String for PayPal payment"; 
document.forms[0].submit(); 
return true;
}
and thats it.
hope this helps
Marcel
 
New Post
2/16/2011 6:02 PM
 
Thanks Bruce - the iframes look interesting for other purposes too! I've had a look on Snowcovered and this seems like a simple option too. Will explore this a bit more.

Marcel, thankyou as well. I have tried this option but cannot seem to make it work. Probably something to do with having absolutely no idea about programming and knowing where instructions should be written in the code.

I've managed a temporary fix for the site, but will keep exploring. For now I've loaded the Buy button gif and simply linked it to the email link code Paypal have given me. A bit basic, but it's a good stopgap...unless you know of potential pitfalls with this :)

Honestly...thankyou so much!!!
 
New Post
3/1/2012 10:50 AM
 
Edmedia,
Thank you very much. Seven years later and this still works. :)

David
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Paypal ButtonsPaypal Buttons


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out