Advanced

Parent-Child Relationships

To set-up Parent-Child relationship between plans there exists Parent Plan(s) which has/have certain number of Child Plan(s).

The first and foremost step for a user to use Parent-Child Relationship Plan is that the user has to subscribe “Parent Plan”, then only “Child Plans” will be visible and then the user can subscribe them. Vice versa is also possible i.e. initially all plans are visible, once user subscribes to parent plan, the user will no longer be able to see child plans.

Steps to configure Parent-Child relationship between plans:-

Step 1:-Go to “Plugin Manager” and enable plugin “PayPlans-Parent Child”.

Step 2:- Now, start creating Plans. While creating plans, you may encounter with certain permutations and combinations for Parent-Child Relationships. Those possible cases are discussed below as:-

Case 1:- There exists one parent plan and multiple child plans.

  • Create Parent plan.
  • Create First Child plan and set option "Plan depends on" = "Parent Plan".
  • Create Second Child Plan and set option "Plan depends on" = "Parent Plan".
  • Go to "Subscribe" page on front-end and you will find that only Parent Plan is visible, there are no Child Plans to subscribe.
  • Now, subscribe Parent Plan and when subscription status of Parent Plan becomes "Active", Child Plans will also become visible to the user.

Case 2:- There exists multiple parent plans and one child plan. The child plan can become visible when all it’s parent plans are actively subscribed.

  • Create First Parent Plan.
  • Create Second Parent Plan.
  • Create Child Plan and set option "Plan depends on" = "First Parent Plan, Second Parent Plan".
  • Also, set option "Make available when user is subscribed to" = "All of the above".
  • Go to "Subscribe" page on front-end and you will find both Parent Plans there. The child plan is not visible.
  • Subscribe both, First Parent Plan and Second Parent Plan. When status of both Parent Plans become "Active” then only "Child Plan" will become visible to the the user.

Case 3:- There exists multiple parent plans and one child plan. The child plan can be visible when any of parent plan is subscribed.
Create Second Parent Plan.

  • Create Child Plan and set option "Plan depends on" = "First Parent Plan, Second Parent Plan".
  • Also, set option "Make available when user is subscribed to" = "Any of above plan".
  • Go to "Subscribe" page on front-end and check. Both Parent Plans are visible. The child plan is not visible.
  • Subscribe either First Parent Plan or Second Parent Plan. When status of any subscribed Parent Plan becomes "Active", then "Child Plan" will become visible to the user.

Case 4:- If you want to hide Child Plan (s) after subscribing Parent Plan. (Reverse Parent-Child Relationship as compared to above 3 cases)

  • Create First Child Plan.
  • Create Second Child Plan.
  • Create Parent Plan and set option "Plan depends on" = "First Child Plan, Second Child Plan".
  • Also set option "Make available when user is subscribed to" = "None of above".

Now, go to "Subscribe" page on front-end, you will find all 3 plans (First Child plan, Second Child Plan and Parent Plan).
Now, subscribe any of the Child Plans just created as mentioned above. When subscription status of the Child Plan becomes "Active" then the Parent Plan will not be visible to the user.