<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>So Destino</name>
    <code>so-destino-modification</code>
    <version>3.0.3.6</version>
    <author>OpenCartWorks</author>
    <link>http://www.opencartworks.com</link>
    <file path="system/library/template/twig.php">
        <operation>
          <search>
            <![CDATA[$loader = new \Twig\Loader\ArrayLoader(array($filename . '.twig' => $code));]]>
          </search>
          <add position="replace">
            <![CDATA[       
            $loader = new \Twig_Loader_Filesystem();
            
            if (defined('DIR_CATALOG') && is_dir(DIR_MODIFICATION . 'admin/view/template/')) {  
                $loader->addPath(DIR_MODIFICATION . 'admin/view/template/');
            } elseif (is_dir(DIR_MODIFICATION . 'catalog/view/theme/')) {
                $loader->addPath(DIR_MODIFICATION . 'catalog/view/theme/');
            }
            
            $loader->addPath(DIR_TEMPLATE);]]>
          </add>
        </operation>
      </file> 
    
</modification>