Openart 3.0.3.6 twig error Fatal error: Uncaught Twig\Error\LoaderError: Template "extension/import/productimport.twig" is not defined

 Hi,

I was getting an error while including twig file into twig file by this code

{% include 'extension/import/productimport.twig' %}

since this code is working in my Opencart version 3.0.3.3 but not in Opencart version 3.0.3.6

so I fixed it by following way.

Solution: 

I defined a variable in the controller like this. 

$data['productimport'] = $this->load->view('extension/import/productimport', $data);

Then I call this variable in twig file.

{{ productimport }} 

It is working fine. perfectaly

Enjoy 😊 this and save your time. 

Popular posts from this blog

Cant use dump() function in twig files or how to enable debug in opencart twig or print_r alternate use dump() in opencart 3.0

maximum execution time error when importing sql data file since php.ini has been already set max execution time 3000

SEO Custom URL in Opencart