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.

Cristián Lávaque


My Latest Replies (From Various Topics)

Viewing 25 replies - 4,876 through 4,900 (of 7,376 total)
Author Replies
Author Replies
Posted: Friday Jul 20th, 2012 at 7:04 am #19818

4.- a) I would like to know, If I install it in a new MySQL Dbase and create the field I want… Where should I go to copy that line or field in the Dbase and back to my original one (my working website) input the line or field.

4.-b) What’s my options?

Hmm… The user values for the custom profile fields are stored in usermeta, I think the custom profile field definitions are stored in the options table.

Posted: Friday Jul 20th, 2012 at 6:29 am #19814

The updated values are not available in a WP hook to use in your hack.

Also, the HTML form you get in after parsing the shortcode and applying the coupon, doesn’t have the changed amounts available because that info seems to be encrypted in the [hilite mono]s2member_pro_paypal_checkout[attr][/hilite] field.

Anyway, I spent some time studying the code and how you could do it, and here’s what I ended up with to get the amount updated by the coupon:

Move/copy the authnet-utilities.inc.php file to the /wp-content/mu-plugins/ directory. Open it in your text editor and search for the line:

[hilite pre_code]
return ( /* Returning ``$response``? */$return === "response") ? $response : $attr;
[/hilite]

and right before it add:

[hilite pre_code]
do_action('s2hacks_after_authnet_apply_coupon', $attr);
[/hilite]

Then in /wp-content/mu-plugins/s2hacks.php add this:

[hilite pre_code]
add_action('s2hacks_after_authnet_apply_coupon', 's2hacks_after_authnet_apply_coupon');
function s2hacks_after_authnet_apply_coupon($attr) {
print_r($attr);
}
[/hilite]

Save all files and submit a coupon code in your Auth.Net pro-form. You’ll see the [hilite mono]$attr[/hilite] array above the pro-form. You can take it from there to complete your hack.

I hope that helps.

Posted: Friday Jul 20th, 2012 at 3:02 am #19801

Well, I thought about it some more and I’d probably not use that if I had to do it in my site…

What I’d most probably do is this: check [hilite mono]$_POST[s2member_pro_paypal_checkout][coupon][/hilite] and if there, apply the coupon to my button with my own code, instead of using the s2Member coupon definitions and processing. This would be a bit impractical if I had a ton of coupons, but I’d most likely just have a few and this wouldn’t be a problem.

You can do it in several ways, but here’s an example:

[hilite pre_code]

[/hilite]

I hope that helps.

Posted: Thursday Jul 19th, 2012 at 7:39 am #19752

First I would like to say S2Member is a great plugin.

Thanks. :)

1.- (I am in sanbox mode) The confirmation page (success=”my-page”) doesn’t work after registering and paying for a subscription. The proform didn’t send email either to confirm purchase.

Emails don’t get send in sandbox mode. I don’t recommend the sandbox if you can avoid it, though, because it has its own problems that won’t be there when you do live transactions, so it’s a waste of time to debug them. Much better to do 1 cent live transactions for your tests.

And I suggest that you have logging enabled in s2Member, so that if you have any problems, more information will be recorded about what’s happening. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging[/hilite]

My blog is about posting, each post cost one credit – IT’s membership and after you must credit to post
2.- I would like to add a input quantity field for current Level 1-4 members, to be able add numbers of credits they want.

This is not something s2Member does, selling a quantity of a single item, it’s not a shopping cart.

You can use a button created over at PayPal, probably with the quantity selection even, to sell these credits. Since you’re not managing access for that, s2Member doesn’t seem for that particular thing.

3.- Can I know where can I put a function to execute upon paying success. Because I have a table credit for that want to upgrade it by myself.

You can use the payment notification to execute your script. [hilite path]Dashboard -› s2Member® -› API / Notifications -› Payment Notifications[/hilite]

Video » s2Member (API Tracking/Notifications)

4.- Whe can I find the billing address, If I want to store it or use it for the future.

