jackdata Posted March 13, 2009 Share Posted March 13, 2009 我的网站首页标题设置了meta title后,标题成了"商店名称- meta title ", 该怎么去掉前面的商店名称?谢谢!英文不怎么好,一下找不到答案,希望知道的同学告诉我一下 ,谢谢~~ Link to comment Share on other sites More sharing options...
snoon Posted December 24, 2009 Share Posted December 24, 2009 我也很希望学习这个问题 Link to comment Share on other sites More sharing options...
21846657 Posted December 24, 2009 Share Posted December 24, 2009 1. 备份后打开classes/Tools.php2. 查找第525行: $metaTags['meta_title'] = $defaultValue.' - '.Configuration::get('PS_SHOP_NAME'); 3. 修改为: $metaTags['meta_title'] = $defaultValue; 4. 保存,测试。 Link to comment Share on other sites More sharing options...
snoon Posted December 25, 2009 Share Posted December 25, 2009 十分感谢 Link to comment Share on other sites More sharing options...
mofeewong Posted January 9, 2010 Share Posted January 9, 2010 1. 备份后打开classes/Tools.php2. 查找第525行:$metaTags['meta_title'] = $defaultValue.' - '.Configuration::get('PS_SHOP_NAME'); 3. 修改为: $metaTags['meta_title'] = $defaultValue; 4. 保存,测试。 我的是PS最新版,上面的代码在弟505行,按照上面的方法修改以后,问题解决了,但是后台的订单管理中,发票的PDF文档不能导出,提示以下错误:FPDF error: Some data has already been output, can't send PDF file请问是什么问题?如何解决? Link to comment Share on other sites More sharing options...
21846657 Posted January 11, 2010 Share Posted January 11, 2010 你在做上面的修改前,能成功导出PDF Invoices吗?1. 备份后打开admin/AdminInvoices.php2. 第80行 Tools::redirectAdmin('pdf.php?invoices&date;_from='.strval($_POST['date_from']).'&date;_to='.strval($_POST['date_to']).'&token;='.$this->token); 3. 修改为: Tools::redirectAdmin('pdf.php?invoices&date;_from='.urlencode($_POST['date_from']).'&date;_to='.urlencode($_POST['date_to']).'&token;='.$this->token); 4. 保存,测试。 Link to comment Share on other sites More sharing options...
mofeewong Posted January 11, 2010 Share Posted January 11, 2010 你在做上面的修改前,能成功导出PDF Invoices吗?1. 备份后打开admin/AdminInvoices.php2. 第80行 Tools::redirectAdmin('pdf.php?invoices&date;_from='.strval($_POST['date_from']).'&date;_to='.strval($_POST['date_to']).'&token;='.$this->token); 3. 修改为: Tools::redirectAdmin('pdf.php?invoices&date;_from='.urlencode($_POST['date_from']).'&date;_to='.urlencode($_POST['date_to']).'&token;='.$this->token); 4. 保存,测试。 做修改之前,可以成功导出PDF Invioces打开这个文件后,第80行的内容和你发出来的是不一样的,我的是1.2.5版,截图如下,麻烦看一下,谢谢! Link to comment Share on other sites More sharing options...
21846657 Posted January 11, 2010 Share Posted January 11, 2010 试试附件的。 AdminInvoices.php Link to comment Share on other sites More sharing options...
mofeewong Posted January 11, 2010 Share Posted January 11, 2010 试试附件的。 谢谢,我测试了一下,结果还是跟之前的一样。提示如下信息:FPDF error: Some data has already been output, can't send PDF file Link to comment Share on other sites More sharing options...
21846657 Posted January 11, 2010 Share Posted January 11, 2010 Back Office >> Preferences >> PDF 是如何设置的? Link to comment Share on other sites More sharing options...
mofeewong Posted January 11, 2010 Share Posted January 11, 2010 Back Office >> Preferences >> PDF 是如何设置的? 没有修改过,默认的。我换过其他的,一样是在BO无法下载pdf Link to comment Share on other sites More sharing options...
21846657 Posted January 11, 2010 Share Posted January 11, 2010 如果没改meta title,你可以正常使用,那没有必要修改meta title了。 Link to comment Share on other sites More sharing options...
mofeewong Posted January 11, 2010 Share Posted January 11, 2010 :) 看来如果没有别的方法只能这样了。 Link to comment Share on other sites More sharing options...
jay destout Posted February 23, 2011 Share Posted February 23, 2011 我的版本是1.3.3.0的,改了之后,发现首页标题后面还是跟着店名。不知道怎么回事了。。。 Link to comment Share on other sites More sharing options...
TiaNex Shopping Posted August 22, 2014 Share Posted August 22, 2014 1.6 以上版本,在 /classes/Meta.php public static function getHomeMetas($id_lang, $page_name) { $metas = Meta::getMetaByPage($page_name, $id_lang); $ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME'); $ret['meta_description'] = (isset($metas['description']) && $metas['description']) ? $metas['description'] : ''; $ret['meta_keywords'] = (isset($metas['keywords']) && $metas['keywords']) ? $metas['keywords'] : ''; return $ret; } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now