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.
Re: Everything that should be done for the override system
Re: Everything that should be done for the override system
so it is just the template
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 ...
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.
Re: Everything that should be done for the override system
The links I gave you are for the template and override systems.
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!
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.
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 byincludes/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
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. :)