X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Detailed Order Management Mod (https://forum.x-cart.com/showthread.php?t=29680)

mesut 03-14-2007 04:59 AM

Detailed Order Management Mod
 
Hi guys,

We've just completed a mod which has abilty to see order details in orders.php

As you know, when you search all your orders on this page the information you get is actually limited. (Order#, Status, Customer name, date and total)

If you are dealing with many orders then you should be clicking every single order to get the whole information (i.e shipping address)

What we did is just to see other details without going order details of course using by java script. Even though if you go to order details you still need to copy address lines one by one. That takes a lot of time. So we did "copy to clipboard" and "copy to filed" sections as well.

Here is the screen shots of this mod.

http://www.protechstore.com/images/a1.jpg

http://www.protechstore.com/images/a2.jpg

http://www.protechstore.com/images/a3.jpg

If you'd like to get it let me know guys, i can post it here.

mesut 03-14-2007 05:45 AM

Re: Detailed Order Management Mod
 
your_xcart_dir/skin1/main/order_info.tpl

After:

Quote:

{include file="main/subheader.tpl" title=$lng.lbl_products_info}

Add:

Quote:

{* genbilim *}
<script language=javascript src="../skin1/main/copy_addr.js"></script>
{* genbilim-end *}

After:

Quote:

<td colspan="2"><i>{$lng.lbl_shipping_address}:</i></td>

Add:

Quote:

{* genbilim *}
{if $usertype eq "A"}
|
<a href="javascript:void(0)"
ship_to="{$order.s_title}{$order.s_firstname} {$order.s_lastname}"
ship_address="{$order.s_address}"
ship_city="{$order.s_city}"
ship_state="{$order.s_state}"
ship_country="{$order.s_country}"
ship_zipcode="{$order.s_zipcode}"
onclick="copyShipAddr(this, true);return false;">
<img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle>Copy To Clipboard</a>
{/if}
</td>
</tr>

<tr valign="top">
<td width="31%">{if $customer.default_fields.s_firstname}&nbsp;&nbsp;{ $lng.lbl_first_name}{/if}</td>
<td width="13%">{if $customer.default_fields.s_firstname}{$customer.s_ firstname}{/if}</td>
<td width="55%" rowspan="10" align="center">
{* genbilim *}
{if $usertype eq "A"}

<a href="javascript:void(0)"
ship_to="{$order.s_title}{$order.s_firstname} {$order.s_lastname}"
ship_address="{$order.s_address}"
ship_city="{$order.s_city}"
ship_state="{$order.s_state}"
ship_country="{$order.s_country}"
ship_zipcode="{$order.s_zipcode}"
onclick="copyAddrToField(this);return false;">
<img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle>Copy To Field</a>

<br>
<textarea cols=40 rows=6 id=ship_addr>
</textarea>
{/if}
{* genbilim-end *}



your_xcart_dir/skin1/main/orders_list.tpl

After:

Quote:

{assign var="total_paid" value=0.00}

Add:

Quote:

{*
genbilim :
Javascript functions to copy the address to the clipboard
*}

<script language=javascript src="../skin1/main/copy_addr.js"></script>
<div id="DIV_CopyInform" style="display:none;"></div>
{* genbilim-end *}


Before:

Quote:

{section name=oid loop=$orders}

Add:

Quote:

{* genbilim
New column for admins to copy the address to the clipboard *}
{if $usertype eq 'A'}
<td align=center width=50>Copy&nbsp;Address</td>
{/if}
{* genbilim-end *}

After:

Quote:

<a href="order.php?orderid={$orders[oid].orderid}">{include file="currency.tpl" value=$orders[oid].total}</a>
</td>

Add:

Quote:

{* genbilim *}
{if $usertype eq 'A'}
<td align=center ><a href="javascript:void(0)"
ship_to="{$orders[oid].s_title}{$orders[oid].s_firstname} {$orders[oid].s_lastname}"
ship_address="{$orders[oid].s_address}"
ship_city="{$orders[oid].s_city}"
ship_state="{$orders[oid].s_state}"
ship_country="{$orders[oid].s_country}"
ship_zipcode="{$orders[oid].s_zipcode}"
onclick="copyShipAddr(this, false);return false;">
<img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle></a></td>
{/if}
</TR>
<tr>
<td colspan=3></td>
<td colspan=4>
<table width=100% cellpadding=5 style="border-collapse:collapse" border=0>
<tr bgcolor=#DDDDCC>
<td>Product</td>
<td>Code</td>
<td align=center>Amount</td>
<td align=center>Stock</td>
</tr>
{foreach item=item from=$orders[oid].item_list}
<tr bgcolor=#CCCCDD>
<td>{$item.product}</td>
<td>{$item.productcode}</td>
<td align=center>{$item.amount}</td>
<td align=center>{$item.avail}</td>
</tr>
{/foreach}
</table>
</td>
</tr>
<TR>
<TD style="padding-top:3px;border-bottom:1px solid black" colspan=12>&nbsp;</TD>
</TR>
<TR>
<TD style="padding-top:3px;" colspan=12>&nbsp;</TD>
{* genbilim-end *}

your_xcart_dir/skin1/main directory

Create copy_addr.js file

Add:

Quote:

var attributes = ['to', 'address', 'city', 'state', 'country', 'zipcode'];
var addrFormat =
"{to}\r\n" +
"{address}\r\n" +
"{city} {state}, {zipcode}";
function findPos(obj)
{
var curleft = curtop = 0;
if (obj.offsetParent) {
curleft = obj.offsetLeft
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
curtop += obj.offsetTop
}
}
return [curleft,curtop];
}
function removeInformation()
{
var div = document.getElementById('DIV_CopyInform');
if (! div)
return;
div.style.display = 'none';
div.innerHTML = '';
}

function getAddr(aObj)
{
var str = addrFormat;
for(var i=0; i<attributes.length; i++)
{
var na = 'ship_' + attributes[i];
var val= aObj.getAttribute(na);
if (typeof val != "undefined")
str = str.replace('{' + attributes[i] + '}', aObj.getAttribute(na));
}

return str;
}

function copyAddrToField(aObj)
{
document.getElementById('ship_addr').value = getAddr(aObj);
document.getElementById('ship_addr').focus();
document.getElementById('ship_addr').select();
}

function copyShipAddr(aObj, quickCopy)
{

var str = getAddr(aObj);

if (str.length > 0 )
{
if (! document.getElementById('DIV_CopyInform') )
document.getElementsByTagName('DIV')[0].innerHTML += '<div id="DIV_CopyInform" style="display:none;"></div>';
var div = document.getElementById('DIV_CopyInform');
div.style.position = 'absolute';
div.innerHTML = '';
div.style.left = (findPos(aObj)[0] + aObj.offsetWidth) + 'px';
div.style.top = findPos(aObj)[1] + 'px';
try
{
if (! quickCopy)
// make it throw an exception
genbilim.style = 'dummy';
window.clipboardData.setData("Text", str);

// Inform the user
div.style.width = '75px';

div.style.backgroundColor = 'pink';
div.style.padding = '3px';
div.style.color = 'black';
div.style.border= '1px solid black';
div.innerHTML = 'Copied';
div.style.display = 'inline';

setTimeout('removeInformation()', 1000);
}
catch(e)
{
div.style.left = (findPos(aObj)[0] + aObj.offsetWidth - 300 - 10 ) + 'px';
div.style.top = (findPos(aObj)[1] + aObj.offsetHeight) + 'px';
div.style.backgroundColor = '#DDDDCC';
div.style.padding = '5px';
div.style.color = 'black';
div.style.border= '1px solid black';
div.style.display = 'inline';
div.innerHTML =
'<table width=300 >' +
'<tr><td align=right><a href="javascript:void(0)" onclick="removeInformation()">Close</a></td></tr>' +
'<tr><td>You can copy (Ctrl+C) the adress manually</td></tr> '+
'<tr><td><textarea id=addr_ta rows=6 cols=50 >' + str + '</textarea></td></tr>';
document.getElementById('addr_ta').focus();
document.getElementById('addr_ta').select();
}
}
}

your_xcart_dir/include/orders.php

After:

Quote:

$orders = func_query("SELECT $sql_tbl[orders].* $search_condition ORDER BY $sort_string LIMIT $first_page, $objects_per_page");

Add:

Quote:

# genbilim
#
# Get the details of each order
#
require_once($xcart_dir. "/include/orders_genbilim.php");
#
# genbilim-end

In your_xcart_dir/include/

create orders_genbilim.php file

Add:

Quote:

<?php
for($i=0; $i<count($orders); $i++)
{
$items = func_query("SELECT od.productid, od.amount, od.productcode,p.product, p.avail
FROM xcart_order_details od
LEFT OUTER JOIN xcart_products p ON p.productid = od.productid
WHERE od.orderid = " . $orders[$i]['orderid']);
$orders[$i]['item_list'] = $items;
}
?>

That's All.

Jerrad 03-14-2007 08:17 AM

Re: Detailed Order Management Mod
 
Thanks for this great looking and usefull mod!
Do you know if it works with version 4.0.x? :D

mesut 03-14-2007 09:26 AM

Re: Detailed Order Management Mod
 
I've not tasted with 4.0.x yet. I'll be looking at it soon.

Jerrad 03-14-2007 01:18 PM

Re: Detailed Order Management Mod
 
Thanks, looking forward to it.

herseyc 03-15-2007 12:37 PM

Re: Detailed Order Management Mod
 
Great mod! Thanks alot!

Take Care - Ride FREE

freelancer_gd 03-27-2007 06:50 AM

Re: Detailed Order Management Mod
 
hello !
i'am just trying to implement your mod , but i receive this mess.


Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/djloco/public_html/shop_beta/include/orders_genbilim.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/djloco/public_html/shop_beta/include/orders_genbilim.php on line 2

any idea ?
thnx in advance.

mesut 03-27-2007 08:01 AM

Re: Detailed Order Management Mod
 
The first think i would think of is to check the location of orders_genbilim.php file. It has to be on your_xcart_dir/include/

and secondly have you created the orders_genbilim.php file?

I've tried it for 4.1.x versions and there was not any problem.

Here is the orders_genbilim.php file again

Quote:

<?php
for($i=0; $i<count($orders); $i++)
{
$items = func_query("SELECT od.productid, od.amount, od.productcode,p.product, p.avail
FROM xcart_order_details od
LEFT OUTER JOIN xcart_products p ON p.productid = od.productid
WHERE od.orderid = " . $orders[$i]['orderid']);
$orders[$i]['item_list'] = $items;
}
?>

freelancer_gd 03-27-2007 08:15 AM

Re: Detailed Order Management Mod
 
found my error !!!
i working with (bullshitwindows xp original !) and when editing your file (crt+c / crt+v)
with wordpad , it generate a wrong code !!! :c(

your mod work perfectly ...
Thanx to bill gate , i have lose 2 hours of time !

mesut 03-27-2007 08:22 AM

Re: Detailed Order Management Mod
 
I'm glad to hear that.

nobullit 04-04-2007 04:32 AM

Re: Detailed Order Management Mod
 
Excellent contribution! The simple things in life are what make everything flow smoothly.

Thank you for your generousity.

Zoe

impact-computers 04-06-2007 03:58 AM

Re: Detailed Order Management Mod
 
if only it was version 4.0.xx compatible :-)

harrismichael 04-12-2007 07:04 AM

Re: Detailed Order Management Mod
 
Hi,
Mod does look great, would be willing to pay if someone was interested in making it work with 4.0.14. Feel free to email or PM.

Best,
Harris

Keys Care 04-19-2007 01:55 PM

Re: Detailed Order Management Mod
 
I just implemented the mod and it seems to work well except that I cannot see the color coding of the status types.

I did the process twice to see if it was me. I am sure it is, but if you can steer me!

Thanks

Bob

raj 05-29-2007 10:10 PM

Re: Detailed Order Management Mod
 
I just implemented this mod
It is working well for me.
AS some other users said, I am not able to see the color codifications of orders.
is there any modification missing.

rajesh
x-cart 4.1.7 gold

Newpowerr 06-02-2007 03:53 PM

Re: Detailed Order Management Mod
 
Can somebody please tell me why I get the states abrevriated, even tthough the same variables are used? Same for the abreviated country, I would like them shown with their full names.

I tried editing the js file, the tpl fles, but I can't get it to work for me.

Help?!

shopccp 06-08-2007 07:28 PM

Re: Detailed Order Management Mod
 
Great job on this mod. A nice addition to xcart.

vtonya 06-11-2007 11:02 AM

Re: Detailed Order Management Mod
 
i cannot see the colors too, but it seems to be another mod for colors and he has it

banzai 07-09-2007 06:20 AM

Re: Detailed Order Management Mod
 
I successfully implemented the mod on 4.0.17.
Is there a way to display the full country name instead of the country code (United States instead of US or Spain instead of ES)?

mssmit 07-10-2007 11:21 AM

Re: Detailed Order Management Mod
 
Excellent mod! I installed it and it works except that I don't see colours

JTheed 07-10-2007 11:33 AM

Re: Detailed Order Management Mod
 
He did not add the color code part of the mod, it may be a seperate mod. From the way the posts are and it's the same for me, no one see's the Color's.

mssmit 07-11-2007 03:00 PM

Re: Detailed Order Management Mod
 
Detailed order management incl color mod for 4.x

orders_list.tpl (dont'forget to backup your original !!!):

Code:


{* $Id: orders_list.tpl,v 1.18.2.9 2006/11/08 12:34:25 svowl Exp $ *}
{assign var="total" value=0.00}
{assign var="total_paid" value=0.00}
{*
genbilim :
Javascript functions to copy the address to the clipboard
*}
<script language=javascript src="../skin1/main/copy_addr.js"></script>
<div id="DIV_CopyInform" style="display:none;"></div>
{* genbilim-end *}
 
{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"}
{* Colour Key: Begin *}
Colour Key:
<table width="100%" border="1">
<tr>
<td bgcolor="#FFCCFF" name="Pink" width="60" align="middle">Not Finished</td>
<td bgcolor="#CCFFCC" name="Green" width="60" align="middle">Queued</td>
<td bgcolor="#CCFFFF" name="Blue" width="60" align="middle">Processed</td>
<td bgcolor="#CCCCFF" name="Purple" width="60" align="middle">Backordered</td>
<td bgcolor="#FFFFCC" name="Yellow" width="60" align="middle">Declined</td>
<td bgcolor="#FFCCCC" name="Red" width="60" align="middle">Failed</td>
<td bgcolor="#CCCCCC" name="Grey" width="60" align="middle">Complete</td>
</tr>
</table>
{* Colour Key: End *}
 
{include file="main/check_all_row.tpl" form="processorderform" prefix="orderids"}
<form action="process_order.php" method="post" name="processorderform">
<input type="hidden" name="mode" value="" />
<table cellpadding="2" cellspacing="1" width="100%">
{assign var="colspan" value=6}
<tr class="TableHead">
<td width="5">&nbsp;</td>
<td width="5%" nowrap="nowrap">{if $search_prefilled.sort_field eq "orderid"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=orderid">#</a></td>
<td nowrap="nowrap">{if $search_prefilled.sort_field eq "status"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=status">{$lng.lbl_status}</a></td>
<td width="30%" nowrap="nowrap">{if $search_prefilled.sort_field eq "customer"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=customer">{$lng.lbl_customer}</a></td>
{if $usertype eq "A" and $single_mode eq ""}
{assign var="colspan" value=7}
<td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "provider"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=provider">{$lng.lbl_provider}</a></td>
{/if}
<td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "date"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=date">{$lng.lbl_date}</a></td>
<td width="20%" align="right" nowrap="nowrap">{if $search_prefilled.sort_field eq "total"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=total">{$lng.lbl_total}</a></td>
 
{* genbilim
New column for admins to copy the address to the clipboard *}
{if $usertype eq 'A'}
<td align=center width=50>Copy&nbsp;Address</td>
{/if}
{* genbilim-end *}
</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 {include file="main/orders_colors.tpl"}>#{$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 {include file="main/orders_colors.tpl"}>{$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 {include file="main/orders_colors.tpl"} nowrap>{$orders[oid].date|date_format:$config.Appearance.date_format}</TD>
<TD {include file="main/orders_colors.tpl"} nowrap align="right">
{include file="currency.tpl" value=$orders[oid].total}
</TD>
 
{* genbilim *}
{if $usertype eq 'A'}
<td align=center {include file="main/orders_colors.tpl"}><a href="javascript:void(0)"
ship_to="{$orders[oid].s_title}{$orders[oid].s_firstname} {$orders[oid].s_lastname}"
ship_address="{$orders[oid].s_address}"
ship_city="{$orders[oid].s_city}"
ship_state="{$orders[oid].s_state}"
ship_country="{$orders[oid].s_country}"
ship_zipcode="{$orders[oid].s_zipcode}"
onclick="copyShipAddr(this, false);return false;">
<img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle></a></td>
{/if}
</TR>
<tr>
<td colspan=3></td>
<td colspan=4>
<table width=100% cellpadding=5 style="border-collapse:collapse" border=0>
<tr bgcolor=#DDDDCC>
<td>Product</td>
<td>Code</td>
<td align=center>Amount</td>
<td align=center>Stock</td>
</tr>
{foreach item=item from=$orders[oid].item_list}
<tr bgcolor=#CCCCDD>
<td>{$item.product}</td>
<td>{$item.productcode}</td>
<td align=center>{$item.amount}</td>
<td align=center>{$item.avail}</td>
</tr>
{/foreach}
</table>
</td>
</tr>
<TR>
<TD style="padding-top:3px;border-bottom:1px solid black" colspan=12>&nbsp;</TD>
</TR>
<TR>
<TD style="padding-top:3px;" colspan=12>&nbsp;</TD>
{* genbilim-end *}
</tr>
{/section}
<tr>
<td colspan="{$colspan}"><img src="{$ImagesDir}/spacer.gif" width="100%" height="1" alt="" /></td>
</tr>
<tr>
<td colspan="{$colspan}" align="right">{$lng.lbl_gross_total}: <b>{include file="currency.tpl" value=$total}</b></td>
</tr>
<tr>
<td colspan="{$colspan}" align="right">{$lng.lbl_total_paid}: <b>{include file="currency.tpl" value=$total_paid}</b></td>
</tr>
<tr>
<td colspan="{$colspan}"><br />
{include file="customer/main/navigation.tpl"}
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)}
{if $is_gcheckout_orders eq "1"}
{$lng.txt_gcheckout_order_list_status_note}
<br />
<br />
{/if}
<input type="button" value="{$lng.lbl_update_status|strip_tags:false|escape}" onclick="javascript: submitForm(this, 'update');" />
&nbsp;&nbsp;&nbsp;&nbsp;
<br /><br />
{/if}
<input type="button" value="{$lng.lbl_invoices_for_selected|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.target='invoices'; submitForm(this, 'invoice'); document.processorderform.target=''; {rdelim}" />
&nbsp;&nbsp;&nbsp;&nbsp;
{if $usertype ne "C"}
<input type="button" value="{$lng.lbl_labels_for_selected|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.target='labels'; submitForm(this, 'label'); document.processorderform.target=''; {rdelim}" />
&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)}
<input type="button" value="{$lng.lbl_delete_selected|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) if (confirm('{$lng.txt_delete_selected_orders_warning|strip_tags}')) submitForm(this, 'delete');" />
&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $active_modules.Shipping_Label_Generator ne '' && ($usertype eq 'A' || $usertype eq 'P')}
<br />
<br />
<br />
{$lng.txt_shipping_labels_note}
<br />
<br />
<input type="button" value="{$lng.lbl_get_shipping_labels|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.action='generator.php'; submitForm(this, ''); {rdelim}" />
{/if}
{if $usertype ne "C"}
<br />
<br />
<br />
{include file="main/subheader.tpl" title=$lng.lbl_export_orders}
{$lng.txt_export_all_found_orders_text}
<br /><br />
{$lng.lbl_export_file_format}:<br />
<select id="export_fmt" name="export_fmt">
<option value="std">{$lng.lbl_standart}</option>
<option value="csv_tab">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_tab_delimiter}</option>
<option value="csv_semi">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_semicolon_delimiter}</option>
<option value="csv_comma">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_comma_delimiter}</option>
{if $active_modules.QuickBooks eq "Y"}
{include file="modules/QuickBooks/orders.tpl"}
{/if}
</select>
<br />
<br />
<input type="button" value="{$lng.lbl_export|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) submitForm(this, 'export');" />&nbsp;&nbsp;&nbsp;
<input type="button" value="{$lng.lbl_export_all_found|strip_tags:false|escape}" onclick="javascript: self.location='orders.php?mode=search&export=export_found&export_fmt='+document.getElementById('export_fmt').value;" />
{/if}
</td>
</tr>
</table>
</form>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_search_results content=$smarty.capture.dialog extra='width="100%"'}
{/if}


