> Zencart中文手册 > 如何zencart商品标题优化

zen cart 是一款非常优秀,有良好口碑的电子商务网站,所以自己的laptop battery网站选择了它,
这几天一直在心着测试网站,一边测,一边修改,今天发现zen cart有点小小的问题,商品页面纵然手动添加了MATE标签,可还是会自动添加一些内容上去,并且连分隔符也没有,一影响美观,二则是影响seo.查找了zen-cart.cn的有关文章,虽没有找到确定的答案,但还是节省了不少时间,感谢.

下面是具体的解决方法:一是修改标题、关键字都在语言文件中定义 includeslanguagesschinesemeta_tags.php :

第二:

在includesmodules(your_template)meta_tags.PHP文件266~326行(1.38版)中找到:

// custom meta tags per product
if (!empty($product_info_metatags->fields['metatags_keywords']) or !empty($product_info_metatags->fields['metatags_description'])) {
$meta_products_name = ”;
$meta_products_price = ”;
$metatags_keywords = ”;

$meta_products_price = ($product_info_metatags->fields['metatags_price_status'] == ‘1′ ? SECONDARY_SECTION . ($product_info_metatags->fields['products_price_sorter'] > 0 ? $currencies->display_price($product_info_metatags->fields['products_price_sorter'], zen_get_tax_rate($product_info_metatags->fields['products_tax_class_id'])) : SECONDARY_SECTION . META_TAG_PRODUCTS_PRICE_IS_FREE_TEXT) : ”);

$meta_products_name .= ($product_info_metatags->fields['metatags_products_name_status'] == ‘0′ ? $product_info_metatags->fields['products_name'] : ”);
$meta_products_name .= ($product_info_metatags->fields['metatags_title_status'] == ‘1′ ? ‘ ‘ . $product_info_metatags->fields['metatags_title'] : ”);
$meta_products_name .= ($product_info_metatags->fields['metatags_model_status'] == ‘0′ ? ‘[' . $product_info_metatags->fields['products_model'] . ‘]’ : ”);
修改从这数起倒数2,4,6为:fields['metatags_products_name_status'] == ‘0′,fields['metatags_title_status'] == ‘1′ ,fields['metatags_model_status'] == ‘0′ ,默认全为’1′.