Blog
The Antropy OpenCart Blog
Why You Shouldn’t Edit the Default Theme Using the Theme Editor
While using the OpenCart Theme Editor seems like a quick and easy way to modify the looks of your site, It’s generally not a good idea to use the Theme Editor, as it can have unwanted consequences to your site.
In this article, I will go over the reasons why you should not use the Theme Editor, with some guidelines on what might be exceptions to that rule.
-
It is quite likely to cause issues with extension compatiblity
The OCMod and VQMod modification systems used in OpenCart extensions and modifications is used to make modifications to existing OpenCart files to add the extension's functionality to a shop. When a file is edited with the Theme Editor, any modification made to the file is ignored. This is an even worse problem than the one described in the blog article Why You Should Not Modify Core OpenCart Files, as this doesn't simply have a chance to cause extensions to stop working, but instead guarantees that any extension that makes a modification to that particular file will simply have no effect. - It can easily causes issues due to lack of knowledge
Using the Theme Editor requires some knowledge of HTML and Twig Syntax, as this is what the template files are written in. While small changes to a template file alone might be fine, complex modifications to a shop generally require a more general look into the functionality required, and the ease of use of the Theme Editor can lead to mistakes and problems that can take quite a lot more effort to identify and then fix than what would be required to implement any such modification from scratch by an experienced developer.
- When you might want to use the theme editor
While keeping in mind the reasons listed here, if the theme editor is used in a small shop with no installed extensions, by someone with at least some familiarity with Twig and HTML, and any future development work on the site is given clear guidance on the fact that the Theme Editor was used and where, it can be a tool for small modifications to a shop's looks without necessarily causing any future issues.
Given the reasons listed, It is generally not a good idea to use the Theme Editor. Generally, modifications to default theme files should be made instead using the OCMod system. An useful tool for building your own OCMods is the official documentation:
https://github.com/opencart/opencart/wiki/modification-system