Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

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

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

multiple paypal buttons


Go to End


10 Posts   5275 Views

Avatar
Double-A-Ron

Community Member, 607 Posts

24 October 2008 at 9:34am

Ah, good.

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

Avatar
Briohny

Community Member, 199 Posts

24 October 2008 at 10:07am

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. :)

Go to Top