Jump to content

How can we add tracking url variable to "shipped" mail template


Recommended Posts

  • 2 weeks later...

I just did this, open up your shipped e-mail template in the language you are using, for english it is in /mail/en/

 

Then just add the following where you want your tracking URL to show up,

 

<a href="{followup}">{followup}</a>

 

So for example you can put:

 

Your tracking information is: <a href="{followup}">{followup}</a>
Link to comment
Share on other sites

  • 4 weeks later...

i need it too! but this code

Your tracking information is: <a href="{followup}">{followup}</a>

only add a URL to truck number.

 

how show in shipped.html template  Truck number (shipping number) as such? 

command {shippingnumber} not work

Link to comment
Share on other sites

HI friends,

 

I'm using stamps pro to print the labels. When i print a label the tracking number is not updated in the webstore. The stamps.com doc says

"Stamps.com will automatically post back to your web store and shopping cart account information data like tracking number and shipping cost. This allows you to easily let your customers know that an order has shipped."

 

All i want to know is how can i insert the tracking number in my webstore after i print the label frm the stamps pro software automatically

Link to comment
Share on other sites

i need it too! but this code

Your tracking information is: <a href="{followup}">{followup}</a>

only add a URL to truck number.

 

how show in shipped.html template  Truck number (shipping number) as such? 

command {shippingnumber} not work

 

I searched a lot and finally I found. You should made some changes on the core. {shipping_number} is not defined for "shipped.html or shipped.txt" We have to define it for " order status mails"

 

This method works on 1.5.4.1

 

To define it, go to controllers/admin/AdminOrdersController and change this;

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

To this;

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

With this way we defined the shipping_number variable for mails. 

  • Like 7
Link to comment
Share on other sites

  • 4 months later...
  • 9 months later...

hi,
 
I'm running 1.6.0.9 and applied the modifications above to disable the in_transit email. It's working and I also can use the <a href="{followup}">{followup}</a> code to show up the tracking-link in shipped email template.

 

The problem is, the link apperear like that:

 

http://adminXXXXXX/http://www.TRACKINGURL

 

So I need to remove the "http://adminXXXXXX/". How to do that?

Link to comment
Share on other sites

  • 11 months later...

Learned many topics regarding - How to add {shipping_number} variable into shipped email template 

 

Tracking No should be inserted by Admin before changing status to SHIPPED

 

 

I searched a lot and finally I found. You should made some changes on the core. {shipping_number} is not defined for "shipped.html or shipped.txt" We have to define it for " order status mails"

 

This method works on 1.5.4.1

 

To define it, go to controllers/admin/AdminOrdersController and change this;

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

To this;

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

With this way we defined the shipping_number variable for mails. 

 

Trying to locate this piece of code inside the file   ***/controllers/admin/AdminOrdersController.php

 

Found two similar parts of this.  :huh:

 

Can anybody help which part of code to be replaced?...  The first one? Both of them? 

 

Understand I could have add just  '{shipping_number}' => $order->shipping_number

 

Thank You in advance 

 

UPD: I have changed the first piece of code and found white screen in Admin >>> Orders 

Edited by IgorOsnitsky (see edit history)
  • Like 1
Link to comment
Share on other sites

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