This is handled by PayPal when it takes care of the payment, s2Member doesn’t store that information. You could create custom profile fields with s2Member to have the user enter it as part of his profile, though. [hilite path]Dashboard -› s2Member® -› General Options -› Registration/Profile Fields[/hilite]


I hope that helps. :)

Posted: Thursday Jul 19th, 2012 at 7:12 am #19751

When you say “It is redirected to the login page of s2member”, do you mean the Login Welcome page?

If in WordPress you use the redirect_to variable in the login page, then it’ll override s2Member’s login redirection. I don’t know if BuddyPress removes [hilite mono]redirect_to[/hilite] or leaves it working as it does by default, so you could try that.

Just add ?redirect_to=http://example.com/abc or (or /abc if its the same site) at the end of the URL of the login page. E.g. http://example.com/wp-login.php?redirect_to=/abc

In the case of a widget, maybe it has a setting for this, or you could edit its template to add [hilite code][/hilite] (if I’m not mistaken) to the HTML form.

I hope that helps.

Posted: Thursday Jul 19th, 2012 at 5:31 am #19750

As for the link you provided, I’d looked at it before, and it makes no sense to me. I don’t even know where to start. Unless there is a tutorial, I cannot do this.

Right, that’s a customization and you need to know how to code a bit, or have/get someone that does.

My client wants to be able to search users by the custom fields we created on the Registration Form. The built-in WordPress search box searches ALL fields and that returns too many users we aren’t looking for.

Right, the Users list in the admin area doesn’t search by those fields, but there’s a plugin for users lists that works with those fields. It mentions filtering, but not searching specifically, so you may want to contact the developer to confirm that.

http://wordpress.org/extend/plugins/amr-users/
http://wpusersplugin.com/3086/user-lists-and-filtering-with-s2member-fields/

The other ability we want is to be able to export ALL users in one shot (not be limited to 250 at a time).

The limit is there to avoid script timeouts, but you can try removing it in your installation editing the file that does the exportation work. s2member-pro/includes/classes/exports-in.inc.php

Look for this line:

[hilite pre_code]
if (is_array ($_users = $wpdb->get_results ("SELECT `" . $wpdb->users . "`.`ID` FROM `" . $wpdb->users . "`, `" . $wpdb->usermeta . "` WHERE `" . $wpdb->users . "`.`ID` = `" . $wpdb->usermeta . "`.`user_id` AND `" . $wpdb->usermeta . "`.`meta_key` = '" . esc_sql ($wpdb->prefix . "capabilities") . "' LIMIT " . $sql_s . ", 250")))
[/hilite]

and remove the [hilite code] LIMIT " . $sql_s . ", 250[/hilite] part near the end. I haven’t tested this, I don’t have an installation with that many users, but I think it’ll work.

I hope that helps. :)

Posted: Thursday Jul 19th, 2012 at 5:05 am #19749

Great! :)

Posted: Thursday Jul 19th, 2012 at 4:58 am #19747

Quick question, I assume I would also see a new user that hasn’t confirmed there account in the user screen in wp-admin? Or are unconfirmed users hidden?

I think they all show up in the Users list on the admin side, but BuddyPress only shows confirmed ones in the Members list on the public side.

Hi Cristian, yes I got your registration notification, all fine! The mind boggles, I came to the same IP restriction conclusion, but trying it on my mobile should have bypassed that!

Right… Maybe you’re doing something different from the rest? Can’t say what, though…

