Kingy Posted April 22, 2009 Share Posted April 22, 2009 I have just finished customising all the WHMCS templates for my website. One thing I am wanting to do is if the user is logged in show their details/account stats in a box on the page and then if they aren't logged, show the login form. What i currently have in my header.tpl is: {if $loggedin} {$clientsdetails.firstname} {$clientsdetails.lastname} {if $clientsdetails.companyname}({$clientsdetails.companyname}){/if}<br /> {$clientsdetails.address1}, {$clientsdetails.address2}<br /> {$clientsdetails.city}, {$clientsdetails.state}, {$clientsdetails.postcode}<br /> {$clientsdetails.country}<br /> {$clientsdetails.email}<br /><br /> </td> <td> {$LANG.accountstats}:<br /><br /> {$LANG.statsnumproducts}: {$stats.productsnumtotal}<br /> {$LANG.statsnumdomains}: {$stats.numdomains}<br /> {$LANG.statsnumtickets}: {$stats.numtickets}<br /> {$LANG.statscreditbalance}: {$stats.creditbalance}<br /> {$LANG.statsdueinvoicesbalance}: {if $stats.numdueinvoices>0}<font color="#cc0000">{/if}{$stats.dueinvoicesbalance}{if $stats.numdueinvoices>0}</font>{/if}<br /> </td> </tr> </table> {else} SHOW LOGIN FORM {/if} This works perfectly fine, but ONLY if they are on the clientarea.php page. Is there anyway i can make it work for all pages? 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted April 23, 2009 Share Posted April 23, 2009 the "stats" are only available on the inital page, although you can always add your own code to calcultae/display them in the tpls 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.