Unleash the Full Potential of Your PrestaShop Store

Welcome to MyPresta.eu – Your reliable partner in the e-commerce world. Find innovative modules that will take your business to a new level.

Disable customer login block after login

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