mssmit 07-11-2007 03:01 PM

Re: Detailed Order Management Mod
 
You also have to create a new file called orders_colors.tpl and put it in skin1/main

code:

Code:


{* $Id: orders_colors.tpl,v 2.0 2004/10/31 01:27:28 ADPBoss Exp $ *}
{if $orders[oid].status eq "I"} bgcolor="#FFCCFF"} {/if}
{if $orders[oid].status eq "Q"} bgcolor="#CCFFCC"} {/if}
{if $orders[oid].status eq "P"} bgcolor="#CCFFFF"} {/if}
{if $orders[oid].status eq "B"} bgcolor="#CCCCFF"} {/if}
{if $orders[oid].status eq "D"} bgcolor="#FFFFCC"} {/if}
{if $orders[oid].status eq "F"} bgcolor="#FFCCCC"} {/if}
{if $orders[oid].status eq "C"} bgcolor="#CCCCCC"} {/if}


Status text is hardcoded so if you want you can change it for your own language

Have fun!

Kissed Studio 07-11-2007 08:12 PM

Re: Detailed Order Management Mod
 
Quote:

Originally Posted by mssmit
Detailed order management incl color mod for 4.x

orders_list.php (dont'forget to backup your original !!!):


I just installed all of this and it works great! FYI though, this should be orders_list.tpl, not php

mssmit 07-11-2007 10:55 PM

Re: Detailed Order Management Mod
 
Quote:

Originally Posted by Kissed Studio
I just installed all of this and it works great! FYI though, this should be orders_list.tpl, not php


it was pretty late yesterday :-) but I corrected it

