By Inbal Tori on Wednesday, 20 December 2017
Posted in General
Replies 12
Likes 0
Views 420
Votes 0
hi
when a user clicks on a page that he is not subscribed to, he is getting the following message:
"Currently, you don't have any subscription or you are not login." and a "subscribe plan" button.
when he clicks on the button, he is redirected to the general page showing all available plans.
i would like to change this so the user will be redirected to that specific plan registration page.

thank you
To achieve this, you have to modify on this PHP file JoomlaFolder/components/com_payplans/templates/tmpl_bs3/dashboard/default_frontview.php


<a href="<?php echo XiRoute::_('index.php?option=com_payplans&view=plan&task=subscribe'); ?>" class="btn btn-default btn-primary">

// Replace with
<a href="<?php echo XiRoute::_('index.php?option=com_payplans&view=plan&task=subscribe&plan_id=1'); ?>" class="btn btn-default btn-primary">



Note : this plan_id=1 you have to insert your plan id

Once you modified this file, you have to put into your current template override location JOOMLA_ROOT/templates/YOUR_CURRENT_JOOMLA_TEMPLATE/html/com_payplans/tmpl_bs3/dashboard/default_frontview.php , so when you update Payplans in next higher version, your changes will not get override it.

You can read more our documentation here : https://stackideas.com/docs/payplans/administrators/customizations/template-override

Hope this will help.
·
Wednesday, 20 December 2017 19:45
·
0 Likes
·
0 Votes
·
0 Comments
·
hi
thank you for your reply. it is very helpful but however, this is only partial
i have several plans on my website and whenever users clicks on a link to a page who is a part of a plan,
the are redirected to the dashboard page you pointed to in your reply
because of this, i have no way of knowing what was the original page/plan they were trying to access, so iu can't refere them to the correct plan susbcription.
i have tryied several ways to get the original refering page (like HTTP_REFERER) but didn't work.

is there a way to add a paramater to the redirect (get or post) so i will be able to know what page the user was trying to see?

thank you
·
Saturday, 06 January 2018 22:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Inbal,

Can you please share more details, so i can assist you.
i have several plans on my website and whenever users clicks on a link to a page who is a part of a plan,
Which app's you are using for apply restriction on plans. on you site i check that you are using k2, content hider app.
Please share the link of that page which you are talking.
·
Monday, 08 January 2018 11:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi
i'm using both "K2 Category Access Control" and "K2 Item Access Control"
link for example:
http://inbelet.co.il/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=7

this is a link to a category using K2 Category Access Control

thank you
·
Monday, 08 January 2018 16:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Inbal,

I have tried to access this link, but it gives 404 not found error.
In case of K2 access control for category and item control, you need to do customization in these app's to redirect user to plan page.

Let me know you want to redirect to plan page or for specific item need to redirect on specific plan page , so i'll assist you.
·
Monday, 08 January 2018 18:21
·
0 Likes
·
0 Votes
·
0 Comments
·
hi
sorry, the link was wrong. try this one


every k2 category is a part of a diferent plan
so what i would like to do basicly is:
when a user clicks on a link to a category:
1. what category is was trying to view
2. what plan deos this category belong to
3. redirect to plan purchase page

thank you
·
Monday, 08 January 2018 19:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Inbal,

Your requirement is possible by doing customization in existing k2 category access app.
If you want this customization then send detailed quotation request at marketing@stackideas.com OR https://crm.stackideas.com and select "Customization"

Let me know if you have any query.
·
Monday, 08 January 2018 22:36
·
0 Likes
·
0 Votes
·
0 Comments
·
thank you for your reply
can you please direct me to the code file in the k2 category access app that is creating the redirection?
I would like to try doing it myself first

thank you
·
Monday, 08 January 2018 22:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Inbal,

Go to file path : root/plugings//k2/k2/app/k2item/k2item.php, here find the function name onPayplansAccessCheck.
See attached screen shot, where you need to change the code.

Let me know if you have any query.
·
Tuesday, 09 January 2018 10:56
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post