The "Extensions → Modifications → Refresh" button doesn't tell you much. Here's what can happen:
- a modification fails to find the needed line, but the refresh still reports "success";
- because of an extra space in the path, the modification doesn't work at all;
- because of an error in the regular expression, the file becomes empty, and a white page appears on the site;
- one modification with
error="abort" silently disables all the ones that come after it; - the refresh fails, and the store is left without a modification cache and in maintenance mode.
To figure this out, you usually have to read ocmod.log and compare files manually. OCT OCMOD Editor shows all of this on one page, before the refresh.
Features
Check without refreshing
- The module applies each modification in memory the same way OpenCart does: the same order, the same rules, the same result byte for byte.
- For each operation, you can see whether it was found, on which line, and what will happen next.
- The refresh time is shown separately for each modification, so a slow one is easy to find.
Finding hidden errors
- A search that will never be found: multiple lines without regex, letter case mismatches.
- A broken regular expression that would empty the file.
- A path that doesn't match any file.
error="abort", which stops all subsequent modifications.- A modification at which the refresh will fail.
- A template overridden in "Design → Theme Editor".
- Two modifications with identical code.
Conflicts between modifications
- A modification that finds its line only because of another one. If you disable the first, the second stops working.
- A modification that overwrites other people's changes.
- Modifications that add code to the same place.
Editor
- XML syntax highlighting and ready-made operation templates.
- The "Check" button shows the result before saving, together with all other modifications.
- Clicking an operation in the results takes you to it in the code.
- You can edit both modifications from the database and the
system/*.ocmod.xml files of templates and modules.
What changed in files
- For each changed file, you can see the difference from the original and which modification wrote each line.
Version history
- Every change to a modification is saved; you can compare it with the current version and restore it in one click.
- Changes made outside the module also get into the history: in "Extension Installer", on the standard modifications page, or by other modules.
Safe refresh
- The new modification cache is built alongside the old one and replaces it in one step, so the store is never left with an empty cache or switched into maintenance mode.
- If the refresh is going to fail, nothing changes.
- Previous caches are kept, and you can return to any of them with one button.
- The mode can also be enabled for the standard "Refresh" button.
Log and diagnostics
ocmod.log, broken down by modifications, files and operations, with a filter "only not found."- Checks of folder permissions, a "stuck" maintenance mode, a stale cache, and the theme editor.
- Clearing caches and a report for technical support.
Emergency link
- If a modification has broken the admin panel, the link works without OpenCart.
- It can disable a modification, restore the previous cache, clear the modification cache, and turn off maintenance mode.
Bulk actions
- Enabling, disabling, exporting and deleting several modifications at once.
- Uploading and exporting
.xml and .ocmod.zip.
Why it's safe for your store
- The module works only through OpenCart events: no own OCMOD and no changes to core files. That's why it works even when the modification cache is broken.
- Actions that change modifications are available only to an administrator with the right to edit "Modifications."
- The module was tested with automated tests on five test stores, as well as on real modifications from eight OCTemplates themes. The module's result is compared byte for byte with the standard OpenCart refresh of each version.
Compatibility
- OpenCart 3.0.4.0–3.0.5.x, ocStore 3.0.4.x, "OpenCart 3 in Ukrainian."
- PHP 7.3 or newer.
- Module admin languages: Ukrainian, English, Russian.
- MIT license, the module is free.
Installation
- "Extensions → Extension Installer" → upload
oct_ocmod_editor.ocmod.zip. - "Extensions → Extensions" → "Modules" → OCT OCMOD Editor → "Install."
- The module will appear in the menu "Extensions → OCMOD Editor."
You don't need to refresh modifications after installation.