rob84 Posted January 20, 2014 Share Posted January 20, 2014 Hello. I'm trying to understand how can an e-mail sent to shop owner when someone write a comment on a product, using the default PS comment/review module. I tried to add in productcomments.php after line 540 in about: $comment->save(); this code: $template_name = 'approvazione_commento'; $title = "New comment to approve"; $to = "[email protected]"; $toName = "To name"; $from = "[email protected]"; $fromName = "From Name"; Mail::Send($template_name, $title, $to, $toName, $from, $fromName); But no mail is sent. How should be work ? Thanks. Link to comment Share on other sites More sharing options...
NemoPS Posted January 20, 2014 Share Posted January 20, 2014 Where is the template file located? Did you add a txt file along with the html one? I'd try adding dummy parameters till the $die one, set to true, so it dies with an error on failure: public static function Send($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null) Link to comment Share on other sites More sharing options...
rob84 Posted January 20, 2014 Author Share Posted January 20, 2014 Where is the template file located? Did you add a txt file along with the html one? /mails/it/approvazione_commento.html (and .txt) Do I have to substitute this code: Mail::Send($template_name, $title, $to, $toName, $from, $fromName); with yours ? public static function Send($id_lang, $template, $subject, $template_vars, $to, $to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null, $template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null) Thanks. Link to comment Share on other sites More sharing options...
Cornel_M Posted January 31, 2014 Share Posted January 31, 2014 Hi! can somebody tell me, all steps to implement this email alert? is possible to have also in BO a little balloon like new order, customer registration & new message ? Many thx! 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