Pantalonas 07-12-2007 07:07 AM

Re: Detailed Order Management Mod
 
Using this orders_list.tpl the ordernumber and also the date is clickable!
Thanks Martijn for your work

{* $Id: orders_list.tpl,v 1.18.2.9 2006/11/08 12:34:25 svowl Exp $ *}
{assign var="total" value=0.00}
{assign var="total_paid" value=0.00}
{*
genbilim :
Javascript functions to copy the address to the clipboard
*}
<script language=javascript src="../skin1/main/copy_addr.js"></script>
<div id="DIV_CopyInform" style="display:none;"></div>
{* genbilim-end *}

{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"}
{* Colour Key: Begin *}
Colour Key:
<table width="100%" border="1">
<tr>
<td bgcolor="#FFCCFF" name="Pink" width="60" align="middle">Not Finished</td>
<td bgcolor="#CCFFCC" name="Green" width="60" align="middle">Queued</td>
<td bgcolor="#CCFFFF" name="Blue" width="60" align="middle">Processed</td>
<td bgcolor="#CCCCFF" name="Purple" width="60" align="middle">Backordered</td>
<td bgcolor="#FFFFCC" name="Yellow" width="60" align="middle">Declined</td>
<td bgcolor="#FFCCCC" name="Red" width="60" align="middle">Failed</td>
<td bgcolor="#CCCCCC" name="Grey" width="60" align="middle">Complete</td>
</tr>
</table>
{* Colour Key: End *}

{include file="main/check_all_row.tpl" form="processorderform" prefix="orderids"}
<form action="process_order.php" method="post" name="processorderform">
<input type="hidden" name="mode" value="" />
<table cellpadding="2" cellspacing="1" width="100%">
{assign var="colspan" value=6}
<tr class="TableHead">
<td width="5">&nbsp;</td>
<td width="5%" nowrap="nowrap">{if $search_prefilled.sort_field eq "orderid"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=orderid">#</a></td>
<td nowrap="nowrap">{if $search_prefilled.sort_field eq "status"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=status">{$lng.lb l_status}</a></td>
<td width="30%" nowrap="nowrap">{if $search_prefilled.sort_field eq "customer"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=customer">{$lng. lbl_customer}</a></td>
{if $usertype eq "A" and $single_mode eq ""}
{assign var="colspan" value=7}
<td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "provider"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=provider">{$lng. lbl_provider}</a></td>
{/if}
<td width="20%" nowrap="nowrap">{if $search_prefilled.sort_field eq "date"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=date">{$lng.lbl_ date}</a></td>
<td width="20%" align="right" nowrap="nowrap">{if $search_prefilled.sort_field eq "total"}{include file="buttons/sort_pointer.tpl" dir=$search_prefilled.sort_direction}&nbsp;{/if}<a href="orders.php?mode=search&sort=total">{$lng.lbl _total}</a></td>

{* genbilim
New column for admins to copy the address to the clipboard *}
{if $usertype eq 'A'}
<td align=center width=50>Copy&nbsp;Address</td>
{/if}
{* genbilim-end *}
</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 {include file="main/orders_colors.tpl"}><a href="order.php?orderid={$orders[oid].orderid}">#{$orders[oid].orderid}</a></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 {include file="main/orders_colors.tpl"}>{$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 {include file="main/orders_colors.tpl"} nowrap="nowrap"><a href="order.php?orderid={$orders[oid].orderid}">{$orders[oid].date|date_format:$config.Appearance.datetime_form at}</a></td>
<TD {include file="main/orders_colors.tpl"} nowrap align="right">
{include file="currency.tpl" value=$orders[oid].total}
</TD>

{* genbilim *}
{if $usertype eq 'A'}
<td align=center {include file="main/orders_colors.tpl"}><a href="javascript:void(0)"
ship_to="{$orders[oid].s_title}{$orders[oid].s_firstname} {$orders[oid].s_lastname}"
ship_address="{$orders[oid].s_address}"
ship_city="{$orders[oid].s_city}"
ship_state="{$orders[oid].s_state}"
ship_country="{$orders[oid].s_country}"
ship_zipcode="{$orders[oid].s_zipcode}"
onclick="copyShipAddr(this, false);return false;">
<img src="{$ImagesDir}/copy.gif" border=0 align=absmiddle></a></td>
{/if}
</TR>
<tr>
<td colspan=3></td>
<td colspan=4>
<table width=100% cellpadding=5 style="border-collapse:collapse" border=0>
<tr bgcolor=#DDDDCC>
<td>Product</td>
<td>Code</td>
<td align=center>Amount</td>
<td align=center>Stock</td>
</tr>
{foreach item=item from=$orders[oid].item_list}
<tr bgcolor=#CCCCDD>
<td>{$item.product}</td>
<td>{$item.productcode}</td>
<td align=center>{$item.amount}</td>
<td align=center>{$item.avail}</td>
</tr>
{/foreach}
</table>
</td>
</tr>
<TR>
<TD style="padding-top:3px;border-bottom:1px solid black" colspan=12>&nbsp;</TD>
</TR>
<TR>
<TD style="padding-top:3px;" colspan=12>&nbsp;</TD>
{* genbilim-end *}
</tr>
{/section}
<tr>
<td colspan="{$colspan}"><img src="{$ImagesDir}/spacer.gif" width="100%" height="1" alt="" /></td>
</tr>
<tr>
<td colspan="{$colspan}" align="right">{$lng.lbl_gross_total}: <b>{include file="currency.tpl" value=$total}</b></td>
</tr>
<tr>
<td colspan="{$colspan}" align="right">{$lng.lbl_total_paid}: <b>{include file="currency.tpl" value=$total_paid}</b></td>
</tr>
<tr>
<td colspan="{$colspan}"><br />
{include file="customer/main/navigation.tpl"}
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)}
{if $is_gcheckout_orders eq "1"}
{$lng.txt_gcheckout_order_list_status_note}
<br />
<br />
{/if}
<input type="button" value="{$lng.lbl_update_status|strip_tags:false|es cape}" onclick="javascript: submitForm(this, 'update');" />
&nbsp;&nbsp;&nbsp;&nbsp;
<br /><br />
{/if}
<input type="button" value="{$lng.lbl_invoices_for_selected|strip_tags: false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.target='invoices'; submitForm(this, 'invoice'); document.processorderform.target=''; {rdelim}" />
&nbsp;&nbsp;&nbsp;&nbsp;
{if $usertype ne "C"}
<input type="button" value="{$lng.lbl_labels_for_selected|strip_tags:fa lse|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.target='labels'; submitForm(this, 'label'); document.processorderform.target=''; {rdelim}" />
&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $usertype eq "A" or ($usertype eq "P" and $active_modules.Simple_Mode)}
<input type="button" value="{$lng.lbl_delete_selected|strip_tags:false| escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) if (confirm('{$lng.txt_delete_selected_orders_warning |strip_tags}')) submitForm(this, 'delete');" />
&nbsp;&nbsp;&nbsp;&nbsp;
{/if}
{if $active_modules.Shipping_Label_Generator ne '' && ($usertype eq 'A' || $usertype eq 'P')}
<br />
<br />
<br />
{$lng.txt_shipping_labels_note}
<br />
<br />
<input type="button" value="{$lng.lbl_get_shipping_labels|strip_tags:fa lse|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) {ldelim} document.processorderform.action='generator.php'; submitForm(this, ''); {rdelim}" />
{/if}
{if $usertype ne "C"}
<br />
<br />
<br />
{include file="main/subheader.tpl" title=$lng.lbl_export_orders}
{$lng.txt_export_all_found_orders_text}
<br /><br />
{$lng.lbl_export_file_format}:<br />
<select id="export_fmt" name="export_fmt">
<option value="std">{$lng.lbl_standart}</option>
<option value="csv_tab">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_tab_delimiter}</option>
<option value="csv_semi">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_semicolon_delimiter}</option>
<option value="csv_comma">{$lng.lbl_40x_compatible}: CSV {$lng.lbl_with_comma_delimiter}</option>
{if $active_modules.QuickBooks eq "Y"}
{include file="modules/QuickBooks/orders.tpl"}
{/if}
</select>
<br />
<br />
<input type="button" value="{$lng.lbl_export|strip_tags:false|escape}" onclick="javascript: if (checkMarks(this.form, new RegExp('orderids\[[0-9]+\]', 'gi'))) submitForm(this, 'export');" />&nbsp;&nbsp;&nbsp;
<input type="button" value="{$lng.lbl_export_all_found|strip_tags:false |escape}" onclick="javascript: self.location='orders.php?mode=search&export=expor t_found&export_fmt='+document.getElementById('expo rt_fmt').value;" />
{/if}
</td>
</tr>
</table>
</form>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_search_results content=$smarty.capture.dialog extra='width="100%"'}
{/if}

