I have been color coding both order status and expedited shipping since version 4.0.5. I find this color coding to be very handy, and I don't understand why this feature is not standard with X-Cart.
I followed Rob Barclay's posting to get started with 4.4.2 color coding, and he inspired me to add a definition bar above.
We like to color code for shipping method so we will see an expedited order immediately. To do this you test for the shipping id number and apply a background color if it matched.
merscham, it should work for you. Try following these steps.
Create a file named orders_colors.tpl. You can copy mine and paste it into Notepad. Copy the saved file to the folder skin/common_files/main/ on your server.
Here is what mine looks like:
Quote:
{* orders_colors.tpl,v 1.0.0.0 2011/03/07 *}
{if $orders[oid].status eq "P"} style="background-color: #FFAA00"{/if}
{if $orders[oid].status eq "C"} style="background-color: #AAFF00"{/if}
{if $orders[oid].status eq "F"} style="background-color: #BBBBBB"{/if}
{if $orders[oid].status eq "Q"} style="background-color: #FF4444"{/if}
{if $orders[oid].status eq "D"} style="background-color: #DDDDDD"{/if}
|
The top line is optional.
To display the colors, in the template editor bring up skin/common_files/main/orders_list.tpl. Search (cntl-f) to find the word 'checkbox' (about line 52 for 4.4.4), then edit that line to look like this line:
Quote:
<td width="5" {include file="main/orders_colors.tpl"}><input type="checkbox" name="orderids[{$orders[oid].orderid}]" /></td>
|
Doing the above two actions should give you basic color coding.
To make a color scheme line similar to Barclay's, I inserted a table below the line "{capture name=dialog}" (about line 16 in 4.4.4)
Quote:
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="800">
<tr>
<td align="center" width="120" bgcolor="#AAFF00">Complete</td>
<td align="center" width="120" bgcolor="#FFAA00">Processed</td>
<td align="center" width="120" bgcolor="#FF4444">Queued</td>
<td align="center" width="120" bgcolor="#BBBBBB">Failed</td>
<td align="center" width="120" bgcolor="#DDDDDD">Declined</td>
<td align="center" width="200" bgcolor="#FFFF00">Premium Shipping</td>
</tr>
</table>
|
If you are not using color coded shipping, leave out the line that has the word "Premium".
To add color coded shipping requires that you know the
shippingid variable that X-Cart uses for the shipping method you want to color code. The only way I know to get this number is to look in the database table
xcart_shipping. You can find out your
shippingid numbers by exporting your shipping rates.
In skin/common_files/main/orders_list.tpl, search for the line with "membership" in it, then edit to add your version of the following. My added part is highlighted:
Quote:
<td {if $orders[oid].shippingid eq "195"} bgcolor="#FFFF00"{/if}>
{if $is_admin_user and $current_membership_flag ........
|
The background color I use (FFFF00) is yellow. The number 195 is MY shippingid number that is assigned to the shipping method I want color coded. If you have more than one shipping method you want color coded, that can be done by expanding the 'if' statement to include the other possibilities.
Example of IF command with to highlight multiple shipping methods:
{if $orders[oid].shippingid eq "41" or $orders[oid].shippingid eq "50" or $orders[oid].shippingid eq "51"}
http://www.bugsnbees.com/images/colorcode_example.jpg
Now confirmed to work on 4.5.3.
UPDATE v4.6.3
The order status color coding portion works the same in version 4.6.3, but the expedited shipping coloring did not. It appears to be a style issue. After finding the line with 'membership' in it, use the following as an example:
Quote:
<td {if $orders[oid].shippingid eq "195"} style="background-color: #EEEE00"{/if}>
{if $is_admin_user and $current_membership_flag ........
|
This worked for me, and may work in earlier X-Cart versions.