latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Raam Dev

Staff Member

My Latest Replies (From Various Topics)

Viewing 25 replies - 576 through 600 (of 2,567 total)
Author Replies
Author Replies
Posted: Tuesday Oct 9th, 2012 at 6:05 am #27868
Raam Dev
Username: Raam
Staff Member

Hi Quentin,

The two shortcode attributes you’ll need to use are rp=”” and rt=””. Here’s what Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes (Explained) says about those:

rp=”1″ Regular Period. Only valid w/ Membership Level Access and/or Independent Custom Capabilities. Must be >= 1 ( ex: 1 Week, 2 Months, 1 Month, 3 Days ).

rt=”M” Regular Term. Only valid w/ Membership Level Access and/or Independent Custom Capabilities. Possible values: D = Days, W = Weeks, M = Months, Y = Years, L = Lifetime.

The code you provided above gives the result in days, so you should set rt=”D”. Now, you’ll need to dynamically add the number of days into the rp=”” attribute (scroll over to the rp=”” attribute to see the PHP code):

[s2Member-PayPal-Button level="1" ccaps="" desc="Bronze Member / Description and pricing details here." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="example.com" ta="0" tp="0" tt="D" ra="0.01" rp="<?php echo $daysleft; ?>" rt="D" rr="1" rrt="" rra="1" image="default" output="button" /]

Now, whenever the PayPal button loads on your page, it will automatically be configured with the result in $daysleft. Keep in mind that you will need to be using a plugin like Exec-PHP to run PHP code inside your WordPress Page.

Posted: Tuesday Oct 9th, 2012 at 5:53 am #27867
Raam Dev
Username: Raam
Staff Member

Hi Michael,

s2Member is a WordPress plugin, so only URIs created by WordPress (or by other plugins that load within WordPress, such as BuddyPress) can be restricted using the URI Restrictions. If you create a new folder on your server, WordPress doesn’t know about that new folder and so s2Member cannot protect it unless you first load the WordPress framework.

Please see Protecting Non-WordPress Content with s2Member.

Posted: Tuesday Oct 9th, 2012 at 5:48 am #27866
Raam Dev
Username: Raam
Staff Member

Closing this thread because it’s a duplicate of this thread: http://www.s2member.com/forums/topic/redirect-problem/

Posted: Tuesday Oct 9th, 2012 at 4:12 am #27865
Raam Dev
Username: Raam
Staff Member

Ah, thanks for the update and for pointing that out Dave. I will forward this to the lead developer so he can fix that in a future release.

Posted: Tuesday Oct 9th, 2012 at 4:10 am #27864
Raam Dev
Username: Raam
Staff Member

Hi Pam,

s2Member does store EOT Times in the Automatic EOT Time field. However, that field is not updated until s2Member actually receives an IPN message from PayPal indicating that an EOT should occur.

So, for an active recurring subscription, that field should be empty. However, once the subscription ends, or if there’s a failed payment or user-cancellation (either manually on PayPal’s website or using a cancellation button that you created within s2Member), PayPal will send s2Member an IPN message that indicates an EOT should occur. At that time, s2Member will determine the EOT and set that date/time in the Automatic EOT Time field on the user’s account.

If you believe an EOT has occurred (e.g., a user cancelled their account), but the Automatic EOT Time field is still empty, then I recommend double-checking all of your PayPal settings, especially the IPN and PDT/Auto-Return integration (Dashboard -› s2Member® -› PayPal® Options -› PayPal® IPN Integration and Dashboard -› s2Member® -› PayPal® Options -› PayPal® PDT Integration).

Also, if you haven’t already, I recommend enabling logging (Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging). Once logging has been enabled, you can search the logs for the Transaction ID or Subscription ID to look for messages PayPal sent to s2Member about that specific subscription. If a user cancels their subscription, the logs should show a cancellation IPN message from PayPal and s2Member indicating that it has set the EOT Time.