Marc Gold 09-23-2007 11:46 AM

Re: Detailed Order Management Mod
 
Fantastic Mod,

One small problem for those of us that use Google Checkout. Xcart has a feature to diasble the status dropdown in admin for all Google Checkout orders because this is controlled by Google.

This mod disables this, if you would like to re-enable this feature.

your_xcart_dir/skin1/main/orders_list.tpl

Find -->

{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}


Change to ->

{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}">
{if $orders[oid].goid ne ""}
{assign var="is_gcheckout_orders" value="1"}
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]" extra="disabled='disabled'"}
{else}
{include file="main/order_status.tpl" status=$orders[oid].status mode="select" name="order_status[`$orders[oid].orderid`]"}
{/if}
{else}
{include file="main/order_status.tpl" status=$orders[oid].status mode="static"}
{/if}

a1deano 09-26-2007 01:09 PM

Re: Detailed Order Management Mod
 
Hi All

First off can i say what a fantastic mod this is, many thanks for the hard work and for sharing

Ive come across an error, i liked the idea in Post 26 about making the order number and also the date is clickable! so i copied the code from (Pantalonas post 26) and applied to the main/orders_list.tpl
Then when i checked the orders page i relise i was getting 2 error messages, the first was
Quote:

Error: Smarty error: [in main/orders_list.tpl line 40]: syntax error: unrecognized tag: $lng. lbl_customer (Smarty_Compiler.class.php, line 436) in /home/a1deano69/public_html/testcart/Smarty-2.6.12/Smarty.class.php on line 1095

