Skip to main content

Future Request

More
15 years 6 months ago #10162 by mohairbears
Future Request was created by mohairbears
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.

More
15 years 6 months ago #10175 by nicolas
Replied by nicolas on topic Re: Future Request
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.'';
}
?>

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.'';
}
?>

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

More
15 years 6 months ago #10184 by mohairbears
Replied by mohairbears on topic Re: Future Request
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.

More
15 years 6 months ago #10185 by nicolas
Replied by nicolas on topic Re: Future Request
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.

More
15 years 6 months ago #10196 by mohairbears
Replied by mohairbears on topic Re: Future Request
sorted thanks

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

Time to create page: 0.243 seconds
Powered by Kunena Forum