Developer 16.07.2013 block, customer, html, knowhow, login, tutorial

Hide customer login block after login

Read tutorial how to hide customer login block after customer login. This tutorial is related to our free customer login block tutorial.

Yesterday I wrote about creating customer login block in our free html block moduleThe main disadvantage of this method is fact, that login form don't disappear after login. Now i want to show you little workaround. To achieve this you have to edit the html.tpl file located in the html box module directory. 

 

Open this file, you've got there only one variable:

{$htmlboxbody}

change this code to:

{if !$logged}
{$htmlboxbody}
{/if}

then save changes to this file. What code above mean? It mean that if user isn't logged - the script will show the content that you pasted into "code" field in the html block module configuration page. That's all!

 

Zdjęcie autora: Milosz Myszczuk

Artykuł napisany przez Milosza Myszczuka, eksperta PrestaShop i oficjalnego moderatora społeczności PrestaShop. CEO i założyciel agencji interaktywnej VEKIA. Dowiedz się więcej.

If you like this article, support our work!

Comments