The file name in the error message "testcart" is the file were iam working on my new v4.1.8
and isn't live yet....

The second error iam getting is -
Quote:

Fatal error: Call to undefined function: smarty_modifier_es() in /home/a1deano69/public_html/testcart/var/templates_c/%%8B^8B4^8B45DCD5%%orders_list.tpl.php on line 267

And i lose all the buttons below the order details - "update status" button - "invoiced for selection" button etc, they all disapear.

If however i put the orginal code back in that mssmit uploaded post 22 the error messages disappear and all works well.

I would like to make the order number and date clickable as i need to be able to add tracking info, so if anyone can work out why the code in post 26 is causing error message i would be really greatful.

Just also wanted to ask a when a customer logs into their account and decides to check previous orders, they actually get to see the "stock" levels is it possible to remove this just from the customers side, but leave it in the admin side

Many thanks Dean

a1deano 10-01-2007 08:29 AM

Re: Detailed Order Management Mod
 
Hi all

Ive managed to fix the errors i was getting and all is working well now, something id like to ask though, if you click "copy address" it shows the county as an abbrieviation
example i live in the county of Lincolnshire but it shows up as LIN
Is there anyway to make it show the full county name.

Many thanks Dean

a1deano 10-05-2007 11:12 AM

Re: Detailed Order Management Mod
 
