Jump to content

Fatal error: Call to undefined method AdminTranslationsController::getEmailHTML()


zicobakker95

Recommended Posts

Hey guys, 

 

I have a problem with the email templates translation tool. After I updated there were a few problems I encountered. One of them is this problem. I can't open my mail template through translation. It just shows me this message: 

 

Fatal error: Call to undefined method AdminTranslationsController::getEmailHTML() in public_html/test/admin/ajax.php on line 128

 

Did any of you encounter this error, or do any of you know an answer? 

 

Would be very appreciated! 

Link to comment
Share on other sites

Make sure that controllers/admin/AdminTranslationsController.php exists and the following function exists at the end of the file:

    public static function getEmailHTML($email)
    {
        if (defined('_PS_HOST_MODE_') && strpos($email, _PS_MAIL_DIR_) !== false) {
            $email_file = $email;
        } elseif (__PS_BASE_URI__ != '/') {
            $email_file = str_replace(__PS_BASE_URI__, '', _PS_ROOT_DIR_.'/').$email;
        } else {
            $email_file = _PS_ROOT_DIR_.$email;
        }

        $email_html = file_get_contents($email_file);

        return $email_html;
    }
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...