Jump to content
Bartek

Tracking number in "Shipped" email Prestashop 1.7.5

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?

Share this post


Link to post
Share on other sites

You can insert your variables on email file: mails\en\shipped.html

Share this post


Link to post
Share on other sites

Yes, I've tried to add "{followup}" and "{shipping_number}" but it does not work. Do you have any idea how to do it?

Share this post


Link to post
Share on other sites

Hi Bartek, it seems the variable {followup} is only available in the template "in_transit"

Share this post


Link to post
Share on other sites

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 1
  • Thanks 1

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More