Pedro Pinto Posted October 5, 2015 Share Posted October 5, 2015 (edited) 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 October 5, 2015 by Pedro Pinto (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted October 5, 2015 Share Posted October 5, 2015 (edited) As informacoes do cliente para login e logout (blockuserinfo), já se encontram no footer, sendo que vc. nao necessita enganchar o login/logout neste. O bloco "my account" é responsável por isto. Verifique: Edited October 5, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
Pedro Pinto Posted October 5, 2015 Author Share Posted October 5, 2015 Ok, é verdade. mas apenas quero que apareça o link login e logout (sem mais nenhuma informaçao) tal como aparece no displayNav se usarmos o blockuserinfo. Link to comment Share on other sites More sharing options...
Pedro Pinto Posted October 5, 2015 Author Share Posted October 5, 2015 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 More sharing options...
Daniel - PrestaBR Posted October 5, 2015 Share Posted October 5, 2015 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 More sharing options...
Pedro Pinto Posted October 6, 2015 Author Share Posted October 6, 2015 Ok, obrigado pelo detalhe! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now