Pixefora D Posted September 4, 2018 Share Posted September 4, 2018 (edited) Hola! Estoy programando un nuevo módulo y necesito integrar en él un nuevo template. He creado los siguientes archivos: pixeincidencereport/mails/en/new_incidence.html pixeincidencereport/mails/en/new_incidence.txt Y la llamada al correo es de la siguiente forma: public function sendMail($action){ Mail::Send((int)(Configuration::get('PS_LANG_DEFAULT')), // defaut language id 'new_incidence', // email template file to be use ' Module Installation', // email subject array( '{email}' => '[email protected]',//Configuration::get('PS_SHOP_EMAIL'), // sender email address '{message}' => ' has been installed on:'._PS_BASE_URL_.__PS_BASE_URI__ // email content ), '[email protected]', // receiver email address NULL, NULL, NULL); } Pero siempre recibo el siguiente error, y es que busca el template en la ruta de prestashop: Error - dont found the email template : /home/userred/public_html/prestashopruebas/mails/es/new_incidence.txt ¿Cómo puedo hacer esto? Gracias!! ----ARREGLADO--- Solo debes pasar el template_path como parametro en el método estatico Mail::send Mail::Send((int)(Configuration::get('PS_LANG_DEFAULT')), // defaut language id 'new_incidence', // email template file to be use ' Module Installation', // email subject array( '{email}' => '[email protected]',//Configuration::get('PS_SHOP_EMAIL'), // sender email address '{message}' => ' has been installed on:'._PS_BASE_URL_.__PS_BASE_URI__ // email content ), '[email protected]', // receiver email address NULL, NULL, NULL,NULL,NULL,_PS_MODULE_DIR_.$this->name.'/mails/'); Edited September 4, 2018 by kurungele (see edit history) 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