Jump to content

How can I re-enable the Customer Login button?


ShamanicHarmonics

Recommended Posts

I removed the login button at the top right of my Prestashop site (using the default theme). Now I'd like to re-enable it, but I can't remember how I disabled it in the first place. How can I get the login button to show up again (where the red circle is)?

 

image.png.6674c50aaadc884b5e291f04e21a2a4b.png

 

Server Info:

Server information: Linux #2 SMP Wed Mar 22 08:55:29 UTC 2023 x86_64

Server software version: Apache

PHP version: 7.4.33

 

Store information

PrestaShop version: 1.7.8.7

Current theme in use: classic

 

Web Host: Ionos

Link to comment
Share on other sites

Look for the file in the route:
/public_html/themes/classic/templates/_partials/header.tpl

This should be the code for that button:

{if $logged}
  <a class="_gray-darker hidden-sm-down" href="{$urls.pages.my_account}" rel="nofollow" title="{l s='Your account' d='Shop.Theme.Customeraccount'}">{l s='Your account' d='Shop.Theme.Customeraccount'}</a>
{else}
  <a class="_gray-darker hidden-sm-down" href="{$urls.pages.authentication}" rel="nofollow" title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}">{l s='Sign in' d='Shop.Theme.Customeraccount'}</a>
{/if}

 

Link to comment
Share on other sites

My Header.tpl does not have that code. I can add it in, and test it out, but I'm not sure where to put it.

 

My Header.tpl has this;

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
{block name='header_banner'}
  <div class="header-banner">
    {hook h='displayBanner'}
  </div>
{/block}

{block name='header_nav'}
  <nav class="header-nav">
    <div class="container">
      <div class="row">
        <div class="hidden-sm-down">
          <div class="col-md-5 col-xs-12">
            {hook h='displayNav1'}
          </div>
          <div class="col-md-7 right-nav">
              {hook h='displayNav2'}
          </div>
        </div>
        <div class="hidden-md-up text-sm-center mobile">
          <div class="float-xs-left" id="menu-icon">
            <i class="material-icons d-inline">&#xE5D2;</i>
          </div>
          <div class="float-xs-right" id="_mobile_cart"></div>
          <div class="float-xs-right" id="_mobile_user_info"></div>
          <div class="top-logo" id="_mobile_logo"></div>
          <div class="clearfix"></div>
        </div>
      </div>
    </div>
  </nav>
{/block}

{block name='header_top'}
  <div class="header-top">
    <div class="container">
       <div class="row">
        <div class="col-md-2 hidden-sm-down" id="_desktop_logo">
          {if $shop.logo_details}
            {if $page.page_name == 'index'}
              <h1>
                {renderLogo}
              </h1>
            {else}
              {renderLogo}
            {/if}
          {/if}
        </div>
        <div class="header-top-right col-md-10 col-sm-12 position-static">
          {hook h='displayTop'}
        </div>
      </div>
      <div id="mobile_top_menu_wrapper" class="row hidden-md-up" style="display:none;">
        <div class="js-top-menu mobile" id="_mobile_top_menu"></div>
        <div class="js-top-menu-bottom">
          <div id="_mobile_currency_selector"></div>
          <div id="_mobile_language_selector"></div>
          <div id="_mobile_contact_link"></div>
        </div>
      </div>
    </div>
  </div>
  {hook h='displayNavFullWidth'}
{/block}

 

Link to comment
Share on other sites

Sorry the actual route must be this for default template:

/themes/classic/modules/ps_customersignin/ps_customersignin.tpl

the code should look like this:

<div id="_desktop_user_info">
  <div class="user-info">
    {if $logged}
      <a
        class="logout hidden-sm-down"
        href="{$logout_url}"
        rel="nofollow"
      >
        <i class="material-icons">&#xE7FF;</i>
        {l s='Sign out' d='Shop.Theme.Actions'}
      </a>
      <a
        class="account"
        href="{$my_account_url}"
        title="{l s='View my customer account' d='Shop.Theme.Customeraccount'}"
        rel="nofollow"
      >
        <i class="material-icons hidden-md-up logged">&#xE7FF;</i>
        <span class="hidden-sm-down">{$customerName}</span>
      </a>
    {else}
      <a
        href="{$my_account_url}"
        title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}"
        rel="nofollow"
      >
        <i class="material-icons">&#xE7FF;</i>
        <span class="hidden-sm-down">{l s='Sign in' d='Shop.Theme.Actions'}</span>
      </a>
    {/if}
  </div>
</div>

 

Link to comment
Share on other sites

Yes my ps_customersign.tpl seems to be exactly like that. Could there be another reason why my login button is not showing?

