Member / Paid Plans redirect problem

Our website has a members-only area where members are granted permission to view videos they have purchased access to. If someone who doesn’t have access to a certain page tried to go there the standard “You don’t have permission to view this page” box would appear, forcing them to go back.
We recently started using the Paid Plans app as a way to offer a free trial. We only have one plan and it is for 1 free week of access to one certain page.

The problem is, now when members do not have access to a page they are taken to the Paid Plans page, instead of the “You don’t have permission” window. Which is a problem because we have designed the Paid Plans page to have information about the free trial, and the actual app window is at the bottom of the page.
Is there a way to fix this redirect? If members don’t have access to a page I do not want them to go to the Paid Plans page, just to see a window that says “you don’t have permission.”
Are there any workarounds?

Hello.

I would suggest the following:

  1. Create a lightbox with the message “You don’t have permission to view this page”;
    2) Use getCurrentMemberOrders to retrieve current member orders;
    3) Use if else statement inside then promise to check if orders.length is greater than 0 and redirect to the relevant plan or open the lightbox.

Good luck!

Thanks for your reply @samuele . Would I put this in the Site code? Or would it have to go on each Members Only page?

The code should be placed in the site tab of the relevant orders page.