ZenCart实现后台直接修改首页的title,keywords,description

ZenCart本身不能在后台直接修改首页title,keywords,description,需要去includes\languages\english\meta_tags.php文件修改,这样对zencart代码不熟悉的人带来了许多不便,下面教大家实现后台直接修改首页的title,keywords,description.
第一步、在后台tools->SQL Query Executor里面执行以下SQL:

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)VALUES (NULL, ‘Homepage title’, ‘HOME_PAGE_TITLE’, ‘title’, ‘set the home page title’, 1,210, NOW(), NOW(), NULL, NULL), (NULL, ‘Homepage keywords’, ‘HOME_PAGE_META_KEYWORDS’, ‘keywords’, ‘set the home page keywords’, 1,211, NOW(), NOW(), NULL, NULL), (NULL, ‘Homepage description’, ‘HOME_PAGE_META_DESCRIPTION’, ‘description’, ‘set the home page description’, 1,212, NOW(), NOW(), NULL, NULL);

第二步、如果你有修改过这个文件includes\languages\english\meta_tags.php的内容:
// Home Page Only:
define(‘HOME_PAGE_META_DESCRIPTION’, ”);
define(‘HOME_PAGE_META_KEYWORDS’, ”);
define(‘HOME_PAGE_TITLE’, ”);
那么请将这几个常用弄成这样就行了。不用去动它。
以上添加后就可以在后台“Configuration”->“基本设置”直接编辑你网站标题,关键词和描述.是不是很方便哈。

This entry was posted in ZEN CART技术问题. Bookmark the permalink.