Override Engine and OpenCart 3.0.3.6

In OpenCart 3.0.3.6 (since 3.0.3.5 ??)  the Twig was moved to another location, and, OverrideEngine stopped working. Unfortunately, there is no any newer version from author.

Find the code (line 792, version for OpenCart 3.0.3.3):

include_once(DIR_SYSTEM . 'library/template/Twig/Autoloader.php');
Twig_Autoloader::register();
$loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);		
$config = array('autoescape' => false, 'cache'=>false);

and replace with:

$loader = new \Twig\Loader\FilesystemLoader();
$loader->addPath(DIR_TEMPLATE);
$config = array( 'autoescape'  => false, 'cache'	=> false, 'debug' => false, 'auto_reload' => true );

Leave a Reply

Your email address will not be published. Required fields are marked *

Yandex.Metrica