Posted: Tuesday Oct 9th, 2012 at 4:03 am #27863
Raam Dev
Username: Raam
Staff Member

Your onclick=”” code is correct. The problem is that you have special quotes instead of normal single and double-quotes and those are causing issues with the code being parsed. See the screenshot below. The first one is correct, the second one is what you’re using:

You need to make sure when you’re writing the code that you’re using a plaintext editor and that you’re not accidentally creating special quotes (the easiest way to avoid special quotes is to always type your quotes manually with the keyboard).

If you copy and paste the following into the Other Attributes field, it should work as expected:

onclick="window.open('/terms','popup','width=500,height=500,scrollbars=yes,resizable=yes,toolbar=yes,directories=no,location=yes,menubar=no,status=no,left=300px,top=300px');"
Posted: Tuesday Oct 9th, 2012 at 3:54 am #27861
Raam Dev
Username: Raam
Staff Member

Question 1: Is there a way for me to customize Paypal Pro forms?

If you want to style the forms yourself, you can prevent s2Member from loading it’s own CSS for the Pro-Forms and then create your own (see Pre Sale FAQs » How can I prevent s2Member® Pro from loading it’s default CSS?) You can also go as far as modifying the Pro-Form templates (see Pre Sale FAQs » Is it possible to modify s2Member® Pro Form templates?).

Question 2: How would you go about presenting the two options on my sales page

Instead, I thought of creating two clickable images/buttons – one for each option. Each button would link to a separate page. Does that make any sense or are there any good reasons why I should stick to presenting both options one one and the same page?

The separate page method is actually the recommended method, as it’s not currently possible to place two Pro-Forms on the same page (it will cause conflicts). We recommend creating two pages for the two checkouts, and then simply pointing people to the correct one. To see an example of this in action, see the s2Member Prices page.

Posted: Tuesday Oct 9th, 2012 at 3:49 am #27860
Raam Dev
Username: Raam
Staff Member

Glad I could help! :)

Posted: Tuesday Oct 9th, 2012 at 3:48 am #27859
Raam Dev
Username: Raam
Staff Member

THE ISSUE I AM HAVING is, that I need to be able to make sure that in my database (Browse Members area of the Dashboard), I can see what URL they came from. In normal forms, this would be a siteID via a hidden field

This would best be handled by a WordPress Custom User Field somewhere on the account. This is really outside the scope of the s2Member plugin and I personally wouldn’t recommend using an s2Member Custom Registration Field for this, since it’s really an administrative field holding administrative data that only admins should see. I definitely would not recommend using Custom Capabilities for this.

The PHP code for detecting the URL they came from is relatively straight forward ($_SERVER[‘HTTP_REFERER’]), but plugging that into the WordPress login process involves familiarity with your custom code and with how WordPress stores data in Custom User Fields. The WordPress Codex and WordPress Support Forums may be helpful, but I can also recommend wordpress.stackexchange.com.

please tell me what code I should modify from the one I am using below. I tried to edit the location redirect, but it seems I was doing it wrong.

To accomplish that you simply need to change this line:

header( "Location: ". S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL) ;

To something like this:

header( "Location: http://example.com/some-other-page/") ;
Posted: Tuesday Oct 9th, 2012 at 3:37 am #27858
Raam Dev
Username: Raam
Staff Member

Great! Let us know if you have any other questions.

Posted: Tuesday Oct 9th, 2012 at 3:37 am #27857
Raam Dev
Username: Raam
Staff Member

s2Member sets the EOT time when it receives a message from PayPal/CCBill indicating that the users subscription is expiring (or their payment failed, or they manually canceled). When s2Member receives that message, it sets the Automatic EOT Time on their account. If you edit these users accounts, is there anything in the Automatic EOT Field? If not, that would indicate s2Member never received those messages from PayPal/CCBill and I would recommend double-checking your configuration (especially the IPN configuration).

