_Nicola_ Posted July 2, 2013 Share Posted July 2, 2013 ciao a tutti, da un mio modulo creo un override, e da quel file devo mandare una mail con un template che c'è nel mio modulo, ma non riesco a fargli trovare il template. qualcuno sa come si può fare? Link to comment Share on other sites More sharing options...
Codencode Posted July 2, 2013 Share Posted July 2, 2013 Devi passare il parametro "template_path" al metodo Send della classe Mail. Come valore prova con dirname(__FILE__).'/mails/' Link to comment Share on other sites More sharing options...
_Nicola_ Posted July 3, 2013 Author Share Posted July 3, 2013 ma cosi lui va in cerca dei template in '/override/controllers/front/mails/it/allert.txt' perchè il file che invia le mail è un override Link to comment Share on other sites More sharing options...
Codencode Posted July 3, 2013 Share Posted July 3, 2013 E allora fai così: _PS_MODULE_DIR_."nome_del_modulo/nome_del_template_email" Link to comment Share on other sites More sharing options...
_Nicola_ Posted July 3, 2013 Author Share Posted July 3, 2013 funziona...avevo usato gia _PS_MODULE_DIR_ ma sbagliavo posizione del parametro. qualcuno sa come è possibile mandare mail multiple? in php io passo una stringa "[email protected];[email protected];[email protected]" e la manda a tutti e tre, ma prestashop mi dice che la variabile che passo è corrotta... Link to comment Share on other sites More sharing options...
Codencode Posted July 3, 2013 Share Posted July 3, 2013 Ti dice che è corrotta perchè al metodo Send se come destinatario passi una stringa, il sistema lo interpreta come unico destinatario, quindi per inviare l'email a più indirizzi, devi passare il parametro destinatario come array. Link to comment Share on other sites More sharing options...
_Nicola_ Posted July 3, 2013 Author Share Posted July 3, 2013 grazie codencode 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