Can anyone help with this please? I'm desperate to get this to work!
The problem is the code which is around line 389 in 'Royal_Mail_And_UkMail_Track_and_Trace_autodb.xml'.
Code: Select all
<operation>
<search position="after"><![CDATA[
'status' => $result['status'],
]]></search>
<add><![CDATA[
'trackcode' => $result['trackcode'],
'trackcode2' => $result['trackcode2'],
]]></add>
</operation>
Keeping the code like above shows no tracking info. If I change this part, it changes the output but I can't figure it out.
I have made a small modification whilst trying to fix the problem above (unsuccessfully), I've altered it so the Tracking number is also displayed on the 'Order Details' page in admin > orders (if one has been entered).
Find:
Code: Select all
<file name="admin/view/template/sale/order_form.tpl">
Insert this on the next line:
Code: Select all
<operation>
<search position="after" offset="1"><![CDATA[
<td id="order_status"><?php echo $order_status; ?></td>
]]></search>
<add><![CDATA[
<!--///////////// Tracking in Order Details ///////////// -->
<?php $i=0;$length=count($histories)-1;foreach ($histories as $history) { ?>
<?php if($i == $length && $history['ukmail_track'] ){ ?>
<tr>
<td><?php echo $entry_track_trace; ?></td>
<td><a href='<?php echo $history['trackcode']; ?>' target="_blank"><b onmouseover="this.style.color='red'" onmouseout="this.style.color=''"><?php echo $history['ukmail_track']; ?></b></a> </td>
</tr>
<?php } ?>
<?php if($i == $length && $history['royalmail_track'] ){ ?>
<tr>
<td><?php echo $entry_track_trace2; ?></td>
<td><a href='<?php echo $history['trackcode2']; ?>' target="_blank"><b onmouseover="this.style.color='red'" onmouseout="this.style.color=''"><?php echo $history['royalmail_track']; ?></b></a> </td>
</tr>
<?php } ?>
<?php $i++; } ?>
<!--///////////// Tracking in Order Details ///////////// -->
]]></add>
</operation>
The only small issue with this is that when the tracking number is entered on the 'Order History' page, you need to refresh the 'Order Details' page so that the updated tracking details appear. If anyone can make this refresh immediately somehow, so that when you go back to order details it has already been updated that would be great!
Hope this comes in handy for someone for now.