Hi all

Well regarding my message above ive managed to work out county abbrieviation and its now showing the full state/county name for this all i done was edit the orders_info.tpl so
Quote:

ship_state="{$order.s_state}"

now looks like

Quote:

ship_state="{$order.s_statename}"

And thats all i needed to do, some else ive just changed if anyone wants to know when you click on order or users it opened up on the search page first, and really how many of us really use the search box etc so i changed the url slightly.
Open admin/menu.tpl and just add ?mode=search so these two look like this

Quote:

<a href="{$catalogs.admin}/orders.php?mode=search" class="VertMenuItems">{$lng.lbl_orders}</a>

and also

<a href="{$catalogs.admin}/users.php?mode=search" class="VertMenuItems">{$lng.lbl_users}</a>

so now it take you direct to the user and orders....

Kitman 10-12-2007 02:04 AM

Re: Detailed Order Management Mod
 
That Mod works great. I was wanting possibly a couple of changes and wondered if they were possible?
Firstly I dont need to show the stock but what I did want to show was the product options ie. what size the product may be so that they dont have to click into order details
Secondly I wondered whether it would be much work to have a copy button that rather than showing address would show the customer details/credit card details, again to save going into the full order details?

Anyone have any thoughts?

Freakmode 10-15-2007 01:27 AM

