Jump to content

Tracking number in order history


Recommended Posts

Hi everyone!

I'm using Prestashop v.1.5.2

I'm trying to put tracking number from order details directly to order history (see attachment), but unfortunately I'm not a php coder so I don't know what to put in <td></td> for getting this variable.

I suppose I should add something into HistoryController.php and then edit my history.tpl but I lack the knowledge for it, maybe someone can help me?

Didn't find any similar topics over internet.

post-466656-0-40943800-1360260663_thumb.jpg

Link to comment
Share on other sites

  • 2 months later...
  • 9 months later...

go to /root/themes/themename/order-detail.tpl and add below code
 

<p class="bold">{l s='Tracking No:'} <span class="color-myaccount">{$order->shipping_number}</span></p>

once done..go to your order history and click on details. You will have the tracking no as screenshot below

 

prestashop-tracking-no-insert-into-order

 

 

full steps can be read at http://www.unblockwww.com/solved/prestashop-1-5-add-tracking-no-into-customer-account-order-history/

Link to comment
Share on other sites

  • 4 years later...

Hi,

an old thing, but i also have an question about including the tracking number into the  order-detail.tpl

 

When i write the "Tracking URL"  in the BO (in the shipping services) ,  and write the tracking no.  in an order,  then it works that customers can click on the Tracking no. in their order history  (given from the order-detail.tpl).

The following code is included in my order-detail.tpl :

<span class="shipping_number_show">{if $line.tracking_number}{if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}" target="_blank">{$line.tracking_number}</a>{else}{$line.tracking_number}{/if}{else}-{/if}</span>

 

 

and now...  my problem:

there are two links in the order history for the customer, so this means the tracking link is given twice. 

Once it is below the row

FOLLOW YOUR ORDER'S STATUS STEP-BY-STEP
Date    Status
2018-03-16    your order has been shipped
2018-03-16    Processing, waiting for payment

Click the following link to track the delivery of your order

https://tracking...

and this link does not open the tracking in a new window.

 

And the second is in the lower row below the items details, reference, description and so on:

Date    Carrier    Weight    Shipping cost    Tracking number
2018-03-16    DPD Parcel    0.030 kg    €5.00    01345xyz

 

and this tracking no.  opens in a new window as it should be  :)

 

But how can i delete the first tracking link  OR MAKE IT to open also in a new browser window?  This is very important for me, so hopefully anyone can help with this. 

 

I have now attached a picture  (just an sample),  you can see the problem in the "pink" text.

thank you

post-558341-0-56348300-1385066093.jpg

Edited by DRMasterChief (see edit history)
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...