Answer the question
In order to leave comments, you need to log in
How does an OpenCart template work?
I can not enter the principles of the OpenCart template.
1. In the public_html/catalog/ folder are the source template files, right? These files are used when the site is running if they are not in storage/modification/catalog/ right?
2. In the storage/modification/catalog/ folder, the template files after applying modifiers to them, i.e., those that are used when the site is running, right? These files are replaced if I click "Update modifiers" in the admin panel, right?
3. If I try to edit the template from the admin panel through the editor, then the file does not change either in public_html/catalog/ or in storage/modification/catalog/ where is it written? in cache?
In general, how to work with all this stuff? I correctly understood that if I want all changes to be saved after updating the modifiers and clearing the cache, I must edit the theme files directly in public_html/catalog/, be sure to use FTP (well, or through the hosting PU), and not from the admin panel and after editing in admin panel delete theme cache and update modifiers?
Answer the question
In order to leave comments, you need to log in
so it looks like you wrote everything correctly:
1. Yes /catalog/ - initial template.
2. storage/modification/ - ready files after applying modifiers.
3. If you edit through the admin panel, then the changes are saved in the oc_theme database, and loaded from there. By the way, there is a separate "theme" cache https://disk.yandex.com/i/fmy0H_BzA-Zpjg , try resetting it if the changes made are not visible.
IMHO, of course, it's easier to change data in ftp in /catalog/. After editing, update the modifiers and, if necessary, the cache. If you need to quickly look at certain changes, you can make temporary edits directly to the folder with modifiers - otherwise it sometimes takes a while to clear the modifiers a hundred times, but then I made it - I looked - it's normal, then I already rewrote it to the main file in /catalog/
ps if it's important , so that changes are not overwritten when updating, say, themes or cms, it is better to make them modifiers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question