PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Custom s2member Pro form templates

s2Member Plugin. A Membership plugin for WordPress®.

Custom s2member Pro form templates

Postby kenduret » September 29th, 2010, 2:22 pm

I'm trying to change the value of the submit button to 'Signup' instead of 'Submit Form'. I copied the paypal-pro-checkout-form.html and paypal-pro-sp-checkout-form.html to my childtheme directory and made the modifications I wanted but they are not being reflected on the site.

So I then hacked the core plugin form file to see the results but the submit button still reads 'Submit Form' so I then hacked the .js file to see if I could get the text to change. No luck. Is there something I'm missing to modify the submit button value?
User avatar
kenduret
Registered User
Registered User
 
Posts: 13
Joined: September 2, 2010
Location: Santa Cruz CA

Re: Custom s2member Pro form templates

Postby kenduret » October 1st, 2010, 2:12 pm

So I managed to change the 'submit form' in the minimized js but am hoping it can be done another way without hacking the plugin core files.

I also had an issue with a customer that was confused by the select billing method. The default billing is paypal but the radio button is un-checked by default. If you click on the un-checked radio button it selects the button but the form does not change. Is there a way that the paypal radio button can be checked by default on page load?
User avatar
kenduret
Registered User
Registered User
 
Posts: 13
Joined: September 2, 2010
Location: Santa Cruz CA

Re: Custom s2member Pro form templates

Postby toddz88 » May 19th, 2011, 5:52 pm

I too would like to know how we can change the default label/text/value of the paypal checkout form submit button, WITHOUT hacking s2m (js) files directly.

The default "Submit Form" is very generic and cold.
We want it to say "Sign Up Now" or "Purchase Now" or "Join Now".
User avatar
toddz88
Experienced User
Experienced User
 
Posts: 61
Joined: November 19, 2010

Re: Custom s2member Pro form templates

Postby Cristián Lávaque » May 19th, 2011, 5:58 pm

I just learnt how to edit the pro-form templates. I posted about it earlier, you can read it here viewtopic.php?f=4&p=15385#p15385

Let me know if that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Custom s2member Pro form templates

Postby toddz88 » May 19th, 2011, 6:15 pm

Hey Cristián. Thanks, but actually that doesn't quite solve this one, since s2m is using jQuery to override the html template for the Submit Button.

In s2member-pro/includes/separates/gateways/paypal/paypal.js (or the min version), line 400.

And of course we don't want to just edit this file.
User avatar
toddz88
Experienced User
Experienced User
 
Posts: 61
Joined: November 19, 2010

Re: Custom s2member Pro form templates

Postby Cristián Lávaque » May 19th, 2011, 8:05 pm

You're absolutely right, it's using the JS string although the template file has the HTML for the submit button too. I'm guessing the problem comes in because the button has to change depending on whether PayPal or a card is used. This looks like a bug, sort of, I'll let Jason know. Thanks for spotting it!
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Custom s2member Pro form templates

Postby Jason Caldwell » May 23rd, 2011, 3:42 am

Thanks for reporting this important issue.
~ and thanks Cristián, for the heads up.

Yep, I'll see what we can do about this. It's a bit tricky because PayPal® requires their Button to be displayed whenever a Customer selects PayPal®. That's the reason it's dynamically adjusted in JavaScript. But, I'll see what we can do to make this simpler to customize.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Custom s2member Pro form templates

Postby 13zebras » October 31st, 2011, 11:35 pm

Jason, Cristian....

Did you ever create a fix for customizing the "Checkout Button" in the Paypal Pro Form? I would like to change that, too, but I cannot find anything the forum on how to do so. Thanks.... Tom
User avatar
13zebras
Registered User
Registered User
 
Posts: 1
Joined: October 31, 2011

Re: Custom s2member Pro form templates

Postby oxwald » November 18th, 2011, 4:32 am

Same request, it would be very helpfull for "non english" countries
User avatar
oxwald
Registered User
Registered User
 
Posts: 7
Joined: November 18, 2011

Re: Custom s2member Pro form templates

Postby Jason Caldwell » November 20th, 2011, 11:06 pm

Thanks for the heads up on this thread.

In current releases of s2Member Pro, it is no longer possible to modify the Express Checkout button image to one of your own. This is due to strict policy requirements set forth by PayPal's terms of service.

However, s2Member Pro does make it possible the modify the language used in PayPal's Express Checkout Button image, to one of the Locale Codes supported by PayPal. You will need s2Member Pro v111105+ for this hack to work as expected. Please create this directory and files.

/wp-content/mu-plugins/s2-hacks.php
/wp-content/mu-plugins/s2member-o.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )
( use the exact same code in both files please )
Code: Select all
<?php
if 
(!function_exists ("my_s2_pro_paypal_exp_co_button_locale"))
    {
        add_filter ("gettext_with_context", "my_s2_pro_paypal_exp_co_button_locale", 10, 3);
        function my_s2_pro_paypal_exp_co_button_locale ($translated, $original, $context)
            {
                if ($context && $context === "s2member-front paypal-button-lang-code" && $original === "en_US")
                    /* See: <https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECButtonIntegration#id089QD0O0TX4__id08AH8N000HS>. */
                    $translated = /* Use another/different PayPal locale that you prefer. */ "de_DE";
                /**/
                return $translated;
            }
    }
?>
* Will force s2Member Pro to use this Express Checkout Button instead:
Code: Select all
https://www.paypal.com/de_DE/i/btn/btn_xpressCheckout.gif
s2-hacks.zip
(537 Bytes) Downloaded 26 times
s2member-o.zip
(541 Bytes) Downloaded 26 times
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Custom s2member Pro form templates

Postby oxwald » November 21st, 2011, 10:19 am

I tried this with
$translated = /* Use another/different PayPal locale that you prefer. */ "fr_FR";
uploaded in /mu-plugins/s2-hacks.php
with no success.
Did i miss something ?
User avatar
oxwald
Registered User
Registered User
 
Posts: 7
Joined: November 18, 2011

Re: Custom s2member Pro form templates

Postby Jason Caldwell » November 21st, 2011, 11:49 am

Thanks for the follow-up on this.

I see, this is due to the way s2Member loads it's JavaScript library. I've updated the instructions above to correct my mistake earlier. You'll need to grab the revised code sample from above, and be sure to duplicate your code into both /s2-hacks.php and into /s2member-o.php.

Please let us know if you have any further trouble.

Also, please note: these hack files are not required when/if you're translating s2Member's POT file. While it is possible to use the gettext_with_context Filter for WordPress, it's not needed when you're doing a full translation of s2Member's POT file. For further details, please check the instructions inside: /s2member/includes/translations.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Custom s2member Pro form templates

Postby oxwald » November 21st, 2011, 12:24 pm

It works, thanks.
(in fact, the s2-hacks.php is not needed, and therefore creates an error). Only s2memeber-o.php needed
Best regards
User avatar
oxwald
Registered User
Registered User
 
Posts: 7
Joined: November 18, 2011

Re: Custom s2member Pro form templates

Postby Jason Caldwell » November 21st, 2011, 12:34 pm

Thanks for the follow-up.
oxwald wrote:It works, thanks.
(in fact, the s2-hacks.php is not needed, and therefore creates an error). Only s2memeber-o.php needed
Best regards
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 0 guests

cron