Jump to content

Add tracking number code in mail template


Recommended Posts

Hi,

 

I would like to know if there's a way to add the tracking number code (if there's one) into the shipping mail template, some methid that already exist or something?

There's no way to add the link with the shipping number/tracking code With the postal service i use so i thought it would be better if i automatically send it in a mail, but for that i would need the method.

i can edit the code and change it, but i have no advance knowledge on prestashop so i would not be able to write it myself.

 

 

I really appreciate your help!

Link to comment
Share on other sites

Prestashop already have built-in feature to insert Tracking code
But you should set the "Tracking URL" of your carrier

If your carrier doesn't have or doesn't providing Tracking URL, then you can use fake Tracking URL
e.g http://tracking.com@

Then you can modify the email template file in_transit.html to remove the Tracking URL and add/use mail template var {shipping_number} to show the tracking code

Link to comment
Share on other sites

What would the fake url be for?? (I just added the postal service url without the @, would that be the same as your example?)

 

And I tried the var before in v 1.5.4 and faked a purchase to see if it would work, but the mail I recieved only showed me: {shipping_number}

By the way, does the carrier url show somewhere inside the mail? And what is the var I should use in the mail template For it to show?

 

 

Thank you for your answer!!

Link to comment
Share on other sites

If you wanna add a Tracking code to Customer Order, a carrier which selected by customer in his order should have a Tracking URL
And Carrier Tracking URL should be ended with '@'
Back Office > Carrier > Add/Edit

 

If you edit/update carrier (e.g to set Tracking URL), then you should place a new order for testing purpose

The previous order, won't use the same carrier data eventhough it was used the same carrier, because the id_carrier has been updated (changed) but the previous order still use the old id_carrier (stored in database)

 

Try to open email template file in_transit.html

{followup} is a template var for Tracking URL (include tracking code), because the Tracking URL is fake, then you doesn't need this var. Then you will need and use {shipping_number} template var to show only the tracking code (without Tracking URL)

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