zen-cart全新做一个自己的模板应参考文档
来源:百度文库 编辑:神马文学网 时间:2024/04/29 17:12:09
Zen Cart的模板设计比较复杂,需要一定的时间来熟悉。一旦你了解了它的结构,就会慢慢习惯了。
首先要阅读常见问答部分的:如何添加、制作新模板。 Zen Cart的设计没有什么特别,与以前设计HTML页面是一样的。只是整个页面分成了好几个部分,并加入了PHP代码。
通常,页面分为页眉(header),页脚(footer),边框(sideboxes)。所以设计页面的时候,要记住Zen Cart是如何组织这些页面的。
页面是通过CSS样式表来控制的。样式表控制表格单元的背景图案、字体的颜色和样式等等。所以,假如你需要修改边框标题栏的字体,那么查看样式表文件。
Zen Cart在页面添加图像有两种方式。可以使用图像目录的相对路径,或者在模板中用php变量定义图像。如果你使用https服务器,并且采用相对图像路径,那么https的图像目录下也要有同样的图像,否则https服务器很可能会给出警告提示。
Zen Cart可以设置成任意的html/flash的界面,只是比通常的html页面的设计费时。你可以从修改缺省的模板开始,先修改CSS文件和三栏格式的界面。开始先采用不同的颜色,很快就可以设计出完全不同的风格。
最后,在设计模板前要先计划好你网页的内容,事半功倍。
下面是zen cart页面各部分相对应模板文件的一个列表:
文件路径 注释
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 所有页面的页脚
首先要阅读常见问答部分的:如何添加、制作新模板。 Zen Cart的设计没有什么特别,与以前设计HTML页面是一样的。只是整个页面分成了好几个部分,并加入了PHP代码。
通常,页面分为页眉(header),页脚(footer),边框(sideboxes)。所以设计页面的时候,要记住Zen Cart是如何组织这些页面的。
页面是通过CSS样式表来控制的。样式表控制表格单元的背景图案、字体的颜色和样式等等。所以,假如你需要修改边框标题栏的字体,那么查看样式表文件。
Zen Cart在页面添加图像有两种方式。可以使用图像目录的相对路径,或者在模板中用php变量定义图像。如果你使用https服务器,并且采用相对图像路径,那么https的图像目录下也要有同样的图像,否则https服务器很可能会给出警告提示。
Zen Cart可以设置成任意的html/flash的界面,只是比通常的html页面的设计费时。你可以从修改缺省的模板开始,先修改CSS文件和三栏格式的界面。开始先采用不同的颜色,很快就可以设计出完全不同的风格。
最后,在设计模板前要先计划好你网页的内容,事半功倍。
下面是zen cart页面各部分相对应模板文件的一个列表:
文件路径 注释
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 所有页面的页脚
zen-cart全新做一个自己的模板应参考文档
全新做一个自己的模板步骤是?应参考那些文档? - 模板美工 - 用户论坛
ZEN CART安全建店的步骤 (2009.12.18 更新) : Zen Cart 中文...
盟多卡浅谈Zen Cart对电子商务的价值
Zen Cart优化由内至外
如何调试、排错zen cart网店(出现空白页面)? : Zen Cart 中文支持 : ...
做一个真实的自己
美国应做一个负责任的大国
活出全新的自己
每天迎来全新的自己
活出全新的自己 -
创建 BPEL4WS 文档的参考指南
创建 BPEL4WS 文档的参考指南
一个全新的医学理论
一个全新的中医世界
做一个属于自己的精品印
做一个能管住自己的女人
做一个属于自己的精品印章
家庭教育杂谈:家长应教育孩子做最好的自己
软件工程文档模板----一、可行性研究报告 - lihuaidong521的专栏 - CSDNBlog
软件工程文档模板----六、用户操作手册 - lihuaidong521的专栏 - CSDNBlog
做一个成功投机客身上应具有的七颗心
成功一个支点,做自己想做的人
更简单,更具行动力的终极高效系统:Zen To Done(简易做)