latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Classic link to replace payment button

Home Forums Community Forum Classic link to replace payment button

Tagged: 

This topic contains 3 replies, has 3 voices. Last updated by  Emmanuel Genoll 3 years, 12 months ago.

Topic Author Topic
Posted: Wednesday Jan 9th, 2013 at 11:08 am #36777

Hello,
I need to know how to replace a button shortcode by a link.

For example,

Replace this :

[s2Member-PayPal-Button level="1" ccaps="" desc="Basic Membership" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="www.mysite.com" ta="1" tp="5" tt="D" ra="10" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]

With :

<a href="HERE THE CODE TO JOIN" class="join-button">
	<span>Clic to Join</span>
</a>

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Jan 10th, 2013 at 6:48 am #36850
Bruce
Username: Bruce
Staff Member

Hi Emmanuel,

Thanks for your great question

This is definitely possible:

This method requires that you edit and replace the file /s2member/includes/templates/buttons/paypal-checkout-button.php every time a new version of s2Member is released, and you upgrade.

To do this, you’ll want to take a look at line 46 of /s2member/includes/templates/buttons/paypal-checkout-button.php. You’ll see there this line:

<input type="image" src="https://www.paypal.com/<?php echo esc_attr (_x ("en_US", "s2member-front paypal-button-lang-code", "s2member")); ?>/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />

You’ll want to replace this with the button that you’d like. This can be any input that will submit the form when clicked. No fancy JavaScript is needed.

You can do similar things to this with other template files within s2Member. For standard s2Member buttons, you’ll find the templates under /s2member/includes/templates/buttons/. Otherwise, you need to check out the files under /s2member-pro/includes/templates/.

Posted: Thursday Jan 10th, 2013 at 10:03 am #36863
Staff Member

Thanks for the heads up on this thread.

It is also possible to accomplish this with an s2Member Shortcode.

<a href="&#91;&#91;s2Member-PayPal-Button ... output="url" /&#93;&#93;">click here</a>

For documentation on the output="" shortcode attribute, please see:
Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes (Explained)

Posted: Friday Jan 11th, 2013 at 1:21 pm #37026

Thank you
I will test it right now

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.