This is a VQMod based on the original code by Gerrit that was discussed here: http://forum.opencart.com/viewtopic.php?t=24619
I edited the way it is displayed in the Back End, changed it from TNT to Uk Mail and added the ability for it to track a second mail company (Royal Mail)
This mod will add the ability to enter a Royal Mail or Uk Mail tracking number on the order processing screen.
It will then save a clickable link in the order history that will take you directly to the corresponding website of the carrier company and if you select "notify customer" it will also send the customer the tracking link in the order update E-mail.
As part of the update, it will now save a clickable link in the customers order history as well so it doesn't matter if they delete the e-mail etc.
Screenshots:
Full credits go to Gerrit, he did all the hard work and I just modified it to suit my needs.
EDIT 18th Feb 2011:
The most recent version is attached to this post
Cheers
Gaz
Attachments
I'm using a customer order_update.tpl template from the extensions directory (Notify Customer Email Template). So, I need to add some code to the template in order to have the trackcodes show ( only if, they are entered in admin).
This is what the code for the "comments" looks like in the template:
Code: Select all
<?php if ($comment){ ?>
<tr>
<td align="left" style="background-color: #069; color: #FFF; font-size: 12px; font-weight: bold; padding: 0.5em 1em;"><?php echo $text_comment; ?></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="left"><?php echo $comment; ?></td>
</tr>
<?php } ?>
I did try looking in the xml filed and the other thread, but couldn't find the code that I might be able to copy/paste to make it work.
Thanks.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
PM Incomingphilbydevil wrote:Hey Gaz, this is great, exactly what I've been looking for. The admin side of things is all working, but I do have a question relating to the email that is sent out when 'notify' is selected (ie. order update).
I'm using a customer order_update.tpl template from the extensions directory (Notify Customer Email Template). So, I need to add some code to the template in order to have the trackcodes show ( only if, they are entered in admin).
This is what the code for the "comments" looks like in the template:So I'm assuming that I need to duplicate this, but change $comment to something like $trackcode (but that's not it because I tried it already).Code: Select all
<?php if ($comment){ ?> <tr> <td align="left" style="background-color: #069; color: #FFF; font-size: 12px; font-weight: bold; padding: 0.5em 1em;"><?php echo $text_comment; ?></td> </tr> <tr> <td> </td> </tr> <tr> <td align="left"><?php echo $comment; ?></td> </tr> <?php } ?>
I did try looking in the xml filed and the other thread, but couldn't find the code that I might be able to copy/paste to make it work.
Thanks.
Cheers
Gaz
Cheers!
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
So, I changed the last part of Gaz's vQmod to this:
Code: Select all
<file name="catalog/view/theme/YOURTHEME/template/account/invoice.tpl">
<operation>
<search position="replace"><![CDATA[
<table width="536">
]]></search>
<add><![CDATA[
<table width="100%">
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
<th align="left"><?php echo $column_comment; ?></th>
]]></search>
<add><![CDATA[
<th align="left" width="60%"><?php echo $column_comment; ?></th>
<th align="left"><?php echo $column_tracking; ?></th>
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
<td valign="top"><?php echo $history['comment']; ?></td>
]]></search>
<add><![CDATA[
<?php if ($history['trackcode']) { ?>
<td valign="top"><a href='<?php echo 'http://www.business-post.com/scripts/wsisa.dll/ws_quickpod.html?lc_SearchValue='.$history['trackcode']; ?>' target="_blank"><b onmouseover="this.style.color='red'" onmouseout="this.style.color=''">Uk Mail Parcel Tracking<br>#<?php echo $history['trackcode']; ?></b></a></td>
<?php } ?>
<?php if ($history['trackcode2']) { ?>
<td valign="top"><a href='<?php echo 'http://www.royalmail.com/portal/rm/track?trackNumber='.$history['trackcode2']; ?>' target="_blank"><b onmouseover="this.style.color='red'" onmouseout="this.style.color=''">Royal Mail Parcel Tracking<br>#<?php echo $history['trackcode2']; ?></b></a></td>
<?php } ?>
]]></add>
</operation>
</file>
Code: Select all
<?php if ($comment) { ?>
<b style="margin-bottom: 2px; display: block;"><?php echo $text_comment; ?></b>
<div class="content"><?php echo $comment; ?></div>
<?php } ?>
<?php if ($historys) { ?>
<b style="margin-bottom: 2px; display: block;"><?php echo $text_order_history; ?></b>
<div class="content">
<table width="536">
<tr>
<th align="left"><?php echo $column_date_added; ?></th>
<th align="left"><?php echo $column_status; ?></th>
<th align="left"><?php echo $column_comment; ?></th>
</tr>
<?php foreach ($historys as $history) { ?>
<tr>
<td valign="top"><?php echo $history['date_added']; ?></td>
<td valign="top"><?php echo $history['status']; ?></td>
<td valign="top"><?php echo $history['comment']; ?></td>
</tr>
<?php } ?>
</table>
</div>
<?php } ?>
<div class="buttons">
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Could this be modified to universal use? I really need a tracking entry field to be placed in the history file. When a parcel is shipped, the track number is added as a link in the history for the order and the custemer is informed. Custemer could lookup the link in orderhistory from the frontend as well.Qphoria wrote:I've updated it to add an automatic database field installer
Try to do some modification to suit the local shippingservice, but can't make it work.
Any ideas?
I'm having a bit of trouble and the online tracking section isn't appearing under the order history like it does in the screenshot. It is present on the email but not when I log in to my account and try to track from there (which our customers will do).
Can anybody help please?
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
I receive this message at the top of the page:
Notice: Undefined index: trackcode in /site-path/vqmod/vqcache/vqcache_catalog_model_account_order.php on line 87Notice: Undefined index: trackcode2 in /site-path/vqmod/vqcache/vqcache_catalog_model_account_order.php on line 88
Hope this helps!
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
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>
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">
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>
Hope this comes in handy for someone for now.
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
I don't think so. Like I said before, I am very busy at the moment and have not even installed a test version of 1.5 to tinker with.DannyMacD wrote:has anyone managed to get this to work with 1.5.* ?
I am going on holiday shortly but will try and make some time to convert this over to 1.5 when I get back.
Cheers
Gareth
wow this is a really very much nice dud..philbydevil wrote:Big thanks to Gaz for making this vQmod, and also for all of the personal support integrating it with "Notify Customer Email Template".Cheers!
I have no problem paying for an extension but to buy something and then have the very thing be released later for free as part of the core files would be painful
Wedding Invitations and Stationery by Love2print
Commercial Mods
Product Colours on Category Page
Cardsave Direct Gateway
Clear Cache
Promotional Watermarks on Images
Multiple Category / Product Templates ** Popular **
Log Failed Login Attempts
Display Eligible Coupons with Products
Twitter Feeds
Have I helped you out or saved you some time? Please donate
Users browsing this forum: No registered users and 57 guests