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™

Different levels for coupon users and non coupon users

s2Member Plugin. A Membership plugin for WordPress®.

Different levels for coupon users and non coupon users

Postby rainbowsurfer » June 21st, 2011, 1:28 pm

I'd like people who buy via a coupon to become members at one level and people who buy without a coupon to go in at a lower level. Is that possible?

Thanks
User avatar
rainbowsurfer
Registered User
Registered User
 
Posts: 42
Joined: May 25, 2011

Re: Different levels for coupon users and non coupon users

Postby Cristián Lávaque » June 22nd, 2011, 12:19 am

No, not in the current version.
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: Different levels for coupon users and non coupon users

Postby Jason Caldwell » June 22nd, 2011, 2:09 am

Yea, sorry. This is not possible yet.

Thanks for bringing this to my attention Cristián. I'll see what we can do about this in a future release.
~ 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: Different levels for coupon users and non coupon users

Postby rainbowsurfer » June 22nd, 2011, 3:36 am

As a work round is there a way to make the coupon code a required field. That way if the person doesn't have the code they would have to fill out a different form which gives a different member level.
User avatar
rainbowsurfer
Registered User
Registered User
 
Posts: 42
Joined: May 25, 2011

Re: Different levels for coupon users and non coupon users

Postby Cristián Lávaque » June 22nd, 2011, 3:41 am

Well, you could add a custom coupon field at the top of the form, but not the standard one. Make it a separate form before the pro-form, that will submit to another page that checks if the coupon is right or not. If not, it'll redirect the person back to the page he came from. If it is the right coupon, though, it'll stay in that new page and display the form for the other membership. Would something like that work?
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: Different levels for coupon users and non coupon users

Postby Jason Caldwell » June 22nd, 2011, 3:43 am

Are you running Pro Forms with PayPal or Authorize.Net?
Are you selling Specific Post/Page Access, or Membership Access?
~ 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: Different levels for coupon users and non coupon users

Postby rainbowsurfer » June 22nd, 2011, 3:58 am

Hi Cristian not sure how to do what you suggest but that might work if you have any suggestions on how to do it I'll give it a try.

Hi Jason I'm running Pro Forms with PayPal for membership access.
User avatar
rainbowsurfer
Registered User
Registered User
 
Posts: 42
Joined: May 25, 2011

Re: Different levels for coupon users and non coupon users

Postby Jason Caldwell » June 22nd, 2011, 4:15 am

One possible way to make the Coupon Code required, is this.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_action 
("wp_head", "my_function");
function my_function ()
    {
        echo '<script type="text/javascript">';
        echo "jQuery(document).ready(function(){ jQuery('input.s2member-pro-paypal-coupon').attr('aria-required', 'true'); });";
        echo '</script>';
    }
?>
~ 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: Different levels for coupon users and non coupon users

Postby rainbowsurfer » June 22nd, 2011, 6:28 am

That's brilliant Jason thanks for that it works. One thing, is there a way to say on the Pro Form that it is a required field with either a * beside the coupon field or to change the wording where it says please enter here.
Many thanks again
User avatar
rainbowsurfer
Registered User
Registered User
 
Posts: 42
Joined: May 25, 2011

Re: Different levels for coupon users and non coupon users

Postby Jason Caldwell » June 24th, 2011, 12:29 am

Yes. It really sounds like you might want to just go with a custom template file of our own to accomplish this and anything else you need to do. Please see the excerpt below for instructions.

Is it possible to modify the PayPal® and/or Authorize.Net® Pro Form templates?
Usually not necessary. But yes, if you really need to. Please check your /s2member-pro/includes/templates/forms/ directory. You can take the default templates, and place some ( or all of them ) into your own WordPress® theme directory. s2Member Pro will automatically find your custom templates there. By placing custom templates into your theme directory, you can be sure they won't get overwritten in a future upgrade. Either that, or you can just use the default templates like they are, and customize them with your own CSS rules inside the Stylesheet for your WordPress® theme ( i.e. style.css ). If you're using a PriMo Theme ( for instance, the s2Clean Theme ), check your Theme Options Panel, under: Custom CSS / Style Sheet.
~ 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: Different levels for coupon users and non coupon users

Postby Cristián Lávaque » June 24th, 2011, 12:37 am

^ After creating the template as explained there, you'd tell the shortcode to use it with the template attribute. WP Admin -> s2Member -> PayPal Pro-Forms -> Shortcode Attributes (Explained) -> template

template="" 100% optional. This can be a custom template file that exists inside your WordPress® theme directory. For example: template="checkout.html".


By the way, the template can also be a PHP file, not just an HTML one.
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: Different levels for coupon users and non coupon users

Postby rainbowsurfer » June 24th, 2011, 3:08 am

Thanks again guys, might just be a bit over my abilities though. I think I'll live with the fix how it is. Cheers
User avatar
rainbowsurfer
Registered User
Registered User
 
Posts: 42
Joined: May 25, 2011

Re: Different levels for coupon users and non coupon users

Postby rainbowsurfer » July 1st, 2011, 9:42 am

I thought the solution that Jason gave worked with creating the directory and file. But the problem I have now is that when I do another Pro form without the coupon code field when the person goes to check out a warning message still comes up to say a coupon code is needed.

Is there a code to place so that if the coupon code field is not in the Pro form no warning message will appear?
User avatar
rainbowsurfer
Registered User
Registered User
 
Posts: 42
Joined: May 25, 2011

Re: Different levels for coupon users and non coupon users

Postby Jason Caldwell » July 2nd, 2011, 10:27 am

You could try adding a Conditional to your file.
Something like this might be nice.
Code: Select all
<?php
add_action 
("wp_head", "my_function");
function my_function ()
    {
        if (is_page (123))
            {
                echo '<script type="text/javascript">';
                echo "jQuery(document).ready(function(){ jQuery('input.s2member-pro-paypal-coupon').attr('aria-required', 'true'); });";
                echo '</script>';
            }
    }
?>
* See: http://codex.wordpress.org/Conditional_Tags
~ 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: Different levels for coupon users and non coupon users

Postby rainbowsurfer » July 2nd, 2011, 5:42 pm

That's brilliant Jason it's all working perfectly.
Many thanks
User avatar
rainbowsurfer
Registered User
Registered User
 
Posts: 42
Joined: May 25, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron