![]() |
Enter tracking number on order list page mod
Here is a small mod that made my life easier. It allows you to enter the tracking number right on the order list page instead of having to go to each order to enter the number. This is working in a 4.0.17 x-cart and has worked since 4.0.8. It will probably work in any 4.0.x version and MAY work in 3.x
YOU SHOULD ALWAYS MAKE A BACKUP BEFORE CHANGING AND ADD COMMENTS TO ANY CHANGES SO THAT YOU CAN FIND THEM LATER. I always make a copy of the original file with the same name and the date as yymmdd as a suffix. This mod uses a label called lbl_tracking_number which is set to "Tracking number". I'm not sure if this comes with x-cart or if I added it. So if you don't see it, you need to add it. Make a backup copy of and edit the file skin1/main/orders_list.tpl Find this line Code:
{assign var="colspan" value=6} And change to Code:
{assign var="colspan" value=7} Find this line Code:
<TD nowrap>{if $search_prefilled.sort_field eq "status"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}{$lng.lbl_status}</TD> And add this line just after it Code:
<td class="ProductTitle" width="10%" nowrap>{$lng.lbl_tracking_number|upper}</td> Find this line Code:
{assign var="colspan" value=7} And change it to Code:
{assign var="colspan" value=8} Find these lines And add these lines after Code:
<td nowrap> Now make a copy of and edit the file include/process_order.php Find this line Code:
if ($mode == "update") { And add this code after it Code:
|
Excellent, so much quicker now when i have to input the tracking numbers
I can confirm it works on 4.0.5 |
tracking
hi. thanks for the mod. doe this work on x-cart version 4.0.18
thanks x-cart version 4.0.18 Linux |
I would think so. Make your backup file copies and you can back out the change very easily.
|
Yes it works on 4.0.18.
|
we are having trouble with this mod. it seems as if the tracking numbers are being stored with the wrong customer.
i am fairly new to xcart and am not sure how to add a label as you stated i may need to do. any help would be greatly appreciated. thanks eric |
it seems as though after i have added this mod, i cannot update order status from the order list page now. i am now trying to revert back to the original code, but i get the same problem.
any help? {* $Id: orders_list.tpl,v 1.7.2.3 2005/09/30 07:21:25 svowl Exp $ *} {assign var="total" value=0.00} {assign var="total_paid" value=0.00} {if $orders ne ""} {capture name=dialog} <DIV align="right">{include file="buttons/button.tpl" button_title=$lng.lbl_search_again href="orders.php"}</DIV> {include file="customer/main/navigation.tpl"} <SCRIPT type="text/javascript" language="JavaScript 1.2"> <!-- checkboxes_form = 'processorderform'; checkboxes = new Array({foreach from=$orders item=v key=k}{if $k > 0},{/if}'orderids[{$v.orderid}]'{/foreach}); --> </SCRIPT> {include file="change_all_checkboxes.tpl"} <DIV style="line-height:170%">{$lng.lbl_check_all} / {$lng.lbl_uncheck_all}</DIV> <TABLE border="0" cellpadding="2" cellspacing="1" width="100%"> <FORM action="process_order.php" method="POST" name="processorderform"> <INPUT type="hidden" name="mode" value=""> {assign var="colspan" value=6} <TR class="TableHead"> <TD width="5"></TD> <TD width="5%" nowrap>{if $search_prefilled.sort_field eq "orderid"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}#</TD> <TD nowrap>{if $search_prefilled.sort_field eq "status"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}{$lng.lbl_status}</TD> <TD width="30%" nowrap>{if $search_prefilled.sort_field eq "customer"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}{$lng.lbl_customer}</TD> {if $usertype eq "A" and $single_mode eq ""} {assign var="colspan" value=7} <TD width="20%" nowrap>{if $search_prefilled.sort_field eq "provider"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}{$lng.lbl_provider}</TD> {/if} <TD width="20%" nowrap>{if $search_prefilled.sort_field eq "date"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}{$lng.lbl_date}</TD> <TD width="20%" align="right" nowrap>{if $search_prefilled.sort_field eq "total"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}{/if}{$lng.lbl_total}</TD> </TR> {section name=oid loop=$orders} {math equation="x + ordertotal" x=$total ordertotal=$orders[oid].total assign="total"} {if $orders[oid].status eq "P" or $orders[oid].status eq "C"} {math equation="x + ordertotal" x=$total_paid ordertotal=$orders[oid].total assign="total_paid"} {/if} <TR{cycle values=", class='TableSubHead'"}> <TD width="5"><INPUT type="checkbox" name="orderids[{$orders[oid].orderid}]"></TD> <TD>#{$orders[oid].orderid}</TD> <TD nowrap> {if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Module ne "")} <INPUT type="hidden" name="order_status_old[{$orders[oid].orderid}]" value="{$orders[oid].status}"> {include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]"} {else} {include file="main/order_status.tpl" status=$orders[oid].status mode="static"} {/if} {if $active_modules.Stop_List ne '' && $orders[oid].blocked eq 'Y'} [img]{$ImagesDir}/no_ip.gif[/img] {/if} </TD> <TD>{$orders[oid].firstname} {$orders[oid].lastname} ({$orders[oid].login})</TD> {if $usertype eq "A" and $single_mode eq ""} <TD> {$orders[oid].provider} </TD> {/if} <TD nowrap>{$orders[oid].date|date_format:$config.Appearance.date_format}</TD> <TD nowrap align="right"> {include file="currency.tpl" value=$orders[oid].total} </TD> </TR> {/section} <TR> <TD colspan="{$colspan}">[img]{$ImagesDir}/spacer.gif[/img]</TD> </TR> <TR> <TD colspan="{$colspan}" align="right">{$lng.lbl_gross_total}: {include file="currency.tpl" value=$total}</TD> </TR> <TR> <TD colspan="{$colspan}" align="right">{$lng.lbl_total_paid}: {include file="currency.tpl" value=$total_paid}</TD> </TR> <TR> <TD colspan="{$colspan}"> {include file="customer/main/navigation.tpl"} {if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)} <INPUT type="button" value="{$lng.lbl_update_status}" onclick="document.processorderform.mode.value='upd ate';document.processorderform.submit();"> {/if} <INPUT type="button" value="{$lng.lbl_invoices_for_selected}" onclick="document.processorderform.mode.value='inv oice';document.processorderform.target='invoices'; document.processorderform.submit();document.proces sorderform.target='';"> {if $usertype ne "C"} <INPUT type="button" value="{$lng.lbl_labels_for_selected}" onclick="document.processorderform.mode.value='lab el';;document.processorderform.target='labels';doc ument.processorderform.submit();document.processor derform.target='';"> {/if} {if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)} <INPUT type="button" value="{$lng.lbl_delete_selected}" onclick="if(confirm('{$lng.txt_delete_selected_ord ers_warning|strip_tags}')){ldelim}document.process orderform.mode.value='delete'; document.processorderform.submit();{rdelim}"> {/if} {if $usertype ne "C"} <TABLE border="0" cellpadding="2" cellspacing="1"> <TR> <TD class="FormButton" nowrap>{$lng.lbl_export_file_format}:</TD> <TD width="10"></TD> <TD> <SELECT name="export_fmt"> <OPTION value="csv_tab"{if $search_prefilled.export_fmt eq "csv_tab"} selected{/if}>CSV {$lng.lbl_with_tab_delimiter}</OPTION> <OPTION value="csv_semi"{if $search_prefilled.export_fmt eq "csv_semi"} selected{/if}>CSV {$lng.lbl_with_semicolon_delimiter}</OPTION> <OPTION value="csv_comma"{if $search_prefilled.export_fmt eq "csv_comma"} selected{/if}>CSV {$lng.lbl_with_comma_delimiter}</OPTION> {if $active_modules.QuickBooks eq "Y"} {include file="modules/QuickBooks/orders.tpl"} {/if} </SELECT> <INPUT type="button" value="{$lng.lbl_export_selected}" onclick="document.processorderform.mode.value='exp ort';document.processorderform.submit();"> </TD> </TR> </TABLE> {$lng.txt_export_all_found_orders_text} <INPUT type="button" value="{$lng.lbl_export_all_found}" onclick="document.processorderform.mode.value='exp ort_found';document.processorderform.submit();"> {/if} </TD> </TR> </FORM> </TABLE> {/capture} {include file="dialog.tpl" title=$lng.lbl_search_results content=$smarty.capture.dialog extra="width=100%"} {/if} |
Have you edited those two templates before or are they the same as the default installation templates???
If you havent changed them before why not just copy over them with the ones in the distro? and see what happens (backup your existing ones first of course) |
i replaced them with the original distro versions, still the same thing, order status doesnt update from order list page
|
Ok you must of changed something else as well, as the above mod only changes those two files and nothing else.
I'd open a support ticket with x-cart to take a look |
To add a label, in the administrator, go to "Languages", choose your language, select "Labels" then down toward the bottom add the label name and text for the label then update.
|
Excellent, Thanks for sharing. Work well with 4..0.11
|
Just got this working sweetly on my site 4.0.18. Thanks so much for this!
|
Almost there ***Solved***
I have followed the changes closely and unfortunately it is refusing to update the shipping reference in the order list.
I am not sure as to why it isn't working, becuase I only edited the two files as specified. Here is my code from the xcart_dir/include/process_orders.php file Code:
if ($mode == "update") { This is the code from the orders_list.tpl file Code:
<td {include file="main/order_colours.tpl"} nowrap> Any help would be greatly appreciated. Edit: I have solved this problem, it seems my webhost has a seperate files section for the secure and unsecure sections of the website. The system works fine in the unsecure side, I just have to update the files on the secure side and it will work everywhere. |
I have just installed on our site and have 1 problem, all looks fine from the customer side but the table is out of line in the admin as shown in the screenshots below.
Customer: http://www.bitzdirect.com/store/customer.jpg Admin: http://www.bitzdirect.com/store/admin.jpg For some reason it will not show the tracking column so all information has moved to the left from other columns with a blank white space under total. Any ideas. Thanks |
Just applied this mod to 4.1.2 and it works perfect, thanks! =D>
|
Re: Enter tracking number on order list page mod
Works a treat 4.014 cheers.
|
Re: Enter tracking number on order list page mod
Working perfectly with 4.0.19. Thank you!
|
Re: Enter tracking number on order list page mod
Richard thank you very much for contributing this very useful mod. The one problem I am having with it is that it is also showing in the customer / members area. Do you know what I can do to remove from customer view?
|
Re: Enter tracking number on order list page mod
Balinor was kind enough to provide the following answer for me:
{if $usertype ne "C"} display code {/if} Display Code = code you want kept from customer view. |
Re: Enter tracking number on order list page mod
Excellent Mod. A must have for xcart.
|
Re: Enter tracking number on order list page mod
Thank you, works great in 4.1.7
|
Re: Enter tracking number on order list page mod
Tried the mod and it works great...the only thing that doesn't seem to work is that if an order has already been processed (payment by paypal), i then go and enter the tracking # and update the page, the customer isn't emailed with the tracking #. BUT if i enter the tracking #, then fail the order, then process it again, they get an email with the tracking #
Any ideas? |
Re: Enter tracking number on order list page mod
A customer email is only sent when status changes to certain values. What we do is set the tracking number then set the status to "complete" then update. That sends an email to cust.
|
Re: Enter tracking number on order list page mod
Not working on 4.1.9. It's there, but I'm unable to enter tracking numbers and it won't allow the cursor to go in the box to type in a number.
|
Re: Enter tracking number on order list page mod
Quote:
When you set it to complete does it automatically set the products to shipped? I also normally put a note of the postage day in the notes box, but that means opening up the order details.. which this mods trys to get around.. is it possible to have a pop up box I can use that will write the info into the notes box? The box I use is admin notes so the customer can not see it. |
All times are GMT -8. The time now is 11:54 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.