How do I create a new Custom Template?

The Zen Cart® templating system uses a CSS based layout.

In this article, CAPITALIZED words refer to a folder or language that you choose. We use CUSTOM for your template and ENGLISH for your language by default. Change these if needed.

First, open includes/templates/ and create a new folder. You can call it anything you like, though it is best not to make it too long and to use underscores instead of spaces. We will call it /CUSTOM here, so everywhere we write /CUSTOM from now on, you should replace it with your own preferred folder name.

Create an empty folder inside your new template directory and call it images so you should haveincludes/templates/CUSTOM/images/.

Next, copy the includes/templates/template_default/css directory and place the folder and its files in your newincludes/templates/CUSTOM/ folder.

You can also create the following empty folders inside your new template directory:

/common
/sideboxes
/templates

Then you copy the file called includes/templates/template_default/template_info.php, and put it insideincludes/templates/CUSTOM/. Next, open includes/templates/CUSTOM/template_info.php in your text editor. Change the information below between each set of single quotes to suit your new template. Remember to keep the single quotes. Your template name does not need to be identical to your folder name, and you can use spaces to make it read well, but it is best to make them similar. Leave the space between the quotes for the template screenshot field empty for now, since you don’t have one yet.

<?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 = '';
?>

When you've finished, your new file structure should look as follows:

includes
/templates
/CUSTOM
/common
/css
stylesheet.css
/images
/sideboxes
/templates
template_info.php

Upload your /CUSTOM folder (or whatever name you've actually called it) to your server.

Open your Admin panel and navigate to tools -> template selection. Click the Edit button, then choose CUSTOM from the dropdown menu and click the Update button. Now, navigate to tools -> layout boxes controller and at the bottom of the page click the Reset button.

Your new template is now enabled and ready for you to customize. See the related articles below for more tips on customizing. There are many more articles available via the search and via the FAQ Home Page link.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I find out what version of Zen Cart or PHP or MySQL I'm using?

To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go...

Getting a BLANK PAGE? Here's the answer ...

If you're getting a blank page when trying to browse to a certain page on your store, or after...

What's New in the Upcoming v2.0 release?

Database Abstraction Layer and Sql CacheThe abstraction layer has been re-factored to include a...

Image Preparation - How-to

I've seen several posts where people obviously aren't quite sure about the best way to set up...

Some tips to modify stylesheet

1. Download Web Developer extension for FireFox here2. Install & restart FireFox. You should...