Finally, if you haven’t already, I recommend enabling logging (Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging and Dashboard -› s2Member® -› ccBill® Options -› Account Details -› Logging). After someone’s subscription expires and you expect s2Member to know about it, search the logs for that specific Transaction ID or Subscription ID and search for any messages s2Member has received.

Posted: Tuesday Oct 9th, 2012 at 3:33 am #27856
Raam Dev
Username: Raam
Staff Member

I stand corrected. :) Thanks for the update and glad to hear you got it working.

Posted: Tuesday Oct 9th, 2012 at 3:32 am #27855
Raam Dev
Username: Raam
Staff Member

I tested your code and the problem is that the username is not available where you’re calling it (when you echo the $url you’re just seeing a cached version of the username… try clearing your browser cache and testing it again, you’ll see that it’s actually blank just like the redirect).

I’m not entirely clear what you’re trying to achieve here. Are you trying to create a custom Login Welcome Page URL for each user and redirect them to that URL when they login?

Posted: Tuesday Oct 9th, 2012 at 3:30 am #27854
Raam Dev
Username: Raam
Staff Member

It won’t mess anything up as long as you update your content restrictions to reflect the new way you’re using levels. Changing a users level only affects the content they can see, so you just need to make sure the restrictions are correct.

I recommend testing this with one account first and then switching all your live users.

Posted: Tuesday Oct 9th, 2012 at 3:26 am #27853
Raam Dev
Username: Raam
Staff Member

Hi Matt,

s2Member will only allow the user to register when it receives a confirmation IPN message from PayPal indicating that payment has completed. If PayPal doesn’t respond immediately with that message, then s2Member tells the user to wait for an email and s2Member sends the email once it receives confirmation from PayPal.

There are various things that could cause PayPal to not send a confirmation message immediately, including things like the payer using an unconfirmed account that takes PayPal a bit longer to process. Unfortunately, there really isn’t anything s2Member can do to speed this process up.

If you’re curious, you can enable logging (Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging) and then check the log files to see what’s happening.

Posted: Tuesday Oct 9th, 2012 at 3:23 am #27852
Raam Dev
Username: Raam
Staff Member

The PayPal Buttons for Subscriber Modification (Dashboard -› s2Member® -› PayPal® Buttons -› Subscr. Modification Buttons) does allow you to add/remove Custom Capabilities.

If you click on the little question mark next to the Custom Capabilities field when generating a Subscriber Modification button, you’ll see the following:

Optional. This is VERY advanced.
See: s2Member -> API Scripting -> Custom Capabilities.

*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.

So instead of just (Adding) Custom Capabilities:
music,videos,archives,gifts

You could (Remove All) that may already exist, and then (Add) new ones:
-all,calendar,forums,tools

Or to just (Remove All) and (Add) nothing:
-all

Posted: Tuesday Oct 9th, 2012 at 3:21 am #27851
Raam Dev
Username: Raam
Staff Member

Hi Christo,

That sounds like a bigger issue with your site unrelated to s2Member. If you deactivate s2Member do you still have this problem? The message that you mentioned is not an s2Member message. I recommend contacting your web host to see if they can help you solve this problem.

Posted: Tuesday Oct 9th, 2012 at 3:19 am #27850
Raam Dev
Username: Raam
Staff Member

To check for Level 2, you should use current_user_can(“access_s2member_level2”). Please see Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals.

If you want to drip content to non-paying members, you’ll need to use the S2MEMBER_CURRENT_USER_REGISTRATION_TIME constant instead of the paid registration time constant, since non-paying members won’t have a paid registration time. Please see Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants.

Posted: Monday Oct 8th, 2012 at 7:52 am #27785
Raam Dev
Username: Raam
Staff Member

Hi Carlo,

Using the API requires knowledge of PHP programming.

s2Member is a WordPress plugin, so a good understanding of the internals of WordPress would be a great place to start learning. The WordPress Codex has lots of info and there are good sites like StackOverflow and wordpress.stackexchange.com where you can ask programming and WordPress-specific questions.

