Skip Navigation

[Resolved] Finding a solution for selling webinars online

This thread is resolved. Here is a description of the problem and solution.

Problem: How can I use Access to restrict content on my site based on a User's purchases? For example, I would like to sell webinars. When the User purchases a webinar product, I would like to give them Access to specific areas of the site.

Solution: Access can restrict permissions based on Post Group or by User Role, but these criteria can be difficult to manage when there are many different products for sale. Conditional HTML may be more effective.

Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Our next available supporter will start replying to tickets in about 3.65 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1073492

I'm developing a site which will offer a range of webinars that customers can buy individually. Initially, we will only offer two courses, but we intend to expand over time. Each course will contain a series of videos, PDFs, tasks, and suggestions for additional reading.

I am wondering what the best setup for this type of site would be? My first thought was to set up each course as a product in WooCommerce, and then find a way to "open" up access to the relevant posts when this is done. The intention is not to simply let the customer download the files, but rather get access online... I have considered setting this up through the use of Toolset Access, but that would create trouble as more courses are added, and people may have any combination of courses linked to their account. Is there an easy way to allow Woocommerce purchases to be linked to certain pages?

Thanks in advance for all help!

#1074403

Hi, there's not an easy way to set up this type of flexible access system based on product purchase. Access control uses Post Groups or User roles, but those are somewhat rigid and difficult to manage when you have multiple products. One way I can think of to set this up with Toolset is to use conditional HTML to show and hide specific content from specific Users, based on a custom field or custom fields. It will require some knowledge of PHP. Here's how it could work:
- Create a custom field group for Users. Add a radio button custom field for each webinar. The names of the custom fields should match the post slug for the corresponding Webinar. The values will be 0 or 1, to indicate whether or not a User has purchased a specific Webinar. The default value should be 0, to indicate the User has not yet purchased the Webinar.
- As new Webinars are added, create a new custom radio button field to correspond to that Webinar using the appropriate slugs.
- Add conditional HTML to your Webinar Content Template to show or hide specific pieces of content, like download links or video content. Test the value of the current User's corresponding radio button. If it's 1, then show the content. If it's 0, hide the content. This does not prevent a User from downloading content if he or she has a direct link to the content, it only manages display of the content or display of the links to download the content.
- Use a Commerce Form to handle adding a Webinar to the User's cart. This is how Users will purchase access to new Webinars. Add a generic field to the Form that includes the current Webinar slug.
- Use the Forms Commerce API to set the value of that User's corresponding webinar custom field radio button to be 1 when the purchase is complete. This will unlock access to the Webinar because the conditional will now be true.