Jump to content

My account link in Userinfo block


Recommended Posts

I displayed my account link in the userinfo block. Now when a client logs in the name of the client appears above the my account link. How to make my account link to disappear after client logs in?

my domain: sweet5.kg prestashop version 1.5.6.1

Thank you in advance. 

Link to comment
Share on other sites

blockuserinfo.tpl

 

there is a code:
 

		{if $logged}
			<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a>
			<a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a>
		{else}
			<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
		{/if}

change it to:

		{if $logged}
			<a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a>
		{else}
			<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
		{/if}
Link to comment
Share on other sites

hello

 

please make sure that:

- you changed correct file. Sometimes module files are stored also in your theme directory (/themes/YOUR_THEME/modules/blockuserinfo/) if module file exists there - you have to modify this one instead of original

 

- after changes in template files sometimes it's necessary to recompile theme (adv.parameters > performance) you can try to recompile it

Link to comment
Share on other sites

×
×
  • Create New...