> Zencart中文手册 > zencart如何更换模版

zencart如何更换模版
从换模版开始:
一、准备工作 1.下载zencart模板 2.备份好网店数据库和原来的模板文件个性化网页!
二、安装zencart模板 1.将下载后的模板包用winrar或7zip解压缩。 2.将模板目录整个复制到 includes/templates/ 下。


三、选择新安装的模板 1.进入zencart后台管理,工具(Tools)–模板选择(Template Selection),可以看到右边已安装模板有模板名:Bruce 2.选择要替换哪个现有模板(这里选的是ZCDemo Chinese),然后点击右边的编辑按钮,从现安装模板的下拉菜单中选择新模板,最后点击更新按钮。 3.此时Default(All)语言使用了Bruce这个新模板。但是还没有生效。
四、正式启用刚选择的模板。 1.转到工具(Tools)–外观设置(Layout Boxes Controller), 2. 在屏幕最下面,选择“重置”按钮。
主要文件路径:
index.PHP 主文件
includes/templates/[custom template folder]/common/HTML_header.php 页面的head部分
includes/templates/[custom template folder]/common/tpl_main_page.php 页面的body部分
includes/templates/[custom template folder]/common/tpl_header.php 所有页面的页眉
(column left)
includes/templates/[custom template folder]/common/main_template_vars.php 决定页面的内容部分,缺省为 ‘tmp_index_default.php’
首页 – 缺省
includes/templates/[custom template folder]/templates/tmp_index_default.php 首页模板文件
首页 – 显示分类
includes/templates/[custom template folder]/templates/tpl_index_categories.php 首页上显示分类时的模板文件
includes/modules/[custom template folder]/pages/index/category_row.php 选择要显示的分类
includes/templates/[custom template folder]/templates/tpl_index_category_row.php 显示分类
首页 – 显示指定分类
includes/templates/[custom template folder]/templates/tpl_index_product_list.php 首页上显示指定的分类时采用的模板文件
includes/modules/[custom template folder]/product_listing.php 将商品数据添加到数组
includes/templates/[custom template folder]/templates/tpl_modules_product_listing.php 显示商品数量和商品导航菜单
includes/templates/[custom template folder]/common/tpl_list_box_content.php 显示商品数组
商品信息页面
includes/templates/[custom template folder]/templates/tpl_product_info_display.php 显示单件商品信息
购物车页面
includes/templates/[custom template folder]/templates/tpl_shopping_cart_default.php 购物车页面
(column right)
includes/templates/[custom template folder]/common/tpl_footer.php 所有页面的页脚