I am currently using prestashop 8.1.5 with the Megafox theme installed. The issue I am facing is in the header section where user information is displayed as a drop down menu, but unfortunately, the username is not visible when a user is logged in. I have tried to modify the code to only show the username when the user is logged in, as seen in the picture, but I have not been successful so far.
https://i.sstatic.net/BrXGx.png
<div class="user-info dropdown js-dropdown">
<span class="user-info-title expand-more _gray-darker" data-toggle="dropdown">
<span class="account_title">{l s='Account' d='Shop.Theme.Global'}</span>
{if $logged}
<span class="register_text"><a href="{$my_account_url}">{l s='Hi, Welcome ' d='Shop.Theme.Global'}</a></span>
{else}
<span class="account_text">{l s='Login - Register' d='Shop.Theme.Global'}</span>
{/if}
</span>
<ul class="dropdown-menu-">
{if $logged}
<li>
<a
class="account dropdown-item"
href="{$urls.pages.my_account}"
title="{l s='View my customer account' d='Shop.Theme.Customeraccount'}"
rel="nofollow"
>
<span class="">{$customerName}</span>
</a>
</li>
<li>
<a
class="logout dropdown-item"
href="{$urls.actions.logout}"
rel="nofollow"
>
{l s='Logout' d='Shop.Theme.Actions'}
</a>
</li>
{else}
<li>
<a
class="dropdown-item"
href="{$urls.pages.my_account}"
title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}"
rel="nofollow"
>
<span>{l s='Login' d='Shop.Theme.Actions'}</span>
</a>
</li>
<li>
<a href="{$urls.pages.register}"><span>{l s='Register' d='Shop.Theme.Global'}</span></a>
</li>
{/if}
<li>
{hook h='displayStWishlistTopLink'}
</li>
<li>
{hook h='displayStCompareTopLink'}
</li>
</ul>
</div>
Any assistance on resolving this issue would be greatly appreciated.
I have attempted editing ps_customersing.tpl and removing the welcome message, but the problem persists.