Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-16T08:47:38-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=15641 2012-01-16T08:47:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=60659#p60659 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Thanks for your inquiry.

So sorry, s2Member does not currently pass through the Coupon Code itself. However, in the example above, $vars["paypal"]["item_name"] WILL include reference to the Coupon Code having been used, including the original purchase, along with whatever discount was applied. In addition, $vars["paypal"]["item_name"] will include the full desc="" attribute value from your Shortcode that was used to generate the Payment Button and/or s2Member Pro Form.

In the UI panel for s2Member's configuration of your Signup Confirmation Email, the value of $vars["paypal"]["item_name"] is referenced using the Replacement Code %%item_name%%. So you shouldn't need this hack at all, so long as you include whatever details you want to include in your desc="" attribute for the Shortcode.

SNAG-0010.pngSNAG-0011.png


All of this being said... there are some additional values that could be used in the $vars["paypal"] array via the hack that I presented earlier. Here are a few that might help you.

Code:
$vars["paypal"]["initial"] = the initial or trial amount of the sale.
$vars["paypal"]["initial_term"] = 1 D (would indicate an initial/trial period 1 Day). This is always a digit followed by a space, and then one of D,W,M,Y,L for Days, Weeks, Months, Years or Lifetimes.
$vars["paypal"]["regular"] = the regular and/or recurring amount associated with the sale.
$vars["paypal"]["regular_term"] = 1 M (would indicate the regular recurring or fixed-term term period). This is always a digit followed by a space, and then one of D,W,M,Y,L for Days, Weeks, Months, Years or Lifetimes. 
Others are available, but you'll need to check the source code here.

Statistics: Posted by Jason Caldwell — January 16th, 2012, 8:47 am


]]>
2012-01-15T22:14:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=60632#p60632 <![CDATA[Re: Custom Capability Email - Urgent :)]]>
We are looking to do something maybe similar. We want the email that the ADMIN receives when a new member joins to also include the membership they bought (60 day, 90 day, 12 mo, etc.) and the coupon code used (if any). What would be the easiest way to do this?

This was the closest thread I found so far to what we are trying to do.

Statistics: Posted by EidschunMedia — January 15th, 2012, 10:14 pm


]]>
2011-11-15T19:36:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53136#p53136 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Thanks for bringing this thread back to my attention.

A UI panel configuration area, IS made available for the Signup Confirmation Email, so this hack is only required when/if you need to modify this email in more dynamic ways, which might not be possible with Replacement Codes alone. This hack follows pretty much the same format as the hack I posted earlier for the sale of Independent Custom Capabilities.

Please create this directory and file:

/wp-content/mu-plugins/s2-hacks.php ( these are MUST USE plugins, that's what you want )
Reference article: http://codex.wordpress.org/Must_Use_Plugins
Code:
<?php
/* Your own custom subject line. */
add_filter ("ws_plugin__s2member_signup_email_sbj", "my_s2_signup_email_sbj");
function my_s2_signup_email_sbj ($sbj, $vars = array ())
    {
        return "Congratulations! ( your membership has been approved )";
    }
/* Your own custom message body. */
add_filter ("ws_plugin__s2member_signup_email_msg", "my_s2_signup_email_msg");
function my_s2_signup_email_msg ($msg, $vars = array ())
    {
        return "Thank you! You now have access to:\n" . $vars["paypal"]["item_name"];
    }
?>
* Note, be sure there are NO leading or trailing spaces/tabs/line breaks, before or after <?php ?>

* Even though you see reference here to $vars["paypal"]["item_name"], this hack works for all Payment Gateways integrated with s2Member, because ultimately, all transactions are piped through s2Member's core PayPal processor, one way or the other.

In s2Member's source code, these Filters are applied here at line #364:
viewtopic.php?f=40&t=14521&src_doc_v=111105#src_doc_line_364
See also: viewtopic.php?f=40&t=12778&src_doc_v=111105

Statistics: Posted by Jason Caldwell — November 15th, 2011, 7:36 pm


]]>
2011-11-15T15:39:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53093#p53093 <![CDATA[Re: Custom Capability Email - Urgent :)]]> That's why I need some hack inorder to have that dynamic promo code
thanks :)

