Jump to content

bloco de informacoes do cliente no hook Footer


Recommended Posts

Boas pessoal,

 

como posso colocar o blockuserinfo (conexao/desconexao) no hook displayFooter?

 

ja tentei fazer um override do modulo acrescentado :

 

&& $this->registerHook('displayFooter')

 

public function hookDisplayFooter($params)
{
$this->hookDisplayNav($params);
}
 
mas obtenho o seguintre erro:
 
Fatal error: Cannot redeclare class BlockUserInfo in C:\xampp\htdocs\test\www\111\override\modules\blockuserinfo\blockuserinfo.php on line 57
 
alguma ideia?
 
Obrigado
Edited by Pedro Pinto (see edit history)
Link to comment
Share on other sites

Resolvido!

 

no footer.tpl inseri o seguinte codigo (copiado diretamente de nav.tpl to modulo blockuserinfo:

{if $is_logged}
<div class="header_user_info">
<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a>
</div>
{/if}
<div class="header_user_info">
{if $is_logged}
<a class="logout" href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Log me out' mod='blockuserinfo'}">
{l s='Sign out' mod='blockuserinfo'}
</a>
{else}
<a class="login" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Log in to your customer account' mod='blockuserinfo'}">
{l s='Sign in' mod='blockuserinfo'}
</a>
{/if}
</div>
Obridago pela resposta selectshop.at (desbloqueou-me a ideia)  :) 
 
 
Link to comment
Share on other sites

 

Resolvido!

 

no footer.tpl inseri o seguinte codigo (copiado diretamente de nav.tpl to modulo blockuserinfo:

{if $is_logged}
<div class="header_user_info">
<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span></a>
</div>
{/if}
<div class="header_user_info">
{if $is_logged}
<a class="logout" href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Log me out' mod='blockuserinfo'}">
{l s='Sign out' mod='blockuserinfo'}
</a>
{else}
<a class="login" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Log in to your customer account' mod='blockuserinfo'}">
{l s='Sign in' mod='blockuserinfo'}
</a>
{/if}
</div>
Obridago pela resposta selectshop.at (desbloqueou-me a ideia)  :) 

 

 

Só um detalhe...

Se vc colocou no arquivo footer.tpl do tema, recomendo que remova a definição do módulo das strings de tradução, pois não é mais uma string de módulo:

{l s='Sign in' mod='blockuserinfo'} //Errado
{l s='Sign in'} //Correto

Boa sorte.

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...