Community Support Forums — WordPress® ( Users Helping Users ) — 2011-07-24T22:33:39-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14171 2011-07-24T22:33:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=29021#p29021 <![CDATA[Re: List of shortcodes in the Pro html templates?]]> Statistics: Posted by Jason Caldwell — July 24th, 2011, 10:33 pm


]]>
2011-07-24T13:21:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=29009#p29009 <![CDATA[Re: List of shortcodes in the Pro html templates?]]>

Statistics: Posted by blewis — July 24th, 2011, 1:21 pm


]]>
2011-07-24T12:06:00-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=29006#p29006 <![CDATA[Re: List of shortcodes in the Pro html templates?]]> Thanks for reporting back.
blewis wrote:
Not sure why, but the s2-hacks file in the mu-plugins directory did not work for me. The %%ra%% variable did not change to the price (it just stayed the literal string "%%ra%%" in the final output).

However, hacking the paypal-form-in.inc.php file directly did work. It's not the prettiest thing, since I not really like changing core files in plugins (due to updates). But at least it's working.

Thanks,
Bryan
Sorry for any confusion. You'll need to use <?php echo $GLOBALS["paypal_attr"]["ra"]; ?>. The %%ra%% Replacement Code is invalid inside a Pro Form template. The hack I supplied makes it possible to access Shortcode Attributes through PHP tags though.
Code:
<?php echo $GLOBALS["paypal_attr"]["attribute_name_goes_here"]; ?>

Statistics: Posted by Jason Caldwell — July 24th, 2011, 12:06 pm


]]>
2011-07-23T17:44:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28988#p28988 <![CDATA[Re: List of shortcodes in the Pro html templates?]]>
However, hacking the paypal-form-in.inc.php file directly did work. It's not the prettiest thing, since I not really like changing core files in plugins (due to updates). But at least it's working.

Thanks,
Bryan

Statistics: Posted by blewis — July 23rd, 2011, 5:44 pm


]]>
2011-07-22T19:57:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28948#p28948 <![CDATA[Re: List of shortcodes in the Pro html templates?]]>
Bryan

Statistics: Posted by blewis — July 22nd, 2011, 7:57 pm


]]>
2011-07-22T19:14:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28947#p28947 <![CDATA[Re: List of shortcodes in the Pro html templates?]]> The process is essentially the same for PayPal, but the locations are different. Here you go.
The Replacement Code %%description%% is handled inside:
Code:
/s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php
( search for instances of %%description%% )

OR --- if you want access to Shortcode Attributes inside your custom template file,
please create this directory and file first please:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_action 
("ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts", "my_action");
function my_action ($vars = array ())
    {
        $GLOBALS["paypal_attr"] = $vars["attr"];
    }
?>
* Now you can have access to all Shortcode Attributes inside your custom PHP template file. For instance, you could now use: $GLOBALS["paypal_attr"]["ra"]

Statistics: Posted by Jason Caldwell — July 22nd, 2011, 7:14 pm


]]>
2011-07-22T19:07:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28944#p28944 <![CDATA[Re: List of shortcodes in the Pro html templates?]]>
But just to clarify, I am using PayPal Pro (with ARB). The code for this would still be in the Authnet gateway directory?

Bryan

Statistics: Posted by blewis — July 22nd, 2011, 7:07 pm


]]>
2011-07-22T19:02:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28943#p28943 <![CDATA[Re: List of shortcodes in the Pro html templates?]]> %%description%% is handled inside:
Code:
/s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php
( search for instances of %%description%% )

OR --- if you want access to Shortcode Attributes inside your custom template file,
please create this directory and file first please:
/wp-content/mu-plugins/s2-hacks.php
Code:
<?php
add_action 
("ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts", "my_action");
function my_action ($vars = array ())
    {
        $GLOBALS["authnet_attr"] = $vars["attr"];
    }
?>
* Now you can have access to all Shortcode Attributes inside your custom PHP template file. For instance, you could now use: $GLOBALS["authnet_attr"]["ra"]

Statistics: Posted by Jason Caldwell — July 22nd, 2011, 7:02 pm


]]>
2011-07-22T18:44:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28941#p28941 <![CDATA[Re: List of shortcodes in the Pro html templates?]]> I'm investigating this now.

Just a quick FYI though. s2Member will notate discounts in the %%description%% value when/if discounts are applied through Coupon Codes. In other words, if your discounts are applied with Coupon Codes configured with s2Member, the %%description%% value would always indicate that a discount was applied, along with other notes about the Coupon used and the original price before the discount. Your original description is followed by this information, which is added dynamically by s2Member whenever a Coupon is used.

Statistics: Posted by Jason Caldwell — July 22nd, 2011, 6:44 pm


]]>
2011-07-21T00:43:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28781#p28781 <![CDATA[Re: List of shortcodes in the Pro html templates?]]> Statistics: Posted by Cristián Lávaque — July 21st, 2011, 12:43 am


]]>
2011-07-20T22:54:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28767#p28767 <![CDATA[Re: List of shortcodes in the Pro html templates?]]> Statistics: Posted by blewis — July 20th, 2011, 10:54 pm


]]>
2011-07-20T22:03:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28758#p28758 <![CDATA[Re: List of shortcodes in the Pro html templates?]]>
I was suggesting above that you edit the description attribute in the shortcode, just remove the price there: description="My Plan".

Statistics: Posted by Cristián Lávaque — July 20th, 2011, 10:03 pm


]]>
2011-07-20T11:22:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28716#p28716 <![CDATA[Re: List of shortcodes in the Pro html templates?]]>
I don't want the price in the description, mostly because we will be having a lot of various discount options. Because the description is used in things like the welcome email to tell them what level they have, I don't want the price in there because they may have used a discount code to reduce the base price. It would be confusing to have the description be "My Plan - $29.95 / Month" when there is a good chance they will not actually be paying that amount.

thanks,
Bryan

Statistics: Posted by blewis — July 20th, 2011, 11:22 am


]]>
2011-07-20T10:57:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28712#p28712 <![CDATA[Re: List of shortcodes in the Pro html templates?]]>
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.

But you can edit the description in the shortcode, have you tried that?

Statistics: Posted by Cristián Lávaque — July 20th, 2011, 10:57 am


]]>
2011-07-19T16:56:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14171&p=28663#p28663 <![CDATA[List of shortcodes in the Pro html templates?]]>
Currently toward the top of the page there is "%%description%%", which shows the value of the "desc" variable passed into it. I want to change this to something like "%%description%% - %%price%%" but I don't know what code to use or if there is even one available. It should be the contents of the "ra" field passed in, but "%%ra%%" is not a valid variable.

Is this possible?

Thanks,
Bryan

Statistics: Posted by blewis — July 19th, 2011, 4:56 pm


]]>