Breadcrumbs

Home / Help / FAQ / Tutorials / DJ-Classifieds FAQ / How to restrict / limit viewing of certain categories with Subscription Plans App in DJ-Classifieds

Top Menu

Content

How to restrict / limit viewing of certain categories with Subscription Plans App in DJ-Classifieds
How to restrict / limit viewing of certain categories with Subscription Plans App in DJ-Classifieds 4.3 out of 5 based on 3 votes.

DJ-Classifieds-Tutorial-Restrict-limit-categories-viewing

Sometimes you need to limit access for viewing certain categories for your users. With Subscription Plans App you can create a plan that will allow users to view categories you selected only when their plan is active. This is a another way you can charge your users!

You need to have Subscription Plans App installed and enabled in DJ-Classifieds.

Steps to take in this tutorial

  1. Create Joomla Group
  2. Create Joomla Access Level
  3. Create or edit DJ-Classifieds Category
  4. Create new Subscription Plan
  5. Check if the settings are correct
  6. Make a Subscription plan test purchase

Create Joomla Group

First create New Joomla Group by going to Users -> Groups -> Add New Group

add-new-joomla-user-group

 

Give your Group Title (1), and select Group Parent to "Registered" (2) (in certain situations you can use different groups, but for this tutorial we'll stay with "Registered") and click "Save & Close"(3)

create-new-joomla-group-details

Create Joomla Access Level

Now create a Joomla Access Level that will allow users that are in it to access the category. For the convenience of this tutorial I've created Access Level "DJCF-Restricted" in Joomla.

To setup new Access Level in Joomla, do following:

In Joomla backend go to Users -> Access Levels -> Add Access Level

add-new-joomla-access-level

 

Give your Level Title (1), and select User Groups Having Viewing Access to "DJCF-Restricted" (2) and click "Save & Close"(3)

add-new-joomla-access-level-details

Create (or edit) DJ-Classifieds Category

Now navigate to Components -> DJ-Classifieds -> Categories -> New or if you're editing the category just open it.

In this view:

Give your category a name and set all needed settings. I've named the category "Restricted" (this is our demo category that we'll be restricting access to) for convenience of this tutorial.
Now open "Access Restrictions" (1) tab:

Joomla-Access-restriction-tab-dj-classifieds

and click Save (2) (it's needed when you're creating new category).

Once the category is saved, go back to "Access Restrictions" tab and set as explained:

DJ-classifieds-access-restricitons-settings

  1. Set Viewing Access Restrictions to the Access Level we've created (DJCF-Restricted in my case)
  2. Set Viewing advert details Access Restrictions to the same Access Level
  3. Select "Restricted" in Adding Access Restrictions and in the multiselect box choose DJCF-Restricted
  4. Click Save & Close

Subscription Plans settings

Now we need to create the subscription plan that will allow for viewing and adding the adverts to the category "Restricted"

Go to Components -> DJ-Classifieds -> Subscription Plans -> New

dj-classifieds-subscription-plans-settings-restriction

Here in "New" and "Params" tabs you need to set all needed settings. You can learn more about subscription plans settings here: https://dj-extensions.com/faq/dj-classifieds-faq/how-subscription-plans-app-for-dj-classifieds-works

The most important part here is selecting the group we've created in Assign to group setting.

This way after user purchases this plan he'll be automatically assigned to this Joomla User Group.

Checking the front end of your site

Things to check:

  1. Check if the category "Restricted" is not visible for non-registered users - should NOT be visible
  2. Check if the category "Restricted" is not visible for regular registered users (those without the Subscription Plan we have created earlier) - should NOT visible
  3. Check if regular user can't see the category when submitting new advert - they should NOT see it

If you've set all up correctly the category should not be visible for non-registered and regular registered user.

Make a test with new Subscription Plan

Now make a test if the plan was set correctly.

Go to your Subscription Plans page on your website's front end and purchase the Plan we've just created

DJ-Classifieds-subscription-plan-restricted

After the successful payment the plan is activated (you can manualy accept the payment in DJ-Classifieds Payment section)

DJ-Classifieds-subscription-plan-restricted-paid

Now you should be able to see the category on categories list, and be able to add adverts to this category.

Once the subscription from the Subscription Plan ends the user will be automatically unattached from the DJCF-Restricted user group and wont see the category "Restricted" until the plan is activated again.

You need to configure Cron job on your server so the user will be un-attached from the Joomla User Group when his Subscription Plan expires! See more about the cron task in DJ-Classifieds.

 Hope you like this tutorial, if you have any questions about it leave a comment!


Found this article interesting? Subscribe for more.
Or share this article with your friends.
Thursday, 03 March 2016 15:07
 
User Rating:  (3)
PoorBest
 

Footer Menu