Results 1 to 2 of 2

Thread: Showing client details

  1. #1
    Join Date
    Apr 2009
    Posts
    4

    Default Showing client details

    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:

    Code:
    {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}
    &nbsp;&nbsp;&nbsp;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?

  2. #2
    Join Date
    Feb 2007
    Location
    London, United Kingdom.
    Posts
    3,902

    Default

    the "stats" are only available on the inital page, although you can always add your own code to calcultae/display them in the tpls
    Rob Golding UK Web Hosting est 1996 - Cloud/VPS/Servers in own UK London Docklands DataCentre - ICANN Accredited Registrar (PM me for a free WHMCS domain reseller module)
    WHMCS Modules: Registrars:CentralNIC, RRPProxy, AstutiumDomains, Cacti Bridge, APC/Raritan Power Control, Linux-Ensim, DNS Manager, VAT Reports, Samba Control

Similar Threads

  1. changing 'Product details' to 'Service details' on client area
    By Kiroge in forum Customisation & Integration Questions
    Replies: 2
    Last Post: 06-24-12, 08:29 AM
  2. Showing Custom Client Field Details on Invoice
    By nljc88 in forum Customisation & Integration Questions
    Replies: 0
    Last Post: 05-11-07, 06:06 AM