Future Request

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #10162

Hi, Would it be possible to add a box in 'Customer Account' 'View My Orders' 'Order' so a hyperlink to the shipping tracking / number can be added?

thanks

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 9 months ago #10175

If you have always one package per order, it should be quite easy to add a tracking URL.

First, create a custom order field via the menu Display->Custom fields and have it show only on the form of the backend. That will enable you to enter a tracking number in the back end for your orders.

Then, you can modify the file show of the view order of the front end via the menu Display->Views and add some code like this (supposing that the column name of your custom field is order_tracking_number ) :

<?php
if(!empty($this->element->order_tracking_number)){
echo ' Track your item: <a href="http://URL_OF_TRACKING_SERVICE'.$this->element->order_tracking_number.'">'.$this->element->order_tracking_number.'</a>';
}
?>

For example, for USPS the tracking URL is this: trkcnfrm1.smi.usps.com/PTSInternetWeb/In...rigTrackNum=00000000
So you would have the code:

<?php
if(!empty($this->element->order_tracking_number)){
echo ' Track your item: <a href=" trkcnfrm1.smi.usps.com/PTSInternetWeb/In...rigTrackNum='.$this- >element->order_tracking_number.'">'.$this->element->order_tracking_number.'</a>';
}
?>

Please Log in or Create an account to join the conversation.

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #10184

Hi, tried this in various positions but cannot get it to show in the customer account order page? can you advise the position in order-show please.

thanks

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 9 months ago #10185

After the order number seems like a good place. So after that code:
<?php if($this->invoice_type=='order'){
echo JText::_('HIKASHOP_ORDER');
}else{
echo JText::_(strtoupper($this->invoice_type));
}
echo ': '.@$this->element->order_number;
?>

Please Log in or Create an account to join the conversation.

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
13 years 9 months ago #10196

sorted thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum