Jump to content

Changing Link on the Header Logo


dylan2013

Recommended Posts

I'm a newbie and looking to change the url for the link on my logo in the header. Here's the site:

 

shop.donnabsbakery.com

 

The logo currently links back to our prestashop home page, but I would like to change it to link to this site:

 

donnabsbakery.com

 

Is there a way to do this through the Prestashop backend feature, or do I need to change it in the ftp files?

 

Thanks!

Link to comment
Share on other sites

  • 4 years later...

Personally I don't find it very useful to linke somewhere out of your shop. But I you want to change, open header.tpl in your themes folder.
There you find these code appx. starting on line #103:

                        <div class="container">
                            <div class="row">
                                <div id="header_logo">
                                    <a href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{$shop_name|escape:'html':'UTF-8'}">
                                        <img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>
                                    </a>
                                </div>
                                {if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
                            </div>
                        </div>

Change the link (in line 4 according to above code) as follows:

                                    <a href="https://mynewurl.com" title="Back to start page">

Plese use the appropriate protocol as part to the link. And report back.

Edited by Scully (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi Scully.

Thanks for replying. I looked inside my Themes folder and I found two files header.tpl anyway I modified both but nothing happen. both are in a _partial folder.

the reason I want to change this link is because initially I am using the shop as a product catalog ( link from my main website to the store), so I want to provide a way to go back to the main website.

 

{block name='header'}
  {block name='header_nav'}
    <nav class="header-nav">
      <div class="container">
        <div class="row">
          <div class="col-md-6 hidden-sm-down" id="_desktop_logo">
            <a href="https://xxxxx.com">
              <img class="logo img-responsive" src="{$shop.logo}" alt="{$shop.name} {l s='logo' d='Shop.Theme.Global'}">
            </a>
          </div>
          <div class="col-md-6 text-xs-right hidden-sm-down">
            {hook h='displayNav1'}
Link to comment
Share on other sites

You haven't mentionned which theme you are using and also not your prestashop version. For 1.6 and 1.7. with default-bootstrap or classic template there is only one header.tpl file existing. In 1.7. the changes are to be maded at appx. line 62.

          <a href="{$urls.base_url}">
            <img class="logo img-responsive" src="{$shop.logo}" alt="{$shop.name}">
          </a>
Link to comment
Share on other sites

I am using 1.7.2.2 and using the classic template. Navigating thru the whole themes folder I found two header.tpl.... one inside themes/classic/templates/_partials

and another one inside themes/classic/templates/checkout/_partials. I modified both as follows

{block name='header'}

{block name='header_nav'}

<nav class="header-nav">

<div class="container">

<div class="row">

<div class="col-md-6 hidden-sm-down" id="_desktop_logo">

<a href="https://el-portal.com.mx" title="Regreso a página principal">

<img class="logo img-responsive" src="{$shop.logo}" alt="{$shop.name}">

</a>

</div>

line start at 25

 

But nothing happen. No change in the link

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...