nickosn Posted November 28, 2015 Share Posted November 28, 2015 Hi, I have notest that when I add the tracking number in an order in the BO an email is send to the customer, although the order status is not changed to shipped. After the the status is changed the same email is send again. I don't wan't an email send to the customer when adding the tracking number. How can I remove this feature. Thank you Link to comment Share on other sites More sharing options...
doekia Posted November 28, 2015 Share Posted November 28, 2015 Well the pupose of populating the tracking number is to enable customer to follow their parcel... Why not disable the mail sending on status change rather? Customer will receive only the mail with value added content (the tracking number) Disabling mail sent on status change is configurable on Order/Status The tracking mail is not assumed to be disabled unless "tweaking" the core Link to comment Share on other sites More sharing options...
nickosn Posted November 28, 2015 Author Share Posted November 28, 2015 Well the pupose of populating the tracking number is to enable customer to follow their parcel... Why not disable the mail sending on status change rather? Customer will receive only the mail with value added content (the tracking number) Disabling mail sent on status change is configurable on Order/Status The tracking mail is not assumed to be disabled unless "tweaking" the core Because the parcels are prepared at 14:00 and are send at 20:00. Sometimes it can be the next day. There is no point in inform the customer about that if the parcel is not send. To me it's logical to send the email when the parcel is actually send. (when the status is changed) Prestashop assumes that when I add the the tracking number is added that the parcel is send at that moment (which is not true in our case) This IMO should be configurable. And since it's not I want to disable it 1 Link to comment Share on other sites More sharing options...
nickosn Posted December 1, 2015 Author Share Posted December 1, 2015 I thought this would be an easy one.... Nobody knows how to fix this ? Link to comment Share on other sites More sharing options...
HUHA Posted February 11, 2016 Share Posted February 11, 2016 (edited) I am interresting in this solution to. I dont want prestashop to send an email when i am adding or editing the tracking number in order details Anyone, a little help ? Edited February 11, 2016 by HUHA (see edit history) Link to comment Share on other sites More sharing options...
Pieter Posted March 21, 2016 Share Posted March 21, 2016 (edited) Hi I tried this: go to controllers/admin/AdminOrdersController.php find an delete (line464 in my case) // Send mail to customer $customer = new Customer((int)$order->id_customer); $carrier = new Carrier((int)$order->id_carrier, $order->id_lang); if (!Validate::isLoadedObject($customer)) throw new PrestaShopException('Can\'t load Customer object'); if (!Validate::isLoadedObject($carrier)) throw new PrestaShopException('Can\'t load Carrier object'); $templateVars = array( '{followup}' => str_replace('@', $order->shipping_number, $carrier->url), '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{id_order}' => $order->id, '{shipping_number}' => $order->shipping_number, '{order_name}' => $order->getUniqReference() ); if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars, $customer->email, $customer->firstname.' '.$customer->lastname, null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop)) { Hook::exec('actionAdminOrdersTrackingNumberUpdate', array('order' => $order, 'customer' => $customer, 'carrier' => $carrier), null, false, true, false, $order->id_shop); Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token); } else $this->errors[] = Tools::displayError('An error occurred while sending an email to the customer.'); and it works Edited March 21, 2016 by Pieter (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