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)

sstillwell@aerostich.com 03-21-2005 09:08 AM

Looking Good. I like. I think I'll try porting it to the gift certificate page as well.

Jonathan501 03-28-2005 07:27 PM

This thing has saved me A LOT of time! WOW!!!! A quick color scan and I can see my whole day.

pengrus 03-28-2005 09:44 PM

Quote:

Originally Posted by Jonathan501
Nice!!!!!! Wow!!! I didn't know what I was missing. It took the second day of install for it to really click because I could scan the orders fast and see the good from the failed, etc. Everyone should do this mod!

Here's orders_colors.tpl with softer colors.

Code:

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



I am so happy that I discovered this new mod today. Yes, time saving leads to money, more time and relax hopefully.

Jonathan,

Great use of softer color. The only change I recommend to make is the Completed which is a little too close to I - Not Finished.

Here is the new one with only this changed:

Code:

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


Thank you ALL!

Maree 06-07-2005 12:06 AM

I have this mod working with no problem in 4.0.13.
Thank you to the original posters of this code


Maree
4.0.13

x-online 08-16-2005 07:22 PM

Thanks, this is really excellent both original poster and adpboss.

I knew you can't reply but i'm gradly appreciated your time for explain the steps out.

dchihorn 10-25-2005 09:20 PM

Just gonna say thanks. I just applied it to my 4.0.16 version and works great.

x-online 10-25-2005 09:27 PM

dchihorn,

you might want to edit your profile :p
your version seem to be a bit out dated

dalmuti 10-26-2005 05:44 AM

I also use this mod to color code my products that are disabled. So, I can see at a glance which products we no longer carry.

Works great.

Louise

simco 11-16-2005 09:30 AM

Hmm... I inserted this mod and when I try to view my order history as a customer I get this:

Warning: Smarty error: unable to read resource: "main/orders_colors.tpl" in /home/wwwxxxx/public_html/cart/Smarty-2.6.9/Smarty.class.php on line 1088

on the summary page. I can still click on the order number and view the complete invoice/order ok but the summary page is kaputzki.

Also, this would explain why in admin it's not working in regards to displaying different colors.

Ideas?

ryan c. 01-10-2006 03:49 PM

I can not find that bit of code in my version? Version 4.0.17

does it work in Version 4.0.17




Quote:

Originally Posted by pipercub
Here's the code...

First, create a new template called 'order_colors.tpl' (or whatever you prefer). This file should live in the 'Main' directory. Paste the following into this new file:

Code:

{* $Id: orders_colors.tpl,v 1.0 2003/10/26 13:07:50 pipercub Exp $ *}
{if $orders[cat_num].status eq "C"} bgcolor="#00CC00"} {/if}
{if $orders[cat_num].status eq "P"} bgcolor="#FFFF99"} {/if}
{if $orders[cat_num].status eq "F"} bgcolor="#FF33333"} {/if}


Obviously, you can add all of the status indicators that you need, but I only use these three. This is also where you change the colors.

Next, open 'main/orders.tpl'. Find the part of the code where the 'section' loop begins. Replace everything between {section name=cat_num loop=$orders} and {/section} with the following code:

*This is the easy method. Scroll down for the custom method.

Code:

{section name=cat_num loop=$orders}
{math equation="x + ordertotal" x=$total ordertotal=$orders[cat_num].total assign="total"}
{if $orders[cat_num].status eq "P" or $orders[cat_num].status eq "C"}
{math equation="x + ordertotal" x=$total_paid ordertotal=$orders[cat_num].total assign="total_paid"}
{/if}
{ if %cat_num.first% }
<table border=0 width=100% cellspacing="1" cellpadding="0">
{/if}
<tr>
<td align="center" {include file="main/orders_colors.tpl"}>
#{$orders[cat_num].orderid}
</td>

<td align="center" {include file="main/orders_colors.tpl"}>
<input type=radio name=orderid value="{ $orders[cat_num].orderid }" { if %cat_num.first% }checked{/if}>
</td>

<td align="center" nowrap class=Text {include file="main/orders_colors.tpl"}>
{$orders[cat_num].status}
</td>

<td nowrap align="center" {include file="main/orders_colors.tpl"}>
<font class=Text>{$orders[cat_num].date|date_format:"%b-%d-%Y"}</font>
</td>
<td nowrap align="center" {include file="main/orders_colors.tpl"} class=Text>
{if $usertype eq "A"}<a href="order.php?orderid={$orders[cat_num].orderid}">
{ $orders[cat_num].firstname } { $orders[cat_num].lastname }</a>
{/if}

</td>
<td nowrap align="center" {include file="main/orders_colors.tpl"} class=Text>

{if $usertype eq "A"}
{ $orders[cat_num].provider }
{else}<a href="order.php?orderid={$orders[cat_num].orderid}">
{ $orders[cat_num].firstname } { $orders[cat_num].lastname }</a>
{/if}
</td>
                        <td nowrap align=right class=Text {include file="main/orders_colors.tpl"}>
{include file="currency.tpl" value=$orders[cat_num].total}
</td>
                </tr>
{ if %cat_num.last% }
<tr><td colspan=7 align=right height=20>{$lng.lbl_gross_total}: {include file="currency.tpl" value=$total}</td></tr>
<tr><td colspan=7 align=right height=20>{$lng.lbl_total_paid}: {include file="currency.tpl" value=$total_paid}</td></tr>
</table>
{/if}
{/section}


For theose who don't want to replace their file (due to other mods), you can simply paste:

Code:

{include file="main/orders_colors.tpl"}

between all of the <td> tags for the cells that you want to affect.

Example:
<td align="center" {include file="main/orders_colors.tpl"}>

Enjoy,
Piper



All times are GMT -8. The time now is 06:20 PM.

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