ap3 Posted April 27, 2016 Share Posted April 27, 2016 Hello, i use a Leo theme, and i am testing email sending and all emails i have sent have an empty content. I've tried to change MIME format (HTML or TEXT), but content still empty. I've tried too to change email template title by traduction tab in back office, with "no theme selected", default theme, and leo theme, but it sill doesn't work. How can i edit correctly my emails templates ? Thanks in advance. Link to comment Share on other sites More sharing options...
tuk66 Posted April 28, 2016 Share Posted April 28, 2016 Do other emails work? Do you have /themes/your_theme/mails directory? Link to comment Share on other sites More sharing options...
ap3 Posted April 28, 2016 Author Share Posted April 28, 2016 No emails work. And yes i have this folder. I have tested to create my own html file but there are no way to make it work... Thanks in advance... Link to comment Share on other sites More sharing options...
tuk66 Posted April 28, 2016 Share Posted April 28, 2016 Try to rename that directory. This way the built-in email templates should be used. Link to comment Share on other sites More sharing options...
ap3 Posted May 12, 2016 Author Share Posted May 12, 2016 I've tried to rename it, but no changes made. I am looking for a solution in Mail classe (/classes/Mail.php). Thanks in advance Link to comment Share on other sites More sharing options...
ap3 Posted May 13, 2016 Author Share Posted May 13, 2016 I've finally found the solution : My problem was in PaymentModule class, function getEmailTemplateContent at the first line. Prestashop, and I don't know why, can't retrieve the value PS_MAIL_TYPE in ps_configuration with Configuration::get('PS_MAIL_TYPE'). So I've replaced at line 989 the line : $email_configuration = Configuration::get('PS_MAIL_TYPE'); by $email_configuration = Db::getInstance()->getValue("SELECT value from ps_configuration WHERE name='PS_MAIL_TYPE'"); And for the account confirmation mail, go to the line 95 in class Mail.php, function Send, and add after : $configuration = Configuration::getMultiple(array( 'PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME', 'PS_MAIL_SMTP_ENCRYPTION', 'PS_MAIL_SMTP_PORT', 'PS_MAIL_TYPE' ), null, null, $id_shop); the following line : $configuration['PS_MAIL_TYPE'] = Db::getInstance()->getValue("SELECT value from ps_configuration WHERE name='PS_MAIL_TYPE'"); If someone can explain why Configuration get method works for some value and not for few values, even if theses values exist in "ps_configuration" table ... ! My solution is a dirty solution, but it works fine I will marked this topic as "solved" 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