If you have any specific questions about the s2Member plugin, please let us know and we’ll do our best to point you in the right direction.

Posted: Monday Oct 8th, 2012 at 7:48 am #27784
Raam Dev
Username: Raam
Staff Member

Where do i find the Paid Subscr. ID to add to the members I upgrade by hand?

You can find it on your PayPal account by viewing one of the payments from that member, or on your PayPal Recurring Payments Dashboard. The Paid Subscr. ID is the PayPal Transaction ID or Subscription ID.

Also why are some getting assigned automatically but others are not?

That’s hard to say without more information. Do you have logging enabled (Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging)? The log files might shed some light as to what’s going on. You can search the log files by the Paid Subscr. ID to look for events related to a transaction that you think didn’t go through properly.

Posted: Monday Oct 8th, 2012 at 7:42 am #27783
Raam Dev
Username: Raam
Staff Member

Great! Thank you for sharing the solution, Christopher. :)

Awarded Christopher the Helpful badge.
Posted: Monday Oct 8th, 2012 at 7:40 am #27782
Raam Dev
Username: Raam
Staff Member

Instead of dropping the widget into your sidebar using Dashboard -> Appearance -> Widgets, you’ll need to use the PHP version of the widget and only call it when the visitor is not logged in by using the WordPress is_user_logged_in() function in a conditional:

<?php
if ( is_user_logged_in() ) {
    // show nothing
} else {
    echo s2member_pro_login_widget();
}
?>

This code would need to be placed in your theme’s sidebar.php file, or wherever you want it to appear.

Please see this thread for more details about using the PHP version of the Pro Login Widget.

Posted: Monday Oct 8th, 2012 at 7:32 am #27781
Raam Dev
Username: Raam
Staff Member

Hi Candace,

This is certainly possible, but it would require some custom programming that does the logic work for your business model. The s2Member shortcodes that generate the buttons/forms all have attributes that define things like the rate, term, amount, etc. These attributes can be dynamically configured with a bit of PHP code so that when the button loads, it’s automatically configured correctly based on the current date.

To offset the recurring charge so that it starts on a particular date, you’d need to use the Initial/Trial period (see the ta, tt, and tp attributes in Dashboard -› s2Member® -› PayPal® Pro Forms -› Shortcode Attributes (Explained)). You can also dynamically configure the amount charged depending on the current date. Also see dynamic shortcode attributes.

This will require custom programming work and if you’re not comfortable with PHP, we recommend posting your job on jobs.wordpress.net.

Posted: Monday Oct 8th, 2012 at 7:16 am #27780
Raam Dev
Username: Raam
Staff Member

Thank you for the feature request, Charles.

The IP Restrictions feature is designed to work with not just logins, but also with Specific Post/Page Buy Now links, which do not require logins.

s2Member uses the WordPress authentication system and the ability to login multiple times with the same credentials is actually a feature of WordPress itself. Getting around that feature is not trivial. (A bit of technical background here.) However, I can absolutely see why you might want to prevent multiple logins, especially on a membership site.

The lead developer is working hard on the next major version of s2Member and I will pass along your feature request to him.

Posted: Monday Oct 8th, 2012 at 7:02 am #27779
Raam Dev
Username: Raam
Staff Member

If you want to sync an existing user with a new List Server, you need to edit the user in question (Dashboard -> Users -> Edit), check the box that says Re-process List Servers, and then press Update User at the bottom.

Unfortunately, if you’re trying to resync 500 users, you will need to do this to each user individually. The s2Member List Servers integration is designed to work automatically during the registration of new users, not for bulk-adding existing users to a List Server.

If you have a lot of existing users you might want to simply export them (Dashboard -› s2Member® -› Import/Export -› User/Member Exportation) to get a list of all their email addresses, and then use that to build an import file for MailChimp and import all those users directly into MailChimp (see How do I create and import my list?).

Viewing 25 replies - 576 through 600 (of 2,567 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.