Posts

Showing posts from October, 2020

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. 

Opencart 3.0.2.0 While refereshing Theme cache and SASS cache

I was getting error : Trying to access array offset on value of type null in C:\xampp\htdocs\testoc3020\storage\vendor.scss.inc.php on line 1753 Solution : I changed the code in following file in [your opencart storage folder] /vendor/scss.inc.php in following function. code changed is orange color. protected function sortArgs($prototype, $args) { $keyArgs = array(); $posArgs = array(); foreach ($args as $arg) { if(is_array($arg)){ list($key, $value) = $arg; } else { $value = ""; } $key = (is_array($key) && isset($key[1])) ? $key[1] : null; if (empty($key) || is_null($key)) { $posArgs[] = $value; } else { $keyArgs[$key] = $value; } } if (!isset($prototype)) return $posArgs; $finalArgs = array(); foreach ($prototype as $i => $names) { if (isset($posArgs[$i])) { $finalArgs[] = $posArgs[$i]; continue; } $set = false; foreach ((array)$names as $name) { if (isset($k