Results 1 to 10 of 23

Hybrid View

  1. #1

    Default Simple template guide?

    Is there a simple etmplate editing guide for Zen Cart?

    Simply that I'm new to Zen Cart, and so far the templates seem to be spread all over, and even use 2 CSS files for normal store display, which all seems very messy.

    Is there a simplified tutorial on editing the template(s), not least which templates correspond to which areas?

    Many thanks for any replies.

  2. #2
    Join Date
    Oct 2005
    Location
    New Mexico
    Posts
    393
    Plugin Contributions
    0

    Default Re: Simple template guide?

    Brian,

    Start here - http://www.zen-cart.com/forum/showthread.php?t=36567. My answer in the previous post should also help.

    Good idea to start with template_default or Kuroi's New Zen template, IMO.

  3. #3

    Default Re: Simple template guide?

    Thanks for the headsup - looks like I've a lot of reading to - at the moment I can't even get rid of the footer banner, even though I've deleted all code in tpl_footer - I believe there's an option in the admin area to remove it, but I want to entirely remove the code.

    I have to say, I find the templating system somewhat insane - I'm not sure who's developed it, but they seem to have tried to make it as difficult as possible to edit it.

  4. #4
    Join Date
    Oct 2005
    Location
    New Mexico
    Posts
    393
    Plugin Contributions
    0

    Default Re: Simple template guide?

    Might suggest you reserve the harsh criticism until you understand it a little better.

    Start with the template_default or Kuroi's New Zen template. Pick a name for your new template - \custom for example. When you find a file to edit, like \includes\languages\english\header.php, create a \custom folder, copy the file in to the new folder (the override) and edit that file. So, to edit the title and tagline for the site you will have \includes\languages\english\custom\header.php. This is the pattern for every file that you edit.

    Only copy files into the override that you actually edit. You can look for the \classic folders as a guide. If there is a \classic folder then you will likely create a \custom folder for your own files.

    PHP is modular code and at first blush the 'files are everywhere.' That is always the case with database driven code, on the internet or anywhere else. You are just a little overwhelmed by the new info. It will begin to make sense soon. Read, read, read. Monolithic code is perhaps easier to edit. But it is impossible to update without losing your customizations and is SLOW.

    The value of overrides is that you will not lose your site customizations as you apply patches and upgrades to the core code. Losing those things would make a preacher cuss.

    As for multiple CSS statements, Kuroi's only uses one so give that a try. I am nearly CSS illiterate but I have been able to manage with multiple files. Is it really that big of a deal?

    Best wishes and good luck

  5. #5

    Default Re: Simple template guide?

    Many thanks for the help Bruce - it really is much appreciated - but I am so immensely frustrated with the way the templating system has been set up that I'm pretty close to just uninstalling the whole thing and going with Cube Cart.

    It really doers need underlining that the template system for Zen Cart as it stands is a complete mess - PHP code may be treated as modular, but there really is no excuse for the HTML being treated in this way. I've edited code in different platforms for forums, directories, and blogs, and I've frankly never seen such an awful mess as the Zen Cart templating system - the way the templates are spread across various subfolders, and then the huge number of files involved, is about the most user-unfriendly set-up imaginable.

    I guess it doesn't help that the Zen Cart site is currently such a mess - the tutorials and resources link to IPB and mambo (I tink) files that no longer exist. I certainly don;t hold being hacked against you, but as a new user, it really is overwhelming. You mentioned Kursoi's template, but I can't find anywhere on the site for that.

    I'm going to try and perservere for a couple more hours, but unless I can get my head around the way the templating system has been set up, I'm just going to have to move on. I guess that's the price you pay when you're looking for a custom look.

    The idea that each page generates 500 or so queries is additionally unhelpful - I've heard people talk of code bloat before, but this really comes across as the paragon of that.

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Simple template guide?

    Hi Brian

    Reading between the lines, I think that part of your problem is that you are looking at the system through the lens of the Classic Template. This template unfortunately installs by default in Zen Cart (hopefuly that will change) but was really intended as a way of achieving backwards compatibility with earlier tables-based versions of Zen Cart. You have therefore been steered away from near (but not near enough) tableless create that Zen Cart has become.

    Bruce refers above to my template which is intended to gently nudge new users towards CSS-based designs. It is called future Zen and can be found in the templates section. There is a link to it below.

    Zen Cart is a power system and the overrides system reflects this. It thus has a steep learning curve, and the documentation is poor, but once you get past that, WOW, this is a function rich, extensible and upgradable system that is a joy to work with.

    I doubt anybody would disagree with your assessment of the number of SQL queries used to build a page. However, as the roadmap shows achieving a dramatic reduction in that number is a top priority and scheduled for the next major release.

    Overall I see Zen Cart as a huge bundle of functional options that I can turn on and off via the admin system, position anywhere I want them via the template system and style to look how I want via CSS. It was well worth the few days I spent getting to know it. But if you're looking for something easy, maybe it's not for you.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  7. #7
    Join Date
    Jun 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: Simple template guide?

    Quote Originally Posted by Sermonzone
    Pick a name for your new template - \custom for example. When you find a file to edit, like \includes\languages\english\header.php, create a \custom folder, copy the file in to the new folder (the override) and edit that file. So, to edit the title and tagline for the site you will have \includes\languages\english\custom\header.php. This is the pattern for every file that you edit.

    Only copy files into the override that you actually edit. You can look for the \classic folders as a guide. If there is a \classic folder then you will likely create a \custom folder for your own files.
    Holy smokes! This thread -- and particulary the quote above -- has finally made it all click for me!! It's like the whole structure of how the templates work just sunk in!!

    Now, I get it! So that being said, when I make a new file, like say header.php and put the new copy into my brand new \includes\languages\english\custom\ folder, do I do anything with the original header.php or just leave it where it always was and just ignore it from that point on?

    You have no idea how happy this thread has just made me! Thanks!!

    Maureen

  8. #8
    Join Date
    Oct 2005
    Location
    New Mexico
    Posts
    393
    Plugin Contributions
    0

    Default Re: Simple template guide?

    Just leave it alone.

    Remember to only put files in the override folder that have actually been edited.

    Very glad to hear a good report.

    Best wishes

 

 

Similar Threads

  1. Simple Zen Template
    By RKB in forum Basic Configuration
    Replies: 10
    Last Post: 24 Dec 2009, 08:30 AM
  2. Simple template?
    By Inkbella in forum Addon Templates
    Replies: 1
    Last Post: 14 Apr 2008, 04:54 AM
  3. Simple Zen Template
    By RKB in forum Addon Templates
    Replies: 0
    Last Post: 25 Feb 2007, 11:08 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR