Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Creating a custom template

    Why are you installing it in the includes/languages/english folder? you would only do that to create an override and you can only have an override if you had already created a template in the includes/templates folder following instructions like these
    https://www.zen-cart.com/tutorials/i...hp?article=142

    You may also want to read this as i think you are not understanding templates and overrides
    Webzings Design
    Semi retired from Web Design

  2. #2
    Join Date
    Aug 2011
    Posts
    25
    Plugin Contributions
    0

    Default Re: Creating a custom template

    Thank you. That was what I was looking for.

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Creating a custom template

    The easiest way of creating your CUSTOM template is to start with a FRESH set of ZC software on your hard drive. This set should be kept apart from any backups, or other zc software sets you may have.

    Then, on your harddrive, and with this FRESH set of software, open up the FOLLOWING main folders, and everywhere you see a classic directory, RE-NAME it to your desired template name:


    All are in the includes folder. There are no over-rides in the ADMIN section:

    1. templates
    2. languages
    3. modules


    You will need to DRILL DOWN into all visible SUB-FOLDERS, because "classic" appears in quite a few locations.

    When you have RE-NAMED every instance of classic, to my_custom_template, go back to:

    includes/my_custom_template/template_info.php

    ... and open it for EDITING.

    It will look like this:

    PHP Code:
    <?php
    /**
     * Template Information File
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: template_info.php 4226 2006-08-24 02:23:25Z drbyte $
     */
    $template_name 'Classic Contemporary Green';
    $template_version 'Version 1.3.5';
    $template_author 'Zen Cart Team (c) 2006';
    $template_description 'This template set is designed to be easily modified using only the style sheet to change colors, fonts, and the store logo. Three images are required; logo.jpg, header_bg.jpg, and tile_back.gif.';
    $template_screenshot 'scr_template_default.jpg';
    ?>
    It should be quite obvious what to do from this point:

    PHP Code:
    <?php
    /**
     * Template Information File
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: template_info.php 4226 2006-08-24 02:23:25Z drbyte $
     */
    $template_name 'MY CUSTOM TEMPLATE';
    $template_version 'Version 1';
    $template_author 'YOUR NAME - OR WHATEVER';
    $template_description 'This is MY CUSTOM TEMPLATE.';
    $template_screenshot '';
    ?>
    Then, just FTP everything to your server.


    PS... IT WILL CURRENTLY BE IDENTICAL TO CLASSIC IN LOOK AND FEEL, but it is the foundation for your future customisations.
    20 years a Zencart User

  4. #4
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Creating a custom template

    Personally, I wouldn't RENAME the classic folders. I'd copy them. The classic template can help diagnose problems in a custom template.

    This list is a bit outdated, but it'll give you an idea where to start to create a very basic custom template (you can build from there):
    • includes/languages/YOUR_TEMPLATE/english.php
    • includes/languages/english/YOUR_TEMPLATE/index.php
    • includes/languages/english/YOUR_TEMPLATE/meta_tags.php
    • includes/languages/english/YOUR_TEMPLATE/header.php (to change the logo and header text)
    • includes/templates/YOUR_TEMPLATE/template_info.php
    • includes/templates/YOUR_TEMPLATE/common/tpl_header.php <- may not be necessary
    • includes/templates/YOUR_TEMPLATE/common/tpl_footer.php <- may not be necessary
    • includes/templates/YOUR_TEMPLATE/images/logo.gif (or .jpg or .png)
    • includes/templates/YOUR_TEMPLATE/css/stylesheet.css


    Anywhere you see a /classic/ folder, you can create a folder for your custom template. You can copy the necessary files from either the /classic/ folder, the /template_default/ folder or the parent folder.

    Edit includes/templates/YOUR_TEMPLATE/template_info.php to give your template identifying information so you'll recognize it in the admin under tools->template selection.

    Note: if you've changed the height of the logo in header.php, you may need to change it in your stylesheet as well:

    #logoWrapper{
    background-image: url(../images/header_bg.jpg);
    background-repeat: repeat-x;
    background-color: #ffffff;
    height:75px; <-adjust this line if necessary
    }
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

 

 

Similar Threads

  1. Creating custom template
    By kyllle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Oct 2010, 08:32 AM
  2. Issues with creating custom template
    By ccices in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Nov 2009, 04:46 AM
  3. Creating Custom Template
    By maca2004 in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 31 Mar 2008, 06:52 PM
  4. Creating A Custom Template...Help Please
    By bobbyt in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 15 May 2006, 11:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg