Cooolsport Posted February 25, 2021 Share Posted February 25, 2021 Prestahop 1.6.1.0 Basic Theme If I set the site in another language, english spanish or french, the header menu and cart doesn't work, but once i reload that page error will be hide and display page perfectly. I am getting following error: Fatal error: Call to a member function assign() on null My code is as below: classes\module\Module.php public function display($file, $template, $cache_id = null, $compile_id = null) { if (($overloaded = Module::_isTemplateOverloadedStatic(basename($file, '.php'), $template)) === null) return Tools::displayError('No template found for module').' '.basename($file, '.php'); else { if (Tools::getIsset('live_edit') || Tools::getIsset('live_configurator_token')) $cache_id = null; $this->smarty->assign(array( 'module_dir' => __PS_BASE_URI__.'modules/'.basename($file, '.php').'/', 'module_template_dir' => ($overloaded ? _THEME_DIR_ : __PS_BASE_URI__).'modules/'.basename($file, '.php').'/', 'allow_push' => $this->allow_push )); if ($cache_id !== null) Tools::enableCache(); $result = $this->getCurrentSubTemplate($template, $cache_id, $compile_id)->fetch(); if ($cache_id !== null) Tools::restoreCacheSettings(); $this->resetCurrentSubTemplate($template, $cache_id, $compile_id); return $result; } } Thank you in advance for your help! Link to comment Share on other sites More sharing options...
Cooolsport Posted March 2, 2021 Author Share Posted March 2, 2021 Anybody? Please Help! Link to comment Share on other sites More sharing options...
viet2205hp Posted August 22, 2022 Share Posted August 22, 2022 I got the same error please help me how to fix it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now