zencart如何添加一个新的页面

时间: 2010-02-20 / 分类: 开发总结 / 浏览次数: / 0个评论 发表评论

ABOUT_US page for Zen Cart v1.3.x
=================================
Change History:
Date       Version  Who             Why
===============================================================================
08/29/2007 1.3.0.13 webmiss        Easier instructions for installing about_us page
05/05/2007 1.3.0.1  swguy           Correct use of require_languages.php
06/29/2006 1.3.0    Zen Cart Team   Bring up to 1.3.0 Standards
ABOUT US page
To add this page to your system, //要添加此网页到您的系统
1. Install the following files to the appropriate file structure://安装下列文件到相应的文件结构:
/includes/extra_datafiles/about_us_filenames.php
/includes/languages/english/extra_definitions/模板名称/about_us.php
/includes/languages/english/html_includes/define_about_us.php  (this adds the page to the drop down box in Define Pages Editor)//这增加了页面到了在页面编辑下拉框
/includes/languages/english/html_includes/模板名称/define_about_us.php
/includes/languages/english/模板名称/about_us.php
/includes/modules/pages/about_us/header_php.php
/includes/modules/sideboxes/模板名称/information.php
/includes/templates/模板名称/templates/tpl_about_us_default.php
— you can edit this file in Admin with the Define Pages Editor
— using this file for edits via admin is easier to maintain, and lets you use the
HTMLAREA rich-text editing capabilities of your browser, if enabled in your shop
2. Rename the five "MYTEMPLATE" folders to be the same name as your main template.
3. Upload all the files to your server, using similar folder structure as found in this ZIP.//所有文件上传到您的服务器,使用如本邮编发现了类似的文件夹结构
4. The link to the about_us page has already been added to the information sideboxe or your can add it to another location as desired.//到about_us页的链接已被添加到信息sideboxe或您可以将它添加到另一个所需的位置。
The URL for it is either://对于它的URL可以是
- zen_href_link(FILENAME_ABOUT_US)
or
- http://www.mysite.com/index.php?main_page=about_us
HERE’S AN EXAMPLE ON HOW TO ADD TO THE "information" SIDEBOX:  //下面是一个例子关于如何添加到“information”SIDEBOX:
a. edit /includes/modules/sideboxes/MYTEMPLATE/information.php
b. add this line, perhaps right above the "Shipping" link (FILENAME_SHIPPING):
$information[] = ‘<a href="’ . zen_href_link(FILENAME_ABOUT_US) . ‘">’ . BOX_INFORMATION_ABOUT_US . ‘</a>’;
c. Upload these changes to your server, and the link will appear in your "information" sidebox.//上传这些更改到您的服务器,现在链接将出现在您的“information”sidebox。
TO USE THIS PACKAGE FOR OTHER PAGES//以使用此页的其它包装
===================================
It’s easy to use this package as a model for other customizable pages.
Let’s say you wanted to create another page called "mypage":
- simply rename "about_us" in every filename or folder in this package to "mypage"
- edit the extra_datafiles/mypage_filenames.php and change the define’s by changing "ABOUT_US" and "about_us" to "MYPAGE" and "mypage" respectively.
- edit modules/pages/ABOUT_US/header_php.php and change the "ABOUT_US" reference to "MYPAGE"
- edit any of the language files as desired (some heading defines will need changes)
Upload to your server.  To add links to a sidebox, see step #4 above.
http://d.namipan.com/d/980cbe9e955c2e7159681fa52ea91bd263a0d6dcde180000

发表评论

您的昵称 *

您的邮箱 *

您的网站