Newbie99 Posted March 12, 2009 Share Posted March 12, 2009 Hello all. I want to remove my shop name from the begining of my Meta Title on the home page (index.php). For example, in my shop it displays: "Shop Title - description" as written in the CMS. I just want it to be instead: "descripton" and i can name add the shop title if need be. Thank you. 2 Link to comment Share on other sites More sharing options...
jhnstcks Posted March 12, 2009 Share Posted March 12, 2009 Depends on which version of Prestashop you are using.v1 meta tags for the homepage are controlled from admin>preferences>appearance.v1.1 Meta tags for the homepage are controled from admin>preferences>meta tags>index.php Link to comment Share on other sites More sharing options...
Bleep Posted March 15, 2009 Share Posted March 15, 2009 Yes, I know you can edit the meta tags in the places you mentioned. However, the shop name is put in front of all of these Title tags. I'm trying to figure out how to remove the shop title name from appearing at the beginning of the title tag, even when it is not included in admin>preferences>meta tags>index.php. Anybody? Oh, and thanks for responding to my question. Depends on which version of Prestashop you are using.v1 meta tags for the homepage are controlled from admin>preferences>appearance.v1.1 Meta tags for the homepage are controled from admin>preferences>meta tags>index.php Link to comment Share on other sites More sharing options...
rocky Posted March 16, 2009 Share Posted March 16, 2009 In classes/Tools.php on line 456, change: $row['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$row['meta_title']; to: $row['meta_title'] = $row['meta_title']; Link to comment Share on other sites More sharing options...
rocky Posted March 16, 2009 Share Posted March 16, 2009 Oops, just realised that the new code is redundant. You can just delete the old line instead of changing it. Link to comment Share on other sites More sharing options...
Newbie99 Posted March 16, 2009 Author Share Posted March 16, 2009 I just realized this is for the CMS pages, but this does not work for for pages linke index.php, contat-form.php where their meta tag information is editied in: Back Office -> Preferences -> Meta Tags. Any idea on how to edit the code so the shop name isn't put in fron for these title tags? Thanks, I think it is also edited in classes/tools.php, but I'm not sure how to change the code. Thank you.Thanks alot Rocky! Oops, just realised that the new code is redundant. You can just delete the old line instead of changing it. Link to comment Share on other sites More sharing options...
Newbie99 Posted March 18, 2009 Author Share Posted March 18, 2009 I see that block of code that needs to be edited, but i'm not sure what needs to be removed. Anybod? Link to comment Share on other sites More sharing options...
rocky Posted March 18, 2009 Share Posted March 18, 2009 Have a look at getHomeMetaTags function at line 477 and completeMetaTags function at 489 for other places to remove the shop name. Link to comment Share on other sites More sharing options...
Floobynooby Posted March 27, 2009 Share Posted March 27, 2009 Hi as rocky stated In classes/Tools.php on line 477, change:$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME');change to:$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME');This is basically removing the code:Configuration::get('PS_SHOP_NAME').' - '.Cheers rocky spent ages trying to find it. Link to comment Share on other sites More sharing options...
VCH Posted July 25, 2009 Share Posted July 25, 2009 Hi,I have tried the suggestions you presented but everytime I change something in tools.php I get one of this 3 results:a) Hack Attempt Error on Tools.phpc) Everything looks great but log in into backoffice the system gives an error because of header problems.How to go around this situations? Link to comment Share on other sites More sharing options...
vigel Posted April 16, 2010 Share Posted April 16, 2010 classes/tools.php $ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').'-'.$metas['title'] : Configuration::get('PS_SHOP_NAME'); to: $ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : ''; Link to comment Share on other sites More sharing options...
Cybelius Posted April 17, 2010 Share Posted April 17, 2010 classes/tools.php$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').'-'.$metas['title'] : Configuration::get('PS_SHOP_NAME'); to: $ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : ''; Thanks! worked for me Link to comment Share on other sites More sharing options...
Recommended Posts