Why don’t you try using the s2Member free registration pro-form and test if you can register with that one? [hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Free Registration Forms[/hilite]

If you get a warning about PayPal not being configured (if that’s the case), then just enter fake credentials and the warning will go away, you only need real credentials when you’re using the payment pro-forms or buttons. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Account Details[/hilite]

Posted: Thursday Jul 19th, 2012 at 4:34 am #19743

Thanks, Mick.

I went to your site, registered, got the activation email, activated the account and then logged in successfully without a problem.

I really don’t know why you are having that trouble and the rest isn’t… :/

One would think it’s an IP thing if you already tried different computers and browsers. Do you have a plugin installed that’d do something like that? The s2Member IP restriction would not behave like what you’ve described.

Posted: Thursday Jul 19th, 2012 at 3:50 am #19740

Oh, I’m very sorry, completely forgot that the contact form is for those with a Pro license. You can email me, I’d like to try the registration and see what happens.

Posted: Thursday Jul 19th, 2012 at 3:34 am #19736

Well, I don’t know. You can send me your site’s info to check it out, if you want. s2Member® » Private Contact Form

I’d still do the test starting with a clean WP installation and adding things one by one, testing after each step to spot when the problem starts.

Are you logged out completely when you try the registration? Although it can work even if you’re logged in, from my experience.

Are you using the BuddyPress registration form or an s2Member registration pro-form? [hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Free Registration Forms[/hilite]

Posted: Wednesday Jul 18th, 2012 at 10:05 pm #19695

Oh, I just meant it as a test, to see if that’s where the problem is, not so you don’t use BuddyPress in your site anymore.

But if even a quick test would be a problem, you could create a new WP multisite test installation without BuddyPress to see how it the registration works without problems, then add s2Member, then BuddyPress and the rest of the plugins you’re using.

Posted: Wednesday Jul 18th, 2012 at 7:44 am #19624

I’m so sorry to hear that… They really should be ashamed of the service they give, if it can be called that. :(

By the way, you can do 1 cent transactions to test.

Posted: Wednesday Jul 18th, 2012 at 7:35 am #19623

Hi Jennifer.

The other thing I can’t figure out is why no registration form appears when I use the PayPal buttons (is that the norm to have just a button and no registration fields?). But when I use the PayPal pro-form, the registration form asks for the users credit card info directly on the form. My client cannot accept credit cards directly and although the cards are grayed out (by using accept=”paypal” in the shortcode), this still looks unprofessional. My client doesn’t want credit card fields on the registration form.

The button is just that, a payment button, it’s not a registration form. The pro-form combines registration with payment, though.

Stuart is correct about the [hilite mono]accept[/hilite] attribute in the pro-form, change the value to just [hilite mono]"paypal"[/hilite] and then the pro-form will only have the option to pay via Express Checkout, which is free too, similar to PayPal Standard.

Then you won’t need the Billing Method section in your pro-form, so you may want to hide it with this style in your theme’s style.css file:

[hilite pre_code]
div.s2member-pro-paypal-form-billing-method-section {display: none;}
[/hilite]

They have six membership types (ranging in price from $20 a year to $500 a year) and I need them listed on the registration form in either a drop-down or radio buttons. These membership types are all under Level 1 membership.

The pro-form or button still don’t have a way to select different payment plans. One thing you can do is create an extra HTML form right before the pro-form, with your payment plan options in a way that when the user picks one, that form gets submitted automatically to the same page, and you’d have some PHP code to check what the user’s choice was and update the shortcode for the pro-form. http://www.primothemes.com/forums/viewtopic.php?f=36&t=1604

I hope that helps. :)

Posted: Wednesday Jul 18th, 2012 at 7:16 am #19621

Hi Nigel.

My suggestion would be to use the success attribute to take the user to another page after the registration was successful. [hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Custom Return URLs Upon Success[/hilite]

I hope that helps. :)

Posted: Wednesday Jul 18th, 2012 at 7:00 am #19614

Hi Carolyn.

You’re missing [hilite code][/hilite] at the end of the link. Try this, please:

[hilite pre_code]
I have read and agree to be bound by the Terms and Conditions and Privacy Policy
[/hilite]

I hope it helps. :)

Posted: Wednesday Jul 18th, 2012 at 6:44 am #19609

Hi Mick.

The account activation thing is added by BuddyPress. Just as a test, if you deactivate BuddyPress and then register a new account, do you see the user in your Users list? Do you get the New User email sent by WordPress?

Posted: Wednesday Jul 18th, 2012 at 6:38 am #19608

Hi Sean.

Here ananumber, restriction_level, and state are placed in thier own column insted of listed as the title of the column.

Right, that’s how s2Member exports the custom profile fields. It doesn’t export every custom profile field configured in s2Member, only the fields the user has a value for, so the number of fields for each row will vary and the way Jason did it was using pairs of field name and field value for those. If every user has all the fields, then they’ll be consistent in the CSV, but if the number of filled out fields varies from member to member, so will the custom profile field columns for their rows.

I hope that helps understand it.

Sorry for any inconvenience. We’ll be changing this in the new s2Member to a more standard format, with a column for each field, regardless or it being empty or not.

Posted: Wednesday Jul 18th, 2012 at 6:31 am #19607

Hi Stuart.

Could you test if you have the same problem using the default TwentyEleven theme, please?

Thanks. :)

