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)
-   -   Color coded order status... (https://forum.x-cart.com/showthread.php?t=4949)

Delw 01-16-2006 11:37 AM

Heres the code I believe for version 4.017
that you will need to find



Code:

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


it looks like the codes been changed. I havent tried it yet My wife has been bugging me to do it so I figured I would try it today.

Delw

Delw 01-16-2006 03:31 PM

Quote:

Originally Posted by adpboss
Quote:

Originally Posted by adpboss
This is one of the most underrated mods for everyday users. Nothing is better than visual representation of order status. Especially when you want to browse through a list to see how many are queued, declined etc all in one screen without using filters.

Implementing this in V4.0.5

You need to modify skin1/main/orders_list.tpl

Around line 53 change

Code:

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


to

Code:

<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>
</TR>


Please also note that you will have to update your orders_colors.tpl file to account for V4 changes.

Code:

{* $Id: orders_colors.tpl,v 2.0 2004/10/31 01:27:28 ADPBoss Exp $ *}
{if $orders[oid].status eq "C"} bgcolor="#00CCFF"} {/if}
{if $orders[oid].status eq "P"} bgcolor="#00FF66"} {/if}
{if $orders[oid].status eq "Q"} bgcolor="#FFFF99"} {/if}
{if $orders[oid].status eq "F"} bgcolor="#FF3333"} {/if}
{if $orders[oid].status eq "I"} bgcolor="#CCCCCC"} {/if}


Please also note that no status colour has been set for Declined "D". You can just copy one of the if statements and add your own.

I will follow up with product colour mod as soon as possible.


THIS IS FOR 4.X



Ryan this works perfect, and only takes about 3 mins. The post that I quoted is from page 5 on this thread.

Dont forget you have to make a new paged called orders_colors.tpl
Thats not in the templates already.


Nice mod BTW
Delw

DVDirect 01-16-2006 04:11 PM

Hi All,

I have just implemented this mod and it is awesome. Quick to do but really effective.

Thanks to all those who have contributed to this Mod.

Well Done!

Andrew

groovico 01-16-2006 04:13 PM

Defo should be put into x-cart 4.1 it makes the order list so much friendlier.

billstevens 01-21-2006 07:32 PM

Fantastic! Thanks for the mod

-Bill

DVDirect 01-22-2006 01:56 PM

Hi All,

We added a reference code at the top of the search result for a quick reference.

http://www.dvdirect.com.au/information/colour-code.gif

Insert this code


Code:

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


in file /main/orders_list.tpl After the following code

Code:

{* $Id: orders_list.tpl,v 1.7.2.2 2004/10/29 07:43:23 max 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"}


And then just change the colour codes in /main/orders_colors.tpl


Code:

{* $Id: orders_colors.tpl,v 2.0 2004/10/31 01:27:28 ADPBoss Exp $ *}
{if $orders[oid].status eq "N"} 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}


Goes without saying that you need to make both colours match.
:wink:

Cheers,
Andrew

Vacman 01-22-2006 05:48 PM

Nice! Thanks again!

billstevens 01-24-2006 11:00 AM

This mod has really sped up our order processing. Thanks a bunch!

The only other thing I'd like to see is the customer credit card info displayed for each order. We do a great deal of manual processing and it would speed things up if we didn't have to click on each invoice to retrieve the cc info from the order details. Has anyone done this?

I looked at the history_order.tpl then tried adding this into the mix to display the order details but it doesn't return anything. As I understand it the details field in the orders table is encrypted... am I missing something that allows the display of this encrypted field?

{if $usertype eq "A"}


{$order[oid].details}
{/if}

Obviously I don't have a grasp on how this should work and know just about enough to be a danger to myself. Any thoughts to point me in the right direction?

Any help would be greatly appreciated.

-Bill

fhiremark 05-19-2006 03:44 PM

Has anybody gotten this to work with v4.0.18 GOLD? If yes, can you explain how you did it? -- I tried with the instructions in the first few post, but wasn't successful.

taltos1 05-30-2006 08:38 PM

Great Great Mod. Just got this working on 4.0.18 (info on page 5). Also, there is a great mod to change the date format from BoomBoomBap, to get it working on this version
change
Code:

{$orders[oid].date|date_format:$config.Appearance.date_format}
to
Code:

{$orders[oid].date|date_format:"%h. %d, %Y - %r"}

in orders_list.tpl.

Hope this helps!


All times are GMT -8. The time now is 07:53 AM.

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