Re: Detailed Order Management Mod
 
Another great mod - worked first time out the trap - thanks everyone.

I'm with Kitman on this one - we don't use stock control but would love to know how to replace that column with the product options if anyone knows how?

harrismichael 10-16-2007 01:33 PM

Re: Detailed Order Management Mod
 
Hi,
I see some folks using this terrific mod on versions as old as v 4.0.17. Any chance we can get away with using it on v.4.0.14?

Any ideas to actually being able to implement for us would be appreciated.

Many thanks,
Harris

Freakmode 10-18-2007 12:22 PM

Re: Detailed Order Management Mod
 
Anyone got this working with X-AOM

When I click on the "Modify" button in AOM the page is just blank?

a1deano 10-20-2007 03:56 AM

Re: Detailed Order Management Mod
 
Hi all

It seems quite a few of us don't us the stock control so all i done was changed it so it shows up as - N/A
I didn't really like the idea of a customer knowing how much stock i had....

Hugo 10-24-2007 01:58 AM

Re: Detailed Order Management Mod
 
Hi all,

Would it be posible to add the payment methode in the detailed list?

Also, I'm a bit lost with all the reworked code in this topic. It should be really helpfull when all the code is combined together.

alru111 11-04-2007 11:31 PM

Re: Detailed Order Management Mod
 
