Zen Cart的模板系统是以CSS的布局为基础的。
首先,打开includes/templates/创建一个新文件夹。你可以任意命名它,但是最好不要太长,并用下划线代替空格。我们把它称为/CUSTOM,从现在开始,我们开始写/CUSTOM,你应该用自己喜欢的文件夹名称来取代它。 在你的新模板目录内的创建空文件夹,并调用它的图像,所以你应该有includes/templates/CUSTOM/images/. 下一步,复制includes/templates/CUSTOM的目录和文件夹及其文件includes/templates/template_default/css directory 你还可以在新模板目录内创建空文件夹: /common /sideboxes /templates 然后你复制includes/templates/template_default/template_info.php的文件,并且放在includes/templates/CUSTOM/。接下来,在文本编辑器中打开 includes/templates/CUSTOM/template_info.php。更改下面的每一对单引号之间的信息,这样就可以满足您的新模板。记住要保留单引号。你的模板名称并不需要与您的文件夹名称相同,为了方便阅读,你可以使用空格,但最好是使他们相似。 <?php $template_name = 'CUSTOM'; $template_version = 'Version 1.0'; $template_author = '<enter your name here>'; $template_description = 'This is my own template, created for my site at www.example.com'; $template_screenshot = ''; ?> 当你完成后,您的新文件结构应该如下: includes /templates /CUSTOM /common /css stylesheet.css /images /sideboxes /templates template_info.php 然后上传到您的服务器。 打开你的管理面板和tools -> template selection。点击“编辑”按钮,然后从下拉菜单中选择自定义,点击“更新”按钮。现在, tools -> layout boxes controller在页面底部单击“重置”按钮。 您的新模板现在已经启用,正好是为你量身订做的! |