Jump to content

[SOLVED] How to add My account next to the user name at the header?


Recommended Posts

Hi,

I want to know how can I add a link to (My account) just next to the user name.

This should appear once the user log in.. if the user is just a guest then this link shouldn't appear.

Thanks in advance.

Link to comment
Share on other sites

Look at blockuserinfo.tpl file in folder modules/blockuserinfo.
You could add link after line 6 just before {else}

{if $logged}
{$customerName} (<a href="{$base_dir}index.php?mylogout" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'})
<a href="{$base_dir_ssl}my-account.php" title="{l s='Your Account' mod='blockuserinfo'}" >{l s='Your Account' mod='blockuserinfo'}
       {else}
           <a href="{$base_dir_ssl}my-account.php">{l s='Log in' mod='blockuserinfo'}
       {/if}

Link to comment
Share on other sites

Look at blockuserinfo.tpl file in folder modules/blockuserinfo.
You could add link after line 6 just before {else}
{if $logged}
{$customerName} (<a href="{$base_dir}index.php?mylogout" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'})
<a href="{$base_dir_ssl}my-account.php" title="{l s='Your Account' mod='blockuserinfo'}" >{l s='Your Account' mod='blockuserinfo'}
       {else}
           <a href="{$base_dir_ssl}my-account.php">{l s='Log in' mod='blockuserinfo'}
       {/if}



Thanks a lot razaro,

Works like a charm,

Thanks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...