By Anthony on Wednesday, 09 September 2020
Posted in General Issues
Replies 17
Likes 0
Views 705
Votes 0
Hi,
I would like to customise the Access Prohibited page that shows when the block non-subscribers option is turned on in PayPlans.

Specifically, I’d like to show the subscription plans on that page, rather than have them click the View Available Plans button. Is that possible?

I’d also like to style the page by adding pictures and a few things. Would you be able to tell me which file is responsible for it? Is it possible to create an override for it?

For changing the text, I was just planning on using a language override.
Hey anthony,

I am still unable to access your site backend.
Find attached file and replace with below mentioned path.
root\components\com_payplans\views\denied\view.html.php

Update us with response.
·
Tuesday, 15 September 2020 15:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Specifically, I’d like to show the subscription plans on that page, rather than have them click the View Available Plans button. Is that possible?

Do you want to redirect on plan page rather then this access prohibited page ?
·
Wednesday, 09 September 2020 18:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi karanveer singh manohar,

Ultimately, I would prefer to add the plans to the prohibited page but as I'm still working things out, a redirect might be useful. I'm interested in knowing how to do that.

For the override, I've worked out that the file responsible for the prohibited page is- html/components/com_payplans/themes/wireframe/denied/default/default.php
and based on the documentation at https://stackideas.com/docs/payplans/administrators/customization/template-override

I should be able to create the override by creating a file at JOOMLA_ROOT/templates/my-template-name/html/com_payplans/denied/default/default.php
·
Wednesday, 09 September 2020 20:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Anthony,

Ultimately, I would prefer to add the plans to the prohibited page but as I'm still working things out, a redirect might be useful. I'm interested in knowing how to do that.

For this , you need to do the changes in core file. Go to file path root\administrator\components\com_payplans\includes\event\events\access.php, near line no. 68, find below mentioned code.

if (count($subs) <= 0) {
$redirect = PPR::_('index.php?option=com_payplans&view=denied', false);
return PP::redirect($redirect);
}


Replace with

if (count($subs) <= 0) {
$redirect = PPR::_('index.php?option=com_payplans&view=plan', false);
return PP::redirect($redirect);
}



I should be able to create the override by creating a file at JOOMLA_ROOT/templates/my-template-name/html/com_payplans/denied/default/default.php

Yes, correct one.

Let me know if you have any query.
·
Thursday, 10 September 2020 10:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for that!

Do you have any ideas how I can show the subscription plans?
·
Thursday, 10 September 2020 14:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Do you have any ideas how I can show the subscription plans?

Where you want to show subscription plans ?
·
Thursday, 10 September 2020 15:41
·
0 Likes
·
0 Votes
·
0 Comments
·
On the Access Prohibited page.
·
Thursday, 10 September 2020 16:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Anthony,

If you want to show plan on Access prohibited page, then you need to do the changes in Access prohibit page template to show plans.
This file : html/components/com_payplans/themes/wireframe/denied/default/default.php

As you just want to show plan , so better to redirect them plan page. as mentioned above.

Update us with response.
·
Thursday, 10 September 2020 16:25
·
0 Likes
·
0 Votes
·
0 Comments
·
If possible, could you tell me which files I would need to include to show the subscriptions plans?
I tried including administrator/components/com_payplans/includes/payplans.php and then using some code from components/com_payplans/themes/wireframe/plan/default/plan.php but I hadn't included all the necessary variables.

The redirect would only be used as a last resort because it modifies core files.
In my case it is important to show a message before redirecting anyway. I am using JFBConnect, so it complicates things somewhat.
·
Thursday, 10 September 2020 16:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Anthony,

If possible, could you tell me which files I would need to include to show the subscriptions plans?
I tried including administrator/components/com_payplans/includes/payplans.php and then using some code from components/com_payplans/themes/wireframe/plan/default/plan.php but I hadn't included all the necessary variables.

To show plan on access denied page.
Find attached file and replace with below mentioned path.
root\components\com_payplans\views\denied\view.html.php

Then copy all file located at root\components\com_payplans\themes\wireframe\plan\default and past at the path root\components\com_payplans\themes\wireframe\denied\default

Try this solution and update us if you have any query.
·
Thursday, 10 September 2020 17:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you karanveer,
Unfortunately it throws an error

500 - View class not found [class, file]: payplansViewdenied, /usr/share/nginx/html/components/com_payplans/views/denied/view.html.php


I stepped through it using xdebug and it failed at class PayplansViewPlan extends PayPlansSiteView in file view.html.php
·
Friday, 11 September 2020 04:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey anthony,

Please update us with your site backend and ftp details , so we will check it.

Thank you for understanding !
·
Friday, 11 September 2020 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi karanveer

Sorry for the delay. I usually develop on a local server and had trouble setting up ngrok to give you access. Anyway I've uploaded it temporarily to the live server instead.

Please note, I've included the key for the SFTP in the first post. It will need to be extracted first as I had to upload it in zip format.
·
Tuesday, 15 September 2020 06:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi karanveer,

It works great now. Thank you very much

Just wondering, is it possible to do this with just overrides?
·
Wednesday, 16 September 2020 01:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating Anthony, glad that your issue is resolved now. Unfortunately it is not possible to create template overrides for view files currently
·
Wednesday, 16 September 2020 10:49
·
0 Likes
·
0 Votes
·
0 Comments
·
I understand. Thanks Mark.
·
Wednesday, 16 September 2020 17:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Glad to hear that your issue has been resolved now.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Wednesday, 16 September 2020 23:54
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post