{**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 *}
<div id="_desktop_user_info">
  <div class="user-info">
    {if $logged}
      <a
        class="logout hidden-sm-down"
        href="{$urls.actions.logout}"
        rel="nofollow"
      >
        <i class="material-icons">&#xE7FF;</i>
        {l s='Sign out' d='Shop.Theme.Actions'}
      </a>
      <a
        class="account"
        href="{$urls.pages.my_account}"
        title="{l s='View my customer account' d='Shop.Theme.Customeraccount'}"
        rel="nofollow"
      >
        <i class="material-icons hidden-md-up logged">&#xE7FF;</i>
        <span class="hidden-sm-down">{$customerName}</span>
      </a>
    {else}
      <a
        href="{$urls.pages.my_account}"
        title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}"
        rel="nofollow"
      >
        <i class="material-icons">&#xE7FF;</i>
        <span class="hidden-sm-down">{l s='Sign in' d='Shop.Theme.Actions'}</span>
      </a>
    {/if}
  </div>
</div>

 

Link to comment
Share on other sites

The 'ps_customersignin' functionality is actually part of the 'ps_customersignin' template file, but there isn't a separate module for it in the Module Manager. To manage the hook of 'ps_customersignin', you can follow these steps:

1.- Log in to your PrestaShop admin panel.
2.- In the left sidebar, go to "Design" and then click on "Positions."
3.- In the "Positions" page, you can manage hooks and modules associated with them. You can use the search bar at the top of the page to find hooks by typing keywords like "header" or "top."
4.- The 'ps_customersignin' template file is hooked to the 'displayNav' hook by default. Find the 'displayNav' hook in the list, and click the "Edit" button (pencil icon) to manage the modules associated with it.
5.- In the "Edit" page, you can rearrange, add, or remove modules associated with the 'displayNav' hook.

Depending on the configuration of your header, the actual hook may differ displayNav / displayNav1 / displayNav2

Link to comment
Share on other sites

Thakns very much again for your continued help, however I'm not clear on what actions to take once I am in Positions. I tried to use the "Transplant a Module" button, but I wasn't sure what module to select in the drop down before selecting a hook.

I searched for DisplayNav on the Positions page and here is what it shows;

image.thumb.png.d50b559cf2ec653c9e42138235cdbc63.png

Link to comment
Share on other sites

Il 27/4/2023 alle 19:34, ShamanicHarmonics ha detto:

Non sono riuscito a trovare il modulo di connessione cliente da agganciare a DisplayNav2... potrebbe avere un altro nome?

image.thumb.png.3f7f8a92dd6c07f1b37bddc56edc062d.png

 

Ho fatto delle prove il modulo si chiama link "accesso" cliente

il link è un video che spiega come fare per riattivare il link di accesso al cliente, la posizione standard dell'hook usato è displaynav2 ho scaricato la versione prestashop che hai tu per fare la prova quindi dovrebbe funzionare, ricordati di cancellare la cache e se ancora non dovrebbe funzionare prova a reimpostare il modulo, vai a gestisci moduli cerca il modulo link di accesso cliente e clicca sulla freccia successivamente all'apertura della tendina clicca reimposta.

https://drive.google.com/file/d/1kovZTeBydvVdO62udfvy2UK6nfJ5qShM/view?usp=sharing

 

 

Se ancora non dovesse funzionare puoi contattarmi in privato via mail [email protected] posso darti temi e moduli prestashop che funzionano bene invece di usare il classico, ad esempio un bel modulo con accesso login sarebbe ottimo per aumentare le registrazioni e facilitarle sono disponibili anche per istallazioni e legami, posso fare un prezzo annuale per l'uso di tutti i moduli o temi che vuoi oltre a dare assistenza.

Se dovesse funzionare la mia spiegazione ti prego di inserirla come risolta...

Punto 1

Come mostrato nell'immagine dal menu a sinistra di prestashop apri la cartella design e successivamente vai in Posizioni, displayNav2 è dove dovrebbe trovarsi di defoult il modulo link accesso clienti

prestashop-2.jpg

Punto 2

puoi controllare cercando il modulo se è agganciato a qualche altro hook per errore, questo modulo ha molti hook disponibili ma il punto di defoult che ho trovato scaricando il prestashop è displayNav2

prestashop-3.jpg

Punto 3

Se il modulo non è presente in nessun ancoraggio, devi innestarlo cioè scegliere una posizione dove inserire il modulo, per innestare un modulo dalla pagina di posizioni dove dovresti trovarti clicca in alto a destra il pulsante blu indicato anche nell'immagine sotto.

prestashop-3..jpg

Punto 4

Cerca il modulo io lo trovo scrivendo "link" ovviamente senza le "" tra quelli che escono visto le traduzioni dei negozi online link "accesso" cliente 

prestashop-4.jpg

Punto 5

Dopo aver trovato il modulo devi scegliere l'ancoraggio che ti serve, come già detto in precedenza il gancio di defoult è displayNav2

prestashop-5.jpg

prestashop-1.jpg

Edited by valerio varchi (see edit history)
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...