Jump to content

Add Tracking Number in Shipped email


Recommended Posts

Hello..

 

I just want to share the way to adding tracking number in the Shipped email which is sent to the customer.

 

I was looking it in the forum, but i don't find any simple solution. I've been looking for hours and so depressed about it. So i decided to share in here, hope it helps guys ;)

 

I'm using Prestashop 1.5.4.1

 

First, edit the file : Root > controllers > admin > AdminOrdersController.php

 

on line 350, you will find this code :

 

$templateVars = array();

 

change to :

 

$templateVars = array('{shipping_number}' => $order->shipping_number);

 

The last step, edit your shipped.html in : Root > mails > en > shipped.html

and place the code {shipping_number} to anywhere you want the Tracking Number displayed.

 

That's all folks! Cheers!

  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
  • 10 months later...
  • 11 months later...
  • 3 weeks later...
  • 5 months later...
  • 4 weeks later...
  • 2 weeks later...

We are all waiting for a solution for 1.6.....

 

https://www.prestashop.com/forums/topic/269324-how-can-we-add-tracking-url-variable-to-shipped-mail-template/?p=1402070

 

It works

if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number)
							$templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url),
						'{shipping_number}' => $order->shipping_number
						);
Edited by dmouradov (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 7 months later...
×
×
  • Create New...