Page 1 of 1

Members Unique ID

PostPosted: July 21st, 2010, 1:26 pm
by YNPNNYC
Hi,

We are trying to give our members a Unique ID they can present for discounts they are able to receive. Is there a way we can generate this with s2Member and can it be sent automatically in the registration confirmation email?

Thank you,

Dana

Re: Members Unique ID

PostPosted: July 22nd, 2010, 7:26 pm
by Jason Caldwell
Hi Dana. Thanks for the great question.
There are several ways you could do this.

1. If you are only sending this to paid Members, you can use the Replacement Code %%subscr_id%% in your Signup Confirmation Email. This is documented in your WP Dashboard, under:
s2Member -> PayPal Options -> Signup Confirmation Email

2. Or, you could also use one of the Custom Replacement Codes ( %%cv1%% ) perhaps. Also documented under: s2Member -> PayPal Options -> Signup Confirmation Email

3. You could access information about a Member with Hooks/Filters; working in conjunction with the actual Registration process; which would provide compatibility with Free Registrations, and not just paid transactions. Here is sample code snippet that might help you, or your developer:

Place something like this inside the functions.php file for your WordPress theme:
Code: Select all
<?php
add_action("ws_plugin__s2member_during_configure_user_registration", "my_function");
function my_function($vars){
$unique_user_id = $vars["user_id"];
// print_r($vars); to get a full list for testing.
}
?>

4. You could also use s2Member's API Notifications. These are dispatched automatically; based on specific events within the s2Member Framework. Check your WP Dashboard, under:
s2Member -> API Notifications

@C/TODO :: In a future release, we need to include the User ID as a Replacement Code for confirmation emails; and anywhere else it may be applicable. This would also be useful in this scenario.

Re: Members Unique ID

PostPosted: July 22nd, 2010, 9:26 pm
by Jason Caldwell
@C/TODO :: In a future release, we need to include the User ID as a Replacement Code for confirmation emails; and anywhere else it may be applicable. This would also be useful in this scenario.

@COMPLETED :: ( as of s2Member v3.1.5+ )

Re: Members Unique ID

PostPosted: July 27th, 2010, 5:02 pm
by YNPNNYC
Hi Jason,

Thank you for all the options in your reply, I really appreciate it. I will try and see which one I can do, as it's me doing it and I am not a developer, just a tech enthusiast. It would be a great option to include, I've had a few people mention it to me when I've helped in setting this awesome feature up for them.

Thanks,

Dana

Re: Members Unique ID

PostPosted: July 28th, 2010, 8:13 am
by Jason Caldwell
Very welcome Dana. Thanks for the feedback. Much appreciated.

Re: Members Unique ID

PostPosted: August 17th, 2010, 12:05 pm
by Jason Caldwell
@COMPLETED/TODO :: In a future release, we need to include the User ID as a Replacement Code for confirmation emails; and anywhere else it may be applicable. This would also be useful in this scenario.

This topic was addressed gain with the release of s2Member v3.2.

- Replacement Codes. The `%%user_id%%` Replacement Code has been added to several other API Notifications now. Also, there are two new Replacement Codes for Payment Notifications ( `%%subscr_payment%%`, `%%subscr_payment_user_id%%` ). For further details, see: `s2Member -> API Notifications` in your Dashboard.