Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  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
    394
    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
    394
    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,655
    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.
    See and test drive Zen Cart's free templates at zencarttemplates.info

    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

    Default Re: Simple template guide?

    Well, I have to say, despite my frustrations, I keep hearing recommendations for Zen Cart - so I'm going to try and persevere with it as much as possible.

    I'd also like to thank yourself and Bruce for the patient way in which you've replied to my comments - I appreciate that they may not come across in the best light, but I figure you both appreciate the challenges of working with the software, as well as the potential rewards for striving on.

    Will try and do so, and thanks again for the helpful replies.

  8. #8
    Join Date
    May 2005
    Location
    Cheshire, UK
    Posts
    542
    Plugin Contributions
    3

    Default Re: Simple template guide?

    Brian

    Take a deep breath and sit back for a second. As a web developer myself who is used to working with different platforms, I understand your frustration. The Zencart templating system is not automatically intuitive and compared to other systems ti DOES see insane, however there is a method to how everything works.

    1) With a normal html site all you do is edit html pages. With a zencart site your page output is actually built up of different bits depending on where the user is and what request they have made of the zen engine. So, there are lots of files you would have to edit in order to get the desired look. Zencart overcomes this problem by allowing you to over-ride any given file and changing its look.

    2) Template Classic and Template default are the two templates installed when you install zencart for the first time. Classic is tables based and Default uses CSS ID tags. You can mix and match the CSS and tables to achieve a desired look.

    3) You can create your own custom template by naming it in your own templates/mytemplatename folder. Then any modifications you do should be uploaded to this folder.

    4) Templates is how your store looks. It is related to the design. Languages takes care of the content output for title tags, item headers etc.

    5) An over-ride file can be created both for languages and also for templates.

    6) The database holds your product information and store settings.

    7) The stylesheet holds the ID tags and styles for any table, font and TD output

    8) Kuroi's future template uses only CSS (symantec) and no tables. Worth installing that and looking at how it works. Everything in this is stylesheet based.

    9) Purpleshades Template uses a mixture of tables and css styles. Again it is worth looking at this one too.

    10) Zencart is a very powerful engine and once you get to grips with how it carves things up, how the file structure needs to work, and how the CSS stylesheet works you will pretty much be able to coax any design into your store.

    Hope this helps

    JJ

  9. #9
    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

  10. #10
    Join Date
    Oct 2005
    Location
    New Mexico
    Posts
    394
    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

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Template Problems with Ver 1.3.0.1
    By zohe in forum Upgrading from 1.2 to 1.3.x
    Replies: 16
    Last Post: 30 May 2006, 02:42 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
  •