Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2007
    Posts
    3
    Plugin Contributions
    0

    Default override default templates

    Hello,

    Just installed zencart and am trying to take some first steps at customization. I just wanted to do something simple, like changing the "Congratulations! you have successfully installed..." message and I read the FAQ on that subject, as well as a tutorial that said essentially the same thing.

    Per the instructions, I copied the index.php file from the includes/languages/english directory to my local system and made some text changes to the specified lines. I then created a new directory, includes/languages/english/custom_1, uploaded the changed file (in ascii mode) to it and made sure that the permissions were at 755.

    But zencart will not read the file in my custom_1 directory. It reads the file in includes/languages/english/. If I copy my file to includes/languages/english/classic, it will be read from there. There's obviously something I'm misinterpreting about the FAQ answer, because several other questions are worded similarly, and I can't get them to work either.

    I'd appreciate someone pointing me in the right direction!

    Thanks,
    Chuck

    Read the FAQ

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: override default templates

    This function is template specific - i.e. in a folder with the same name as your active template. So as this works with the "classic" templater and location I suspect that if you look in the admin > tools > template Selection > that "Classic" is set as the default.

    Breifly: if you copy the template files in includes/templates/classic > to a new folder under templates with a name for your template(can be any name you like) and edit the template_info.php file to reflect this - then this name should be a selection in the admin.

    From there - you can create a folder at any level where there exists a classic folder and override the files at that level by placing your edited copy in this folder.

    Mulitple folders named for your template and any where you see a classic folder.

    Hope this helps
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,682
    Plugin Contributions
    11

    Default Re: override default templates

    There's a helpful chart in the downloads section http://www.zen-cart.com/index.php?ma...roducts_id=298
    This will help you see what directories/files are available to the override system.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4
    Join Date
    Aug 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: override default templates

    Thank you both for your prompt and helpful replies. I've waded through a lot of information trying to figure this out for myself, but something just didn't click. Hopefully, the information you've provided will be all I need.

    Cheers,
    Chuck

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

    Default Re: override default templates

    To create a very basic custom template (you can build from there), you need:
    • includes/languages/YOUR_TEMPLATE/english.php
    • includes/languages/english/YOUR_TEMPLATE/index.php
    • includes/languages/english/YOUR_TEMPLATE/header.php (to change the logo)
    • includes/templates/YOUR_TEMPLATE/template_info.php
    • includes/templates/YOUR_TEMPLATE/common/tpl_header.php
    • includes/templates/YOUR_TEMPLATE/common/tpl_footer.php
    • includes/templates/YOUR_TEMPLATE/images/logo.gif
    • 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.
    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

  6. #6
    Join Date
    Aug 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: override default templates

    More great information! Thanks very much.

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

    Default Re: override default templates

    I did a prototype cart for a friend and decided to keep track of the things I changed to create the template. I thought it might come in handy in future. Creating a custom template seems overwhelming, but once you get the hang of it, it's pretty simple.
    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. Replies: 8
    Last Post: 8 Jan 2014, 11:44 PM
  2. override AFTER changing orignal templates
    By ctorok in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Dec 2009, 08:49 PM
  3. Using Custom Templates and Override system
    By PlexusDesign in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Jul 2009, 06:25 AM
  4. Templates override
    By shiningfaery in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 18 Mar 2009, 01:01 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