By Bernt-Uwe Berwing & Markus Berwing GbR on Monday, 19 February 2018
Posted in General Issues
Replies 8
Likes 0
Views 801
Votes 0
This is with reference to closed ticket https://stackideas.com/forums/skip-free-invoice-plugin-not-working

We have new Joomla installation with Joomla 3.8.5 with PayPlans latest version 3.6.3, Jomsocial 4.5.
We are currently in the setup process.

We have enabled Skip Free Invoice Plugin
It is for Forever Free Plan - and after registration user is redirected to the "Thanks subscription Page"
and the invoice information is getting presented.

As I do not want to show this "Thanks Subscription Page", I have set the redirection URL for the forever free plan
to Homepage.
This is working fine but before re-direction the invoice is still getting presented during approx. 10 seconds.

But I want to completely suppress the presentation of the invoice information at all.
This is only for the professional and chargable users.

How can I achieve this ?
Hello,

In case of free plan to redirect immediately, refer below mentioned solution
Go to root/components/com_payplans/templatestmpl_bs3/invoice/default_complete.php, find below mentioned code

<script type="text/javascript">
window.onload = function(){
setTimeout("payplans.url.redirect('<?php echo XiRoute::_($redirecturl); ?>')", 3000);
}
</script>


Replace with

<script type="text/javascript">
window.onload = function(){
setTimeout("payplans.url.redirect('<?php echo XiRoute::_($redirecturl); ?>')", 0);
}
</script>


Update me if still you have any issue.
·
Monday, 19 February 2018 12:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Manisha,
thanks for the fast reply...appreciated.
I have adjusted the code and changed to 0 ......but unfortunately the invoice page is still being presented and immediately being redirected. But this is now even more confusing for the users when they see for less than 1 second an invoice and then directed to the frontpage.
They should not see the invoice at all .....only the users who have paid plan (and on those I do not have a redirection).
·
Monday, 19 February 2018 16:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Markus,

Ok , i got your point you don't want to show invoice thanks page for free plans's , redirect them to another link immediately.

Let me know you are setting redirect url for free plan only, so i'll give you the solutions.
If you set it for other plans (paid plans also) then let me know so i can check the possibilities.

Update me.
·
Monday, 19 February 2018 17:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Manisha,
thanks a lot.
For three free plan I have currently set the redirect to: http://development.seniors-meet-seniors.com
So it is just simply the homepage ;-)
All other paid plans should obviously get presented the invoice and no redirection.

Thanks
Markus
·
Monday, 19 February 2018 18:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

That's good.

Go to root/components/com_payplans/libraries/event/plan.php, find below mentioned code near line no. 42

$redirecturl = $plan->getRedirecturl();


Add below mentioned code after above mentioned lie of code

if ($redirecturl) {
return XiFactory::getApplication()->redirect($redirecturl);
}


Try this solution and update me if still any issue.
·
Monday, 19 February 2018 18:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Manisha,
awesome....thanks so much.
This is now working as expected....tested this for free and paid accounts.
Thanks for the great support !!!!
Regards
Markus
·
Monday, 19 February 2018 19:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you so much for appreciation.
·
Monday, 19 February 2018 22:43
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post