Jump to content

How to get shop name out of home page title?


Recommended Posts

Hi there,

My home page title (the bit between the <title> and </title> tags reads [shop name] - [Whatever I wrote]

When I look in header.tpl of my theme, the code between the title tags causing that to happen is this...

<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>

Is there a way I can get rid of the shop name from my title so that I can totally customize it?

Link to comment
Share on other sites

check classes/Tools.php

for instance for homepage replace:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME');



with:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME');



in this file you can search:

Configuration::get('PS_SHOP_NAME').' - '.

and safely remove it

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

@ netman

I assume that you mean that you want to replace the standard prestashop logo from header to your own logo ?
If so then it is very simple, just make a logo that fit your needs and should have the extender logo.png or .gif
Now fire-up your ftp and go to this section [ftp://yourftp /public_html/img] and here in this folder you can place your new logo.png or logo.jpg and overwrite the existing one ( if it is still there off course )
To put the logo nice in place in your header you must go here,[ftp://yourftp/public_html/themes/your theme/css/global.css] now open the global.css file with a editor like notepad++ ( it`s free by the way and the best i think ) now you go to this line 189 ( that is yours i checked ) and replace the following,


This is what you have now:

  
h1#logo {
float:left;
width:190px;
}



Change it to this:

#header h1 {
height:98px;
padding:0 0 0 4px;
}




Now you place your new logo in position by changing the values height:( playing with this value till your logo is in position ) and padding: first 0 is moving logo to the left and the last one as show as 4px in example moves the logo to the right.

Btw always make a backup first off the global.css file before you start to play with it !!
Installing firebug for firefox will make it a lot easier to place the logo first in position the way you want and then copy the code and change it finally in the global.css file.

The height en padding values show as above are samples from my own site.

Hope this helped a bit.

Best regards,

ysco..

Link to comment
Share on other sites

  • 2 years later...

check classes/Tools.php

for instance for homepage replace:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME');

with:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME');

in this file you can search:

Configuration::get('PS_SHOP_NAME').' - '.

and safely remove it

 

 

Just what I was looking for, thank you very much :D

Link to comment
Share on other sites

  • 2 months later...

check classes/Tools.php

 

for instance for homepage replace:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME');

 

with:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME');

 

in this file you can search:

Configuration::get('PS_SHOP_NAME').' - '.

and safely remove it

 

Thank you so much Radu.

small-logo.png

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