Posted: Wednesday Jul 18th, 2012 at 6:27 am #19606

The payment notification has they payment email address as well as the user’s email address available.

[hilite mono]%%payer_email%%[/hilite] = The Email Address of the Customer who purchased the Membership Subscription or Capabilities.
[hilite mono]%%user_email%%[/hilite] = The Email Address associated with their User account. This might be different than what is on file with your Payment Gateway.

I’m not sure if the user’s email address is available when it’s a new user, but you can try it with a test signup.

If it’s not available, then you could use both: the registration and signup/payment notifications, and relate them with the IP address.

I hope that helps. :)

Posted: Wednesday Jul 18th, 2012 at 6:13 am #19604

Hi Stuart.

That’d happen if the PayPal option is chosen for payment, then the person will be taken to PayPal to checkout through Express Checkout. In your shortcode you should have enabled the other payment options, then in the pro-form you’ll have Visa, Master, etc. to pick for payment.

Does that help? If not, could you please post the shortcode you’re using for the pro-form?

Posted: Wednesday Jul 18th, 2012 at 6:07 am #19603

Kevin, I see the orange button being styled by this file https://digitalblogworld.com/wp-content/themes/flare/css/skins/default.css?ver=3.4.1

It’s probable that your theme is adding that button. Could you do a quick test changing the theme to the default TwentyEleven and refresh that page to see if the orange button is still there?

Posted: Wednesday Jul 18th, 2012 at 6:01 am #19602

Hi Jeffry.

Looked into this and found [hilite mono]authnet_apply_coupon[/hilite]. s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php

* Checks to see if a Coupon Code was supplied, and if so; what does it provide?
*
* @package s2Member\AuthNet
* @since 1.5
*
* @param array $attr An array of Pro Form Attributes.
* @param str $coupon_code Optional. A possible Coupon Code supplied by the Customer.
* @param str $return Optional. Return type. One of `response|attr`. Defaults to `attr`.
* @param array $process Optional. An array of additional processing routines to run here.
* 	One or more of these values: `affiliates-1px-response|affiliates-silent-post|notifications`.
* @return array|str Original array, with prices and description modified when/if a Coupon Code is accepted.
* 	Or, if ``$return === "response"``, return a string response, indicating status.

You can see the function used in [hilite mono]authnet_checkout[/hilite]. s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php

[hilite pre_code]
$cp_attr = c_ws_plugin__s2member_pro_authnet_utilities::authnet_apply_coupon($post_vars["attr"], $post_vars["coupon"], "attr", array("affiliates-silent-post"));
[/hilite]

You can do a test and [hilite code]print_r($cp_attr)[/hilite] after that to see what you get. $post_vars are the [hilite mono]$_POST[/hilite] vars after some sanitization/formatting done in the previous lines. I recommend that you review the full code for the function to see what’s happening there. http://www.s2member.com/codex/stable/source/s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php/#src_doc_line_59

I hope that helps. :)

Posted: Wednesday Jul 18th, 2012 at 5:33 am #19601

Thanks for confirming it.

Well, s2Member can’t tell apart what parts of a post are in what language from the tag you’re using. The only way to protect just a part of the post would be using conditionals, either shortcode or PHP.

[hilite path]Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals[/hilite]
[hilite path]Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals[/hilite]

I hope that helps. :)

Posted: Wednesday Jul 18th, 2012 at 5:29 am #19600

How did it go with PayPal support? Did you manage to get recurring payments working with them?

Viewing 25 replies - 4,876 through 4,900 (of 7,376 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.