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™

Template shortcode not working

s2Member Plugin. A Membership plugin for WordPress®.

Template shortcode not working

Postby scottgould » July 17th, 2011, 2:07 pm

Hi Guys

I am trying to use the Template shortcode option in my pro forms.

Currently it looks like this:

Code: Select all
[s2Member-Pro-PayPal-Form level="1" ccaps="+exeter2011,attendee" desc="<strong>Full registration for the conference is £280 ex. VAT.</strong>" ps="paypal" lc="" cc="GBP" dg="0" ns="1" custom="wearelikeminds.com|exeter2011|23" ta="0" tp="0" tt="Y" ra="280" rp="1" rt="Y" rr="BN" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" success="https://wearelikeminds.com/registration/exeter-2011/customise" template="checkout.php" /]


However, the checkout.php page is not being used.

I'm not sure what I might be doing wrong here

Thanks in advance for your help - I am very grateful for all you guys do,

Scott
User avatar
scottgould
Registered User
Registered User
 
Posts: 30
Joined: March 28, 2011

Re: Template shortcode not working

Postby Cristián Lávaque » July 17th, 2011, 3:52 pm

Hi Scott. :)

Where did you put checkout.php? It has to be in /wp-content/ or your theme's directory (i.e. http://wearelikeminds.com/wp-content/themes/likeminds/).
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: Template shortcode not working

Postby scottgould » July 17th, 2011, 4:04 pm

Hi Cristián,

It's in the theme folder - I'll try putting it in /wp-content/

Scott
User avatar
scottgould
Registered User
Registered User
 
Posts: 30
Joined: March 28, 2011

Re: Template shortcode not working

Postby Cristián Lávaque » July 17th, 2011, 8:36 pm

Cool. Let me know if that works better for you.

If not, please zip checkout.php and send us the file or a link to it by email, so we can take a look at the code.
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: Template shortcode not working

Postby scottgould » July 18th, 2011, 2:59 am

Boom!

Yes it works by putting it in /wp-content/

Two more questions quickly, if you know how this will help:

1. How do I change the text in %%coupon_response%%, or other shortcodes? (i.e., when it says "Sales Tax", I need to change that to just "Tax")

2. How do I change the PayPal button image to be just a plain button? (The whole reason why I'm using pro forms is to appear like I'm not using PayPal you see)

Thanks,

Scott
User avatar
scottgould
Registered User
Registered User
 
Posts: 30
Joined: March 28, 2011

Re: Template shortcode not working

Postby Cristián Lávaque » July 18th, 2011, 11:37 pm

Great! Glad it worked there. :)

1. How do I change the text in %%coupon_response%%, or other shortcodes? (i.e., when it says "Sales Tax", I need to change that to just "Tax")

You could try using str_replace or strtr for that.
http://php.net/str_replace
http://php.net/strtr

2. How do I change the PayPal button image to be just a plain button? (The whole reason why I'm using pro forms is to appear like I'm not using PayPal you see)

For the PayPal option it has to be the PayPal button, it seems to be a PayPal policy. When choosing one of the other options (Visa, Matercard, etc) the button changes to a normal HTML one, which I believe you can edit with CSS.
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: Template shortcode not working

Postby scottgould » July 19th, 2011, 5:39 am

Hi Cristián

Thanks - but this won't work as %%coupon_response%% is not a PHP Variable - so when it put it in PHP, the page errors!

Any ideas?

Scott
User avatar
scottgould
Registered User
Registered User
 
Posts: 30
Joined: March 28, 2011

Re: Template shortcode not working

Postby Cristián Lávaque » July 19th, 2011, 11:17 pm

Ah, I see. Hmm.... Well, you could try replacing that string with JavaScript... or find where s2Member replaces that code with the string and then you edit it there using a hook.
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: Template shortcode not working

Postby Jason Caldwell » July 21st, 2011, 5:41 pm

Thanks for the heads-up on this thread.

I did just confirm that s2Member Pro v110710+ will correctly find a custom template file inside your active theme directory. It has to be inside your active theme directory, like this:
/wp-content/themes/twentyeleven/checkout.php
Please let me know if you continue to have trouble with this.

The /wp-content/ directory also works, and if present, will override the one inside the active theme directory: /wp-content/checkout.php.
~ 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: Template shortcode not working

Postby Jason Caldwell » July 21st, 2011, 5:47 pm

scottgould wrote:Thanks - but this won't work as %%coupon_response%% is not a PHP Variable - so when it put it in PHP, the page errors! Any ideas?
Sorry, there is no way to modify this value yet, not without modifying the source code for s2Member Pro. I'll see what we can do about this in a future release. Until then, you can search the s2Member Pro file: /s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php for public static function paypal_apply_coupon

See source file: viewtopic.php?f=40&t=13268&src_doc_v=110710#src_doc_line_401
~ 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: Bing [Bot], Exabot [Bot], Google [Bot] and 1 guest

cron