Jump to content

Showing client details


Kingy

Recommended Posts

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?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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