Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2006
    Location
    Japan
    Posts
    326
    Plugin Contributions
    1

    Default Everything that should be done for the override system

    Ok, so I have been using zen cart for a while now, well everyday for almost 2 months. I kind of just figured out that I am not using the override system at all. So can I ask, what should be included in this? Is it just part of the template or is there more to this. Should be simple to change, if it’s just the template.

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: Everything that should be done for the override system


  3. #3
    Join Date
    May 2006
    Location
    Japan
    Posts
    326
    Plugin Contributions
    1

    Default Re: Everything that should be done for the override system

    so it is just the template

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,845
    Plugin Contributions
    6

    Default Re: Everything that should be done for the override system

    There are template overrides, language overrides, module overrides, etc. etc. etc.

    Take your time in reading through the WIKI and FAQs and /docs about the templates and overrides ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    May 2006
    Location
    Japan
    Posts
    326
    Plugin Contributions
    1

    Default Re: Everything that should be done for the override system

    in the wiki and also in the faq, I can't find anything with a topic of override system, I can do a search but that gives me way more than I know what to do with. I was just trying to get a list of things, to make a checklist to go through.

  6. #6
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: Everything that should be done for the override system

    The links I gave you are for the template and override systems.

  7. #7
    Join Date
    Mar 2005
    Posts
    142
    Plugin Contributions
    0

    Default Re: Everything that should be done for the override system

    The way I understand this is that everything as it is now is being “called from” the template_default folder UNLESS there is a file with the same name in your CUSTOM TEMPLATE FOLDER. Then this particular file would be called and used. So, keep everything as it is in the template_default folder and only save “changed information” in the CUSTOM template folder. And, make sure if you modify a file located in a sub-folder of “template_default” that you make sure there is a corresponding folder set up in the Custom template as well.

    There is no need to copy the entire template_default contents to your Custom template folder. Only changed files.

    The question I would be asking yourself is what files did you modify and where was the location of the files? If you modified files in the Template Default files instead of COPIES of the files you might be okay with setting up the corresponding folders and copying the files you modified into them. Other people more experienced than I would have to let you know if an UNMODIFIED version of the files has to exist in the template_default folder.

    This is just an explanation of the template overrides. There are other files that can be modified that you would have do treat similarly. For example, I had to recently modify my TPL_Header.PHP file. So I copied the original file into My Custom Template/Common/ folder and modified my copy, leaving the original untouched.

    Hope that helps!

  8. #8
    Join Date
    May 2006
    Location
    Japan
    Posts
    326
    Plugin Contributions
    1

    Default Re: Everything that should be done for the override system

    Quote Originally Posted by mlm2005
    The way I understand this is that everything as it is now is being “called from” the template_default folder UNLESS there is a file with the same name in your CUSTOM TEMPLATE FOLDER. Then this particular file would be called and used. So, keep everything as it is in the template_default folder and only save “changed information” in the CUSTOM template folder. And, make sure if you modify a file located in a sub-folder of “template_default” that you make sure there is a corresponding folder set up in the Custom template as well.

    There is no need to copy the entire template_default contents to your Custom template folder. Only changed files.

    The question I would be asking yourself is what files did you modify and where was the location of the files? If you modified files in the Template Default files instead of COPIES of the files you might be okay with setting up the corresponding folders and copying the files you modified into them. Other people more experienced than I would have to let you know if an UNMODIFIED version of the files has to exist in the template_default folder.

    This is just an explanation of the template overrides. There are other files that can be modified that you would have do treat similarly. For example, I had to recently modify my TPL_Header.PHP file. So I copied the original file into My Custom Template/Common/ folder and modified my copy, leaving the original untouched.

    Hope that helps!
    Ok, thanks, I think I get it now.

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,655
    Plugin Contributions
    25

    Default Re: Everything that should be done for the override system

    Quote Originally Posted by mlm2005
    The way I understand this is that everything as it is now is being “called from” the template_default folder UNLESS there is a file with the same name in your CUSTOM TEMPLATE FOLDER. Then this particular file would be called and used. So, keep everything as it is in the template_default folder and only save “changed information” in the CUSTOM template folder. And, make sure if you modify a file located in a sub-folder of “template_default” that you make sure there is a corresponding folder set up in the Custom template as well.

    There is no need to copy the entire template_default contents to your Custom template folder. Only changed files.

    The question I would be asking yourself is what files did you modify and where was the location of the files? If you modified files in the Template Default files instead of COPIES of the files you might be okay with setting up the corresponding folders and copying the files you modified into them. Other people more experienced than I would have to let you know if an UNMODIFIED version of the files has to exist in the template_default folder.

    This is just an explanation of the template overrides. There are other files that can be modified that you would have do treat similarly. For example, I had to recently modify my TPL_Header.PHP file. So I copied the original file into My Custom Template/Common/ folder and modified my copy, leaving the original untouched.
    This is a nice explanation. You note explicitly that you are referring to template overrides. It's worth re-iterating Ajeh's point earlier that there are also language and module overrides. Although most users will probably not use module overrides, pretty well every user should be using language overrides.

    Language and module overrides operate in the same way as each other, and using the same priciple but a different file structure to template overrides. This often causes confusion.

    Template overrides operate in parallel with template_default. By this I mean that (for example)
    includes/templates/template_default/customer/tpl_header.php
    can be overridden by
    includes/templates/YOUR_TEMPLATE/customer/tpl_header.php
    Language and module overrides however, operate hierarchically. For example to override
    includes/languages/english/meta_tags.php
    you would go to the files location and create a directory with the same name the directory in which your template_info file is located in templates and then place your override file in the new directory, i.e.
    includes/languages/english/YOUR_TEMPLATE/meta_tags.php
    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)

  10. #10
    Join Date
    Mar 2005
    Posts
    142
    Plugin Contributions
    0

    Default Re: Everything that should be done for the override system

    Thank you Kuroi for explaining the rest of the override system. I'm still working on template overrides at this point but know that I'll have much to change using the language overrides. :)

 

 
Page 1 of 2 12 LastLast

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
  •