Jump to content

1.6.0.14 Don't Send Email When Adding Tracking Number In Bo


Recommended Posts

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

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

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

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

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 by Pieter (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...