Page 1 of 1

(solved) [s2Member-Pro-PayPal-Form] Shortcode Ignores Custom

PostPosted: March 6th, 2011, 2:15 am
by johnleblanc
I'm trying to set values for cv0 and cv1 without success:
[s2Member-Pro-PayPal-Form register="1" desc="Foo" custom="www.example.com|my_value" /]

Using s2member Pro 3.5.2, PayPal Pro Module 1.5.2, WP 3.1

Re: [s2Member-Pro-PayPal-Form] Shortcode Ignores Custom Valu

PostPosted: March 11th, 2011, 10:25 am
by johnleblanc
Has anyone else experienced this?

Re: [s2Member-Pro-PayPal-Form] Shortcode Ignores Custom Valu

PostPosted: March 12th, 2011, 1:40 am
by Jason Caldwell
Investigating now.

Re: [s2Member-Pro-PayPal-Form] Shortcode Ignores Custom Valu

PostPosted: March 14th, 2011, 8:33 pm
by Jason Caldwell
Investigation completed. This functionality for Free Registration Forms was not possible in s2Member v3.5.2. Starting with s2Member v3.5.3+, it is now possible to add the custom="' Attribute to a Free Registration Form. Thanks for reporting this important issue.

Changelog excerpt v3.5.3.
* **(s2Member Pro). Feature improvement.** s2Member Pro Forms for Free Registration access are now more versatile. It is now possible to configure your Pro Form Shortcode so that Free Registrants come into your site with something other than the default Level #0 Access Level. For example, if you need to, you can change the Form Attribute `level="0"`, to `level="1"`, attach Custom Capabilities with the `ccaps=""` Attribute, and even limit this access to a certain timeframe with `tp="30" tt="D"` ( i.e. 30 Days ). So this Form is very flexible now. It can be used to allow free access to just about any aspect of your service. For more information on this topic, please check your Dashboard under: `s2Member -> PayPal® Pro Forms -> Free Registration Forms`. Also works with Pro Forms for Authorize.Net®.

Re: [s2Member-Pro-PayPal-Form] Shortcode Ignores Custom Valu

PostPosted: April 1st, 2011, 4:03 am
by johnleblanc
Jason! Thanks very much for the fix. I'm sorry that I only caught wind of this today. I must have failed to check the "Notify me when a reply is posted" checkbox when posting and then failed again by not adding the thread to my RSS reader. You da man!

In the dashboard under "s2Member API / Notifications" -> "Signup Notifications" you advocate dynamic custom values using this example:
Code: Select all
custom="www.example.com|<?php echo $_SERVER["REMOTE_ADDR"]; ?>"


Rather than include php code which could easily and inadvertently be sanitized by the WP editor (or enabling php-exec which seems dangerous), what about something like this?
Code: Select all
custom="www.example.com|%%affiliate-cookie%%"

...in combination with a filter function like this:
Code: Select all

function s2m
-dynamic-form-custom-val($content) {
    return str_replace('%%affiliate-cookie%%', $_COOKIE['affiliate_id'], $content)
}
add_filter('what-hook-is-this-jason', 's2m-dynamic-form-custom-val');
 

Does this seem like a reasonable approach? It feels like it might already even be possible assuming there is suitable 'what-hook-is-this-jason' equivalent, right?

Re: (solved) [s2Member-Pro-PayPal-Form] Shortcode Ignores Cu

PostPosted: April 2nd, 2011, 2:05 pm
by Jason Caldwell
Thanks for the follow-up.

Yes, I'm adding this to our TODO list.
I think some Replacement Codes would be a nice feature here.

Re: (solved) [s2Member-Pro-PayPal-Form] Shortcode Ignores Cu

PostPosted: September 1st, 2011, 8:20 am
by bsowards
Where does this stand?