Page 1 of 1
Custom s2member Pro form templates

Posted:
September 29th, 2010, 2:22 pm
by kenduret
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?
Re: Custom s2member Pro form templates

Posted:
October 1st, 2010, 2:12 pm
by kenduret
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?
Re: Custom s2member Pro form templates

Posted:
May 19th, 2011, 5:52 pm
by toddz88
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".
Re: Custom s2member Pro form templates

Posted:
May 19th, 2011, 5:58 pm
by Cristián Lávaque
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#p15385Let me know if that helps.

Re: Custom s2member Pro form templates

Posted:
May 19th, 2011, 6:15 pm
by toddz88
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.
Re: Custom s2member Pro form templates

Posted:
May 19th, 2011, 8:05 pm
by Cristián Lávaque
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!
Re: Custom s2member Pro form templates

Posted:
May 23rd, 2011, 3:42 am
by Jason Caldwell
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.
Re: Custom s2member Pro form templates

Posted:
October 31st, 2011, 11:35 pm
by 13zebras
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
Re: Custom s2member Pro form templates

Posted:
November 18th, 2011, 4:32 am
by oxwald
Same request, it would be very helpfull for "non english" countries
Re: Custom s2member Pro form templates

Posted:
November 20th, 2011, 11:06 pm
by Jason Caldwell
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")
$translated = "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
Re: Custom s2member Pro form templates

Posted:
November 21st, 2011, 10:19 am
by oxwald
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 ?
Re: Custom s2member Pro form templates

Posted:
November 21st, 2011, 11:49 am
by Jason Caldwell
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.
Re: Custom s2member Pro form templates

Posted:
November 21st, 2011, 12:24 pm
by oxwald
It works, thanks.
(in fact, the s2-hacks.php is not needed, and therefore creates an error). Only s2memeber-o.php needed
Best regards
Re: Custom s2member Pro form templates

Posted:
November 21st, 2011, 12:34 pm
by Jason Caldwell
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