Skip Navigation

[Resolved] Exclude payed member subscriptions from toolset search

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 6 months ago.

Assisted by: Minesh.

Author
Posts
#2705751
10.PNG

Hi,
I need little help with the site I'm working on for a client.
We're using Payed Member Subscriptions plugin and allowing access to listings free member's haven't payed to see.
All member can see those listings a week late, but payed members - everything at once.

So far, I've made my custom toolset search and hid content for a week for all members. I need to edit it somehow, to exclude payed members from "Payed Member Subscriptions", so only they can see it immediately.

I tried adding a query, but nothing changed. I'm viewing the view from active plan and it says nothing found.
I tried a conditional block, but got stuck.

#2705773

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you create one view for payed members and another view that you already have that shows listings for a week.

And then based on the current user login you can display the desired view and check with condition that if the current user is payed member then display view X and if its general member display view Y.

Does that makes sense?

#2705793

Hi,
I got even more stuck with that.
I did make two views and wrote to PMS support if they can help.

So far, I cannot make the conditional block work.

#2705855

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - based on what parameter we can identify that the user is paid member or free member?

If you can share all those required details and admin access details where you created the view and where you are displaying those views on frontend.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2705938

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

From the plugin's Doc I see the following function: pms_is_member() that helps to check if user is a member or not.
- hidden link

I've created the following custom shortcode and added it to "Custom Code" section offered by Toolset and used the function pms_is_member() to check if current loggedin user is member or not:
=> hidden link

add_shortcode('is_pms_member','func_is_pms_member');
function func_is_pms_member(){
  $status = pms_is_member();
  return $status; 
   
}

Then created the following content template:
=> hidden link

[wpv-conditional if="( '[is_pms_member]' eq '1')"]

this text is for paid member

[/wpv-conditional]

And to your Elementor template I've added the shortcode module as and added the following shortcode that displays the content template created above:
- hidden link

[wpv-post-body view_template="ct-for-views-as-container"]

As you can see now on frontend when I'm loggedin it shows the text "this text is for paid member" just below the "ПОСЛЕДНО ДОБАВЕНИ АУКЦИОНИ" heading:
=> hidden link

On your Elementor template instead of using the view's module (you should delete those), you should add the view conditionally as given under to the content template above where it uses the conditional statement.

So, in the content template, you should try to add the following conditional statements and adjust the view you want to display:
- hidden link

[wpv-conditional if="( '[is_pms_member]' eq '1')"]

[wpv-view name="view-slug-for-member"] 

[/wpv-conditional]

[wpv-conditional if="( '[is_pms_member]' ne '1')"]

[wpv-view name="view-slug-for-non-member"]

[/wpv-conditional]

Where:
- Just replace the view slug for member and non-member views and remove the view modules you added to your elementor templates.

#2706254
2.PNG
1.PNG

Thank you!
I've tested it, so far all is working as expected.
I'll try and edit all tb grids, since they are not working as assigned from the view and show in single column. Do you think that can be easily fixed?

#2706277

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Glad to know that the solution I shared help you to resolve your issue.

As per our support policy, we entertain only one question per ticket. May I kindly ask you to open a new ticket with every new question you may have. This will help other users searching on the forum as well as help us to write correct problem resolution summery for the original question reported with this ticket.

Kindly mark resolve this ticket and open a new ticket.

#2706750

Thank you!