Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » multiple paypal buttons

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 4112 Views
  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: multiple paypal buttons Link to this post

    Ah, good.

    Do you want to post how you did it for future searchers please?

  • Briohny
    Avatar
    Community Member
    199 Posts

    Re: multiple paypal buttons Link to this post

    Well... i couldn't for the life of me get the code working by inserting the html directly into the editor... it just kept stripping the values no matter what i tried. I actually didn't get as far as to test this method in FF. I went with the original content() script because it was the only way i could get it to work both IE and FF. I used the below code:

    function Content() {
       $content = $this->Content;
       $content = str_replace('$PayPal1', $this->PayPal1(), $content);
       $content = str_replace('$PayPal3', $this->PayPal2(), $content);
       $content = str_replace('$PayPal4', $this->PayPal4(), $content);
       $content = str_replace('$PayPal5', $this->PayPal5(), $content);
       $content = str_replace('$PayPal6', $this->PayPal6(), $content);
       return $content;
       }

    function PayPalRecreation() {
       return '<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="??????">
       <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynow_SM.gif" border="0" name="submit" alt="">
       <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
       </form>';
       }

    So all that is in the content editor is $PayPal1 etc. It seems to be working all ok.

    4112 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.