Statistics: Posted by yamidemichaos — November 15th, 2011, 3:39 pm


]]>
2011-11-15T15:30:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53089#p53089 <![CDATA[Re: Custom Capability Email - Urgent :)]]>
For example, in the shortcode button that new users use to signup, you could add custom="example.com|promo-code1".

Then, in your Signup Confirmation Email (WP Admin -> s2Member -> Auth.Net Options -> Signup Confirmation Email (Pro Form)) you could add something to the body of the email that says "Promo Code: %%cv1%% ".

Whatever you used in the custom field of the shortcode button (after the domain), will show up in the Signup Confirmation Email. In this case, they would see "Promo Code: promo-code1".

Please read the Custom Replacement Codes section at the bottom of WP Admin -> s2Member -> Auth.Net Options -> Signup Confirmation Email (Pro Form) and let me know if that will work for you.

Statistics: Posted by Raam Dev — November 15th, 2011, 3:30 pm


]]>
2011-11-15T14:47:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53083#p53083 <![CDATA[Re: Custom Capability Email - Urgent :)]]> He don't want to send it separately.
Thanks!

Statistics: Posted by yamidemichaos — November 15th, 2011, 2:47 pm


]]>
2011-11-15T14:44:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53081#p53081 <![CDATA[Re: Custom Capability Email - Urgent :)]]> WP-Admin -> s2Member -> General Options -> Email Configuration. Scroll to the bottom of that section and you'll see where you can modify the New User Email Message.

Let me know if that's what you're looking for. :)

Statistics: Posted by Raam Dev — November 15th, 2011, 2:44 pm


]]>
2011-11-15T14:43:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53080#p53080 <![CDATA[Re: Custom Capability Email - Urgent :)]]> WP Admin -> s2Member -> General Options -> Email -> New User

When he pays he gets the confirmation email. WP Admin -> s2Member -> [gateway] Options -> Confirmation Email

If he pays to modify the access with a new level or custom capability, he gets a transactional email that currently has no interface in the admin area, but you can edit with a hack. The hack in this thread is to edit the email sent when new custom capabilities are purchased. There's another hack for the email sent to users when they change their level.

I hope that helps understand these better. :)

Statistics: Posted by Cristián Lávaque — November 15th, 2011, 2:43 pm


]]>
2011-11-15T14:38:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53079#p53079 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Do you have other reference? for what I needed.
Thanks

Statistics: Posted by yamidemichaos — November 15th, 2011, 2:38 pm


]]>
2011-11-15T14:36:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53077#p53077 <![CDATA[Re: Custom Capability Email - Urgent :)]]>

Are you trying to modify the Custom Capabilities email (the email that gets sent when an existing user makes a purchase for a Custom Capability to be added to their account) or are you trying to modify the email that is sent when a new user registers for an account?

The code that Jason suggested adding to s2-hacks.php is *not* for New User Registration emails -- it's for the notification of new Custom Capabilities purchased by an existing user.

Statistics: Posted by Raam Dev — November 15th, 2011, 2:36 pm


]]>
2011-11-15T14:25:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53074#p53074 <![CDATA[Re: Custom Capability Email - Urgent :)]]> I just want the custom one to replace the admin template.
thanks for the patience :)

Statistics: Posted by yamidemichaos — November 15th, 2011, 2:25 pm


]]>
2011-11-15T14:14:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53070#p53070 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Statistics: Posted by Raam Dev — November 15th, 2011, 2:14 pm


]]>
2011-11-15T14:09:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53066#p53066 <![CDATA[Re: Custom Capability Email - Urgent :)]]> No sign of working.

Statistics: Posted by yamidemichaos — November 15th, 2011, 2:09 pm


]]>
2011-11-15T14:01:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53063#p53063 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Statistics: Posted by Raam Dev — November 15th, 2011, 2:01 pm


]]>
2011-11-15T13:46:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53055#p53055 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Statistics: Posted by yamidemichaos — November 15th, 2011, 1:46 pm


]]>
2011-11-15T13:43:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53054#p53054 <![CDATA[Re: Custom Capability Email - Urgent :)]]>
Can you explain what you mean by this:

yamidemichaos wrote:
I just to create a customized ID which random features which attached to the email...

