Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not see old membership level #6

Closed
aakankshk opened this issue Feb 22, 2017 · 34 comments
Closed

can not see old membership level #6

aakankshk opened this issue Feb 22, 2017 · 34 comments

Comments

@aakankshk
Copy link

Hi

i have already two membership and i want to multiple membership that user can buy. i just add the add once and see membership level page strange i can not see my old level and even can not add new membership level in group

is something wrong i did?

Thanks

image

@AAnkudovich
Copy link

AAnkudovich commented Feb 22, 2017

Same issue here
your old memberships are still available just go to yourdomaim.com/wp-admin/admin.php?page=pmpro-membershiplevels&edit=LEVELID

LevelID needs to be changed to your membership id (they auto increment so if you dont know your ones try 1 then 2 and so on)
That is to edit memberships .

Adding to groups i still havent worked out.

@aakankshk
Copy link
Author

Thanks for such a quick replay and i can see my old membership

But how can i add that membership in as group as you can see in screen short and even i can not add new membership in demo group

any idea?

@AAnkudovich
Copy link

Groups are used to determine what memberships can go in parallel and which cant. im afraid i ended up skipping it and restricting users through front end from getting memberships of same group allocation.

@aakankshk
Copy link
Author

ok
i have scenario like i want give access of two different membership to my users under one access both membership level have different price

how can i do i do not want option like separate domains

@AAnkudovich
Copy link

that should work perfectly fine

you can create a custom pricing table by creating a template for /membership-account/membership-levels/

on the bottom point it to checkout pages

<a href="/membership-account/membership-checkout/?level=15" class="btn btn-primary" style="width: 110px;"> Buy It </a>

You can also disable the button by checking for the membership like so

   <a href="/membership-account/membership-checkout/?level=15" class="btn btn-primary" style="width: 110px;" <?php if (is_user_logged_in()) { if(pmpro_hasMembershipLevel(array(15))){ echo 'disabled';  }} ?>> Buy It </a>

@aakankshk
Copy link
Author

yes but how it work suppose

page A is only access by Membership A
page B is only access by Membership B

Now if any user purchase the Membership A and he want same access of Page B to if user purchase Membership B than they remove form accessing page A that is what main issue

Thanks

@AAnkudovich
Copy link

The function i use is deep inside of plugin code and works wonders

<?php if(pmpro_hasMembershipLevel(array(15))): ?> 
          <div class="page-content">
            <?php the_content(); ?>
            
          </div>
<?php else: ?> 
           
          <h3>Buy our membership</h3>
          
          
          <?php endif; ?>

pmpro_hasMembershipLevel(array(15)) will check if user has the membership id 15 (change to your membership number) you can add comma and additional memberships too (ie. pmpro_hasMembershipLevel(array(15,16,1,7)))

@AAnkudovich
Copy link

If membership matches that in if statement the user sees post or page content else it shows Buy our membership

@aakankshk
Copy link
Author

thanks

my only concern is if user have one membership already and purchase the another membership with exist login access can they access both restricted pages

Hope you understand

@AAnkudovich
Copy link

Yes. account will return true for both if user has two memberships

If user has membership 1, 2

pmpro_hasMembershipLevel(array(1)) = true
pmpro_hasMembershipLevel(array(2)) = true
pmpro_hasMembershipLevel(array(1,2)) = true
pmpro_hasMembershipLevel(array(3)) = false

@aakankshk
Copy link
Author

thanks

let me test i am afraid because in back end it show as membership which is last buy that is why i am confuse

@AAnkudovich
Copy link

U mean in Database it shows singe memberships ?

Check what you see on this /wp-admin/admin.php?page=pmpro-memberslist when looking at an account with 2 memberships it should show something like this (comma sepparated membership names)
screen shot 2017-02-22 at 10 57 50

@aakankshk
Copy link
Author

Thanks

but i can see last buy membership i can access the page with associate with membership b (Note: i have not used multiple membership add on)

image

@AAnkudovich
Copy link

yes now if you activate multiple memberships and you buy membership A it should show both there

Note : this addon doesnt work with paypal

@AAnkudovich
Copy link

alternatively go into your database and run equivalent of this (i use mysql)

INSERT INTO wp_pmpro_memberships_users (user_id,membership_id,initial_payment,cycle_period,status,startdate,enddate) VALUES (30,1,PRICEOFMEMBERSHIP,"","active",'2016-12-01','2017-12-20');

@aakankshk
Copy link
Author

Thanks

now i active the addons and check with stripe my membership list page blank and memberlist doesn't update

image

image

@aakankshk
Copy link
Author

front end

image

@AAnkudovich
Copy link

It wouldnt be on the level page but on members list

What payment gateway are you using as this looks a bit different to anything i have seen

@aakankshk
Copy link
Author

please check above comment i have upload list page and i am using stripe

@AAnkudovich
Copy link

can you show me the following page /wp-admin/admin.php?l&page=pmpro-memberslist&s=aakankshk

@aakankshk
Copy link
Author

Thanks now it is showing

image

@aakankshk
Copy link
Author

but i am still unclear about this why my members are level are blank list

image

if i want add two membership as group how can i add

@AAnkudovich
Copy link

The addon seems to have flaws and doesnt seem to be supported by original authors so we are unable to obtain a reason for it

@AAnkudovich
Copy link

I almost sertain in the current state of the plugin you cant

@aakankshk
Copy link
Author

ok and even membership level page having a issue is it default behavior of this plugin

image

@aakankshk
Copy link
Author

before i can see all member level added now it is blank

@AAnkudovich
Copy link

i created a custom UI so i would not see it at all

@aakankshk
Copy link
Author

do you have any demo i can see please?

@AAnkudovich
Copy link

/membership-account/

screen shot 2017-02-22 at 11 58 03

And i overwrote /membership-account/membership-levels/ to act as a pricing table

screen shot 2017-02-22 at 11 57 15

@aakankshk
Copy link
Author

ok i have already my site having 200+member and 5 membership level and if i use this addon does not it affect to my site or loose any data?

@AAnkudovich
Copy link

i am on similar numbers and lost nothing . i would advise testing it locally rather than going live with all of it right away. issue i opened a week or so ago is my only minus to this as memberships stopped to expire but the solution was given there. also backticks need to be fixed same as the open pull request on it

@aakankshk
Copy link
Author

ok thanks for all help i looking forward to implement this as soon as possible if having issue i will add new issue

once again thank you so much for all help and support

@aakankshk
Copy link
Author

thanks

@AAnkudovich
Copy link

Glad to be of assistance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants