ietax Posted March 16, 2014 Share Posted March 16, 2014 Hi, when i create a credit slip PS send mail to customer. How can I disable this? Thanks. Link to comment Share on other sites More sharing options...
HavanA Posted March 16, 2014 Share Posted March 16, 2014 I think you can do that in (backoffice obviously): Orders - statusses, then go to the item for credit slip en disable the email message. Link to comment Share on other sites More sharing options...
ietax Posted March 16, 2014 Author Share Posted March 16, 2014 Thanks, there isn't item for credit slip in statusses... Link to comment Share on other sites More sharing options...
HavanA Posted March 16, 2014 Share Posted March 16, 2014 Search for refund, I guess that will be the correct translation (from Dutch to English). Link to comment Share on other sites More sharing options...
ietax Posted March 16, 2014 Author Share Posted March 16, 2014 Nothing... there is nothing..:! Link to comment Share on other sites More sharing options...
HavanA Posted March 16, 2014 Share Posted March 16, 2014 Doesn't your BO look like this? Link to comment Share on other sites More sharing options...
ietax Posted March 16, 2014 Author Share Posted March 16, 2014 Yes, i disabled mail but it send to customer. I think there is not a status config.. Link to comment Share on other sites More sharing options...
Christiaan_01 Posted May 8, 2015 Share Posted May 8, 2015 (edited) A bit late, but if others are searching, here's the solution.In controllers/admin/ find the file AdminOrdersController.php On line 956 (depending on version - else search for 'credit_slip') remove this piece of code: @Mail::Send( (int)$order->id_lang, 'credit_slip', Mail::l('New credit slip regarding your order', (int)$order->id_lang), $params, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop ); Edited May 8, 2015 by Christiaan_01 (see edit history) Link to comment Share on other sites More sharing options...
CrossY Posted June 8, 2015 Share Posted June 8, 2015 A bit late, but if others are searching, here's the solution. In controllers/admin/ find the file AdminOrdersController.php On line 956 (depending on version - else search for 'credit_slip') remove this piece of code: @Mail::Send( (int)$order->id_lang, 'credit_slip', Mail::l('New credit slip regarding your order', (int)$order->id_lang), $params, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop ); Thanks! Exactly what I was looking for. Link to comment Share on other sites More sharing options...
Aris S. Posted February 11, 2016 Share Posted February 11, 2016 Thanks, also what I was looking for. To adjust it the 'clean' way you can override the Mail class: class Mail extends MailCore { 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, $reply_to = null) { // Don't send an email a credit slip is created (not configurable in backoffice) if ($template == 'credit_slip') { return true; } return parent::Send($id_lang, $template, $subject, $template_vars, $to, $to_name, $from, $from_name, $file_attachment, $mode_smtp, $template_path, $die, $id_shop, $bcc, $reply_to); } } 1 Link to comment Share on other sites More sharing options...
Maaike Posted April 13, 2018 Share Posted April 13, 2018 I Like to do the same thing. Disable the sendig of this mail. But when I take the first option. I still see in the mail-list a mail is send. Wich file do I open to change it for the second option? Link to comment Share on other sites More sharing options...
MageryThemes Posted May 16, 2019 Share Posted May 16, 2019 Overriding of MailCore class is not the best option. It's better to use hooks. You can use standard actionEmailSendBefore hook to disable email notification. If you are interested, we have a paid module for disabling emails. Link to comment Share on other sites More sharing options...
ANGELO Vintage Posted May 25, 2019 Share Posted May 25, 2019 On 5/16/2019 at 10:24 PM, MageryThemes said: Overriding of MailCore class is not the best option. It's better to use hooks. You can use standard actionEmailSendBefore hook to disable email notification. If you are interested, we have a paid module for disabling emails. on 1.6.x version i think that actionEmailSendBefore is not implemented yet is why mail override is necessary Link to comment Share on other sites More sharing options...
Pedro Posted July 24, 2020 Share Posted July 24, 2020 any solution for the prestashop 1.7? This solution doesn't work for me. Thanks Link to comment Share on other sites More sharing options...
zanpo Posted October 12, 2021 Share Posted October 12, 2021 For PS 1.7.7.8 the new file is located in /src/Adapter/Order/Refund/OrderSlipCreator.php Comment out this piece: @Mail::Send( (int) $orderLanguage->getId(), 'credit_slip', $this->translator->trans( 'New credit slip regarding your order', [], 'Emails.Subject', $orderLanguage->locale ), $params, $customer->email, $customer->firstname . ' ' . $customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int) $order->id_shop ); 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