Jump to content

How can I remove the template header/footer from forwardpage.tpl?


Recommended Posts

My forwardpage.tpl is working fine in theory, however it sometimes hangs for 5-10 seconds before redirecting a user to PayPal if the user has a slow connection.

 

I know there is nothing I can do about the hanging, but the problem I have found is because of the hang, users click other links on that page and therefore surf away from the payment redirect. That means they never pay and are stuck and get confused (and angry).

 

So my solution is to remove the header and footer from forwardpage.tpl so that it is just the loading.gif and other info in that page. However, I can't figure out how to remove the template header and footer from only that forwardpage.tpl.... any ideas how to do this?

 

My goal is to have a very simple and stripped-down forwardpage.tpl so the user must wait for the redirect.

 

Thank you~

Link to comment
Share on other sites

Sorry, I did about 20min of google searches, and then after I posted the question above I found this suggestion:

http://forum.whmcs.com/showthread.php?26403-Display-certain-page-without-Header-neither-Footer

 

Soarky suggests use this in the header:

 

{if $filename!="downloads"}

 

YOUR ORIGINAL HEADER.TPL CODE HERE

 

{/if}

 

 

That makes sense, but is there an alternative? Maybe instead of messing with header.php which already has lots and lots of markup and comments, I can instead add something to forwardpage.tpl?

 

Any thoughts? Or is Sparky's idea by far the best?

Edited by paperweight
spelling errors
Link to comment
Share on other sites

Wait that does not work :(

 

This does not work because the URL has "cart.php?a=complete" but the template file is forwardpage.tpl. In that situation, is there a smarty code for using NOT the template file name instead?

 

I tried both of these and neither works:

{if $templatefile!="forwardpage"}

{if $templatename!="forwardpage"}

 

Any other thoughts?

Link to comment
Share on other sites

OK I am now trying this:

 

{if strpos($smarty.get.page, "cart.php?a=complete") !== false}
xxxxxxxx
{/if}

 

It almost works, but it still fails. It seems to look at the "cart.php" only, so all pages on the orderform are affected. Instead, it should look at the entire "cart.php?a=complete" but it stops at the cart.php...... any ideas how else to make it look at the entire URL section?

Link to comment
Share on other sites

this doesn't answer your smarty question, but are you aware you can adjust the forwarding time by changing the number in the line below in forwardpage.tpl (saw it mentioned in another thread) ?

 

setTimeout ( "autoForward()" , 5000 );

5000 is 5 seconds, so changing it to 3000 could save your customers a couple of seconds waiting.

Link to comment
Share on other sites

5000 is 5 seconds, so changing it to 3000 could save your customers a couple of seconds waiting.

 

Thanks for the feedback. We did change this a few months ago from 5000 all the way to 1, but there is still lag. For example, when I go home and load that page it hangs for about 2-3 seconds still. My connection is a medium-fast in Asia and our server is in the USA, and for some other users they have the same problem.

 

Last month I also experimented with loading HTTP header redirects too, but that didn't work because I couldn't figure out the conditional redirects for PayPal and each user.

 

Bottom line is I need a very-bare page that minimizes client-side activity.... any other thoughts? :)

Link to comment
Share on other sites

  • 3 months later...

This is a real pain in the a**. The forwardpage.tpl should not exist -- it should be removed from the WHMCS core and replaced with something on the backend or another redirect method.

 

Today one of my payment gateways had an error, so users are stuck on forwardpage.tpl. This creates confusion (and derision). For usability sake, I humbly ask WHMCS to remove the forwardpage.tpl and find another methgod to redirect to a payment processor.

Link to comment
Share on other sites

  • 2 months later...

I am looking at the changelog for the new 5.3.3 that came out yesterday... I unfortunately do not see any mention of changes that I talk about on this thread. I am 100000% sure this is an issue with almost every other WHMCS user.

 

How do I know that? Because I too have done checkouts when I buy services on other WHMCS sites and I see the same error.

 

Either WHMCS users are generally not eager to fix usability issues, or WHMCS itself is not so keen on it. Which is it? At least un-obfuscate the code so we can manually do it. This is a huge issue. Am I the only one who sees the emperor has no clothing??

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated