Jump to content

Tracking number in "Shipped" email Prestashop 1.7.5


Bartek

Recommended Posts

Hello,
I am looking for a solution how can I add "Tracking number" to the "Shipped" e-mail in Prestashop 1.7.5 I was looking for a solution and tried to do it but nothing works please help

Does anyone have a solution to this problem?

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

Go to file: classes\order\OrderHistory.php

Change function: sendEmail

From line 489, change $data

From

$data = array(
'{lastname}' => $result['lastname'],
'{firstname}' => $result['firstname'],
'{id_order}' => (int) $this->id_order,
'{order_name}' => $order->getUniqReference(),
);

To

$data = array(
'{lastname}' => $result['lastname'],
'{firstname}' => $result['firstname'],
'{id_order}' => (int) $this->id_order,
'{order_name}' => $order->getUniqReference(),
'{shipping_number}' => $order->getWsShippingNumber(),
);

Then open mails\en\shipped.html

Insert {shipping_number} to any place you want display it

 

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

  • 5 months later...
On 5/15/2019 at 5:04 AM, tdsoft said:

Go to file: classes\order\OrderHistory.php

Change function: sendEmail

From line 489, change $data

From


$data = array(
'{lastname}' => $result['lastname'],
'{firstname}' => $result['firstname'],
'{id_order}' => (int) $this->id_order,
'{order_name}' => $order->getUniqReference(),
);

To


$data = array(
'{lastname}' => $result['lastname'],
'{firstname}' => $result['firstname'],
'{id_order}' => (int) $this->id_order,
'{order_name}' => $order->getUniqReference(),
'{shipping_number}' => $order->getWsShippingNumber(),
);

Then open mails\en\shipped.html

Insert {shipping_number} to any place you want display it

Read more our posts for How to modify an email template of Prestashop: https://buy-addons.com/blog/create-new-token-insert-new-code-prestashop-email-template/

Thank you so much! This worked like a charm!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 4 weeks later...
  • 1 year later...
  • 8 months later...

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...