OpenCart and Extension Modification system

WOW, we already came to OpenCart and versions. Time flies, right?
I recently installed the latest version for a project and after installing a plugin it does not show anywhere in the store admin section. No errors are displayed whatsoever. If you came across the same issue here is what did the trick for me.

Thanks to the support of the huge OpenCart community I got this fix from a great developer #CartBinder.
This fix should be applied before any actual plugin install, because it fixes the OC bug in the versions and related to the Extension Modification system.

You need the FTP access to the server and find the file modification.xml located in /system/ folder.

Needless to say that you should make a backup of this file before proceeding to the next step.

Delete the content of the file and paste the following code:

<?xml version="1.0" encoding="utf-8"?>
  <name>Modification Default</name>
  <author>OpenCart Ltd</author>
  <file path="system/{engine,library}/{action,loader,config,language}*.php|system/library/template/template.php">
      <search regex="true">
      <add position="replace">
  <file path="system/library/template/twig.php">
        <![CDATA[if (is_file($file)) {]]>
      <add position="replace">
        <![CDATA[if (defined('DIR_CATALOG') && is_file(DIR_MODIFICATION . 'admin/view/template/' . $filename . '.twig')) {	
                $code = file_get_contents(DIR_MODIFICATION . 'admin/view/template/' . $filename . '.twig');
            } elseif (is_file(DIR_MODIFICATION . 'catalog/view/theme/' . $filename . '.twig')) {
                $code = file_get_contents(DIR_MODIFICATION . 'catalog/view/theme/' . $filename . '.twig');
            } elseif (is_file($file)) {]]>

*P.S. Mind the line 4 of this code and change the tag brackets for the code tag, because the plugin that I’m using for displaying the code has a bug with nesting code tags (which are also used by the plugin itself). Note the difference of the <> brackets and just retype them on your keyboard after pasting the code from this page.

Save the file and upload it back to the server.

Now you can install the plugin(s) that you need and press the Refresh button without any errors.

By janoshke

Web developer and IT consultant. Freelancer with full respect for OpenCart and WordPress. Gamer, (ex)drummer and parent.

Leave a Reply