Jump to content

How to add tracking number to email template shipped? (presta 1.6)


Recommended Posts

My shop automatically recieves the tracking number from my carier.

After that, prestashops automatically sends the email "shipped", but this email does not show the trackingnumber.

In the "shipped" email template i try to put the variable 

{followup} but this does not work. Also i tried {shipping_number}.

I found a topic https://www.prestashop.com/forums/topic/268272-add-tracking-number-in-shipped-email/ but this is not for 1.6.x .

How can i manage this?

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

seems nobody knows... i'm also looking for 10 days for a solution.

 

just adding this : <a href="{followup}">{followup}</a>

will not work if you update the status like : 

$order = new Order($id_order);
$order->setCurrentState(4);
 
it will show the link if you resend the email from the BO.... a bit a bumber, since I update tracknumbers every night in batch files....
 
D.
Link to comment
Share on other sites

  • 2 months later...
  • 5 weeks later...
  • 1 month later...

This function should already be present in the Emails, you enter the tracking number on the order page,shipping section and click update and it will send an In transit email with the tracking number to the customer.

 

Yes, but what if you want to show the tracking number separately to the customer?

 

Like, "Your parcel was shipped with the tracking number XXXXXXXXX - you can follow progress of delivery here: (insert link).

 

That's a feature some of us need. I used it in my previous version of Prestashop, but since I updated, the old method no longer works.

 

So I would be interested too in finding out how to include the tracking number in the email, in addition to the full link.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 4 weeks later...
  • 4 months later...
  • 6 months later...

try this http://customprestshoptemplates.blogspot.com.br/2016/03/how-to-add-tracking-number-to.html I did it , version 1.6  and it worked.

You need to find the code in the controllers/admin/AdminOrdersController. Look for the following code

Find this:

($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->shipping_number) {
                            $templateVars = array('{followup}' => str_replace('@', $order->shipping_number, $carrier->url));

 

change it to :

($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);

 After that, put  {shipping_number}  ianywhere in  in_transit.html  file

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

I found a solutin.

 

My Prestashop is 1.6.16

 

I have changed the lines from 409 to 413

$templateVars = array('{shipping_number}' => $order->shipping_number);
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);

and i have edited the "in transit" email template in the BO.

 

I have added {shipping_number} and other details like email template "Shipped"

 

and then unclicked shipped email template from status to not send email to recevier because when you add tracking number the received get all details about order status and tracking nuber and carriers page details.

 

It works perfectly.

 

Best Regards

.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...