Statistics: Posted by Raam Dev — November 15th, 2011, 1:43 pm


]]>
2011-11-15T13:34:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53050#p53050 <![CDATA[Re: Custom Capability Email - Urgent :)]]>
Code:
<?php
    
/* Your own custom subject line. */
    
add_filter ("ws_plugin__s2member_capabilities_email_sbj""my_s2_ccaps_email_sbj");
    function 
my_s2_ccaps_email_sbj ($sbj$vars = array ())
        {
            return 
"Thank you! Your account has been updated.";
        }
    
/* Your own custom message body. */
    
add_filter ("ws_plugin__s2member_capabilities_email_msg""my_s2_ccaps_email_msg");
    function 
my_s2_ccaps_email_msg ($msg$vars = array ())
        {
            return 
"Thank you! You now have access to:\n" $vars["paypal"]["item_name"] . "\n\nPlease log back in now.\n" wp_login_url ();
        }
?>

Statistics: Posted by yamidemichaos — November 15th, 2011, 1:34 pm


]]>
2011-11-15T11:15:21-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53037#p53037 <![CDATA[Re: Custom Capability Email - Urgent :)]]>
Can you please copy and paste what you put in /wp-content/mu-plugins/s2-hacks.php.

Statistics: Posted by Raam Dev — November 15th, 2011, 11:15 am


]]>
2011-11-15T09:46:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=53034#p53034 <![CDATA[Re: Custom Capability Email - Urgent :)]]> I just to create a customized ID which random features which attached to the email... Please help urgent
Thanks in advance

Statistics: Posted by yamidemichaos — November 15th, 2011, 9:46 am


]]>
2011-10-26T12:06:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=48864#p48864 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Thanks for bringing this thread to my attention.

There is currently no UI panel configuration area for this particular email. However, it IS possible to modify the basic transactional subject line and message that s2Member uses in this scenario.

Please create this directory and file:


/wp-content/mu-plugins/s2-hacks.php ( these are MUST USE plugins, that's what you want )
Reference article: http://codex.wordpress.org/Must_Use_Plugins
Code:
<?php
/* Your own custom subject line. */
add_filter ("ws_plugin__s2member_capabilities_email_sbj", "my_s2_ccaps_email_sbj");
function my_s2_ccaps_email_sbj ($sbj, $vars = array ())
    {
        return "Thank you! Your account has been updated.";
    }
/* Your own custom message body. */
add_filter ("ws_plugin__s2member_capabilities_email_msg", "my_s2_ccaps_email_msg");
function my_s2_ccaps_email_msg ($msg, $vars = array ())
    {
        return "Thank you! You now have access to:\n" . $vars["paypal"]["item_name"] . "\n\nPlease log back in now.\n" . wp_login_url ();
    }
?>
* Note, be sure there are NO leading or trailing spaces/tabs/line breaks, before or after <?php ?>

* Even though you see reference here to $vars["paypal"]["item_name"], this hack works for all Payment Gateways integrated with s2Member, because ultimately, all transactions are piped through s2Member's core PayPal processor, one way or the other.

Statistics: Posted by Jason Caldwell — October 26th, 2011, 12:06 pm


]]>
2011-10-25T23:56:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=48807#p48807 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Statistics: Posted by Cristián Lávaque — October 25th, 2011, 11:56 pm


]]>
2011-10-24T17:46:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=48693#p48693 <![CDATA[Re: Custom Capability Email - Urgent :)]]> Statistics: Posted by lmllewellyn — October 24th, 2011, 5:46 pm


]]>
2011-10-24T17:35:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=48692#p48692 <![CDATA[Re: Custom Capability Email - Urgent :)]]> WP Admin -> s2Member -> Authorize.Net® Options.

Please tell me if you solved your problem, or not.

Statistics: Posted by Eduan — October 24th, 2011, 5:35 pm


]]>
2011-10-24T16:27:13-05:00 http://www.primothemes.com/forums/viewtopic.php?t=15641&p=48687#p48687 <![CDATA[Custom Capability Email - Urgent :)]]>
Thanks!

Statistics: Posted by lmllewellyn — October 24th, 2011, 4:27 pm


]]>