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

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/

  • Like 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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