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 Capability Email - Urgent :)

s2Member Plugin. A Membership plugin for WordPress®.

Custom Capability Email - Urgent :)

Postby lmllewellyn » October 24th, 2011, 4:27 pm

HI, where can I modify the email that gets sent to customers who purchase a custom capability through authorize.net pro forms?

Thanks!
User avatar
lmllewellyn
Registered User
Registered User
 
Posts: 17
Joined: August 31, 2011

Re: Custom Capability Email - Urgent :)

Postby Eduan » October 24th, 2011, 5:35 pm

Try under WP Admin -> s2Member -> Authorize.Net® Options.

Please tell me if you solved your problem, or not.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Custom Capability Email - Urgent :)

Postby lmllewellyn » October 24th, 2011, 5:46 pm

I only see a place to change the signup email and the page/post email, not the custom capabilities email.
User avatar
lmllewellyn
Registered User
Registered User
 
Posts: 17
Joined: August 31, 2011

Re: Custom Capability Email - Urgent :)

Postby Cristián Lávaque » October 25th, 2011, 11:56 pm

I'm emailing Jason to ask him about this.
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 Capability Email - Urgent :)

Postby Jason Caldwell » October 26th, 2011, 12:06 pm

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: Select all
<?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.
~ 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 Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 9:46 am

I try this for my Authorize.net Pro but not working...
I just to create a customized ID which random features which attached to the email... Please help urgent
Thanks in advance
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Raam Dev » November 15th, 2011, 11:15 am

yamidemichaos,

Can you please copy and paste what you put in /wp-content/mu-plugins/s2-hacks.php.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 1:34 pm

Code: Select all
<?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 ();
        }
?>
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Raam Dev » November 15th, 2011, 1:43 pm

Thank you.

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...
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 1:46 pm

I still want to create a customized ID like a promo code which are unique to each clients but before that I need code function work on my end then try to integrate.
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Raam Dev » November 15th, 2011, 2:01 pm

Is this a separate issue from modifying the email? Did you successfully modify the Custom Capability Email or are you still having problems with that?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 2:09 pm

I think the same issue, making custom email, which I wanted to create custom id from database which connect to the future user who finished registration.
No sign of working.
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Raam Dev » November 15th, 2011, 2:14 pm

Can you write an example of the email that you want to send out? Include everything that you want to send in the email.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 2:25 pm

I know actually how to use php format mail but I don't why the code work on me. I'm using Authorize.net Pro edition and all email on s2member are fine, if a new user would register the s2member send the email template from the admin side instead I would like the custom one.
I just want the custom one to replace the admin template.
thanks for the patience :)
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Raam Dev » November 15th, 2011, 2:36 pm

Thank you for the additional information and the patience. :)

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.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 2:38 pm

I thinks that an awful mislead.
Do you have other reference? for what I needed.
Thanks
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Cristián Lávaque » November 15th, 2011, 2:43 pm

When a user creates an account, he gets the New User email. 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. :)
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 Capability Email - Urgent :)

Postby Raam Dev » November 15th, 2011, 2:44 pm

You can modify the New Registration emails in 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. :)
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 2:47 pm

So there is no hack for the new registered user?.. Because my client wanted to have the promo id to be included to the email template during registration.
He don't want to send it separately.
Thanks!
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Raam Dev » November 15th, 2011, 3:30 pm

If you'd like to include a special code in the Signup Confirmation Email, you can create your signup buttons with an included Custom Replacement Code.

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.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: Custom Capability Email - Urgent :)

Postby yamidemichaos » November 15th, 2011, 3:39 pm

Promo codes are randomly from database. There is a database for that and client will get a unique promo code (e.g. 3000001 for clientA, 3000022 for clientB, 3232333 for clientC )
That's why I need some hack inorder to have that dynamic promo code
thanks :)
User avatar
yamidemichaos
Registered User
Registered User
 
Posts: 11
Joined: October 4, 2011

Re: Custom Capability Email - Urgent :)

Postby Jason Caldwell » November 15th, 2011, 7:36 pm

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: Select all
<?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
~ 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 Capability Email - Urgent :)

Postby EidschunMedia » January 15th, 2012, 10:14 pm

Jason,

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.
User avatar
EidschunMedia
Registered User
Registered User
 
Posts: 1
Joined: January 13, 2012

Re: Custom Capability Email - Urgent :)

Postby Jason Caldwell » January 16th, 2012, 8:47 am

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.png
SNAG-0010.png (31.46 KiB) Viewed 560 times
SNAG-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: Select all
$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.
~ 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: Google [Bot] and 1 guest

cron