is there any way to turn the mod off/on to have orders listed in a classic way when needed.
?

mgatten 11-26-2007 11:17 PM

Re: Detailed Order Management Mod
 
For those of you who use the code in post 26 to get clickable entries, you should be aware that some lines have extra spaces in them that will break all the buttons at the bottom of the page. The code works great if you look for and remove those spaces.

For instance, "false" becomes "fa lse". That kinda thing breaks the code pretty quick. There are only a few of them, and I regret I didn't pay enough attention when I was fixing them to be able to tell you where they all are, but look at the part that generates the buttons and you'll find them easily enough.

Great mod!!!!

mgatten 12-31-2007 11:04 AM

Re: Detailed Order Management Mod
 
I got an interesting call today related to the color coding portion of this mod, and I thought others might benefit from what I learned. A customer had just placed her first order. She went to her order history to look at it, and then called me asking why she hadn't been told her items were on backorder. Well, they weren't on backorder.

It turns out that the background color of the cells listing the individual line items was close to the color code for backorder, so even though the top line was coded for Processed, she thought that the individual items weren't going to ship. And, unfortunately, it kind of made sense for her to think that.

So I set about the task of changing the background of those cells. The problem is that any color there at all will look like a color code, even if it's a "color code" not listed in the key. So I decided to just make them white to match the background color of our store.

If you've applied this mod and would like to make the same change, it's easy - so here ya go:

In orders_list.tpl find this:
Code:

<tr bgcolor=#DDDDCC>
<td>Product</td>
<td>Code</td>

and change the DDDDCC to FFFFFF (or whatever color matches your background).

Then, just a couple lines later, find this:
Code:

{foreach item=item from=$orders[oid].item_list}
<tr bgcolor=#CCCCDD>

and change the CCCCDD to the same color as you changed the first one (probably FFFFFF).

Voila.

koolie 03-28-2008 12:20 PM

Re: Detailed Order Management Mod
 
one word.... FANDAMNTASTIC!!

Thanks much for the mod...I'll be having a wonderful weekend because of you :-)


All times are GMT -8. The time now is 05:23 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.