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)

pipercub 10-26-2003 05:03 AM

Color coded order status...
 
I created a mod to the orders.tpl file to change the color of the cells with the order info in them. The cells will change color according to the status of the order. This makes it very easy to glance at your screen to get the status.

Here is a screen capture of what I'm talking about. I'll post the code shortly. it's a very simple (yet effective) mod.

http://66.113.244.89/order_colors.gif

Piper

shasan 10-26-2003 10:08 AM

hey, that's pretty cool. Would you be able to change the colours easily?

adpboss 10-26-2003 12:40 PM

Awesome MOD!

Can't wait to incorporate your code into my cart.

pipercub 10-26-2003 01:09 PM

Quote:

Originally Posted by shasan
hey, that's pretty cool. Would you be able to change the colours easily?


Yup! The colors are controlled by a seperate .tpl file. you can edit them to whatever you like. It would really be cool to somehow incorporate the color settings into the "General Settings" page, but for now you just need to edit the color values in the tpl. Simple enough.

Piper

P.S. I've been realy busy lately, but I'll try to post the code tomorrow.

shasan 10-26-2003 01:15 PM

Nicely done. =D>

Can't wait for the code.

pipercub 10-26-2003 03:07 PM

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

adpboss 10-26-2003 03:20 PM

Awesome. Absolutely awesome.

Implemented and I'm tweaking colours right now.

ADDED

Ok here is my colour scheme.

Blue for Complete
Grey for Incomplete
Red for Failed
Green for Processed
Yellow for Queued

Code:

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


Hope you like it although it is very easy to change.

adpboss 10-26-2003 03:40 PM

This is so great that my mind is racing with the possibilities.

It would be great to be able to implement this in the modify product listings. Show out of stock products or low stock products highlighted with colour.

pipercub 10-26-2003 03:55 PM

adpboss,

Did you paste the entire chunk of code, or just the 'include'?

The reason I ask is because I modified the number of cells that xcart displays on the orders page. I didn't like to have to check a radio button and then hit 'Details', so I added the customers name and made it a hot link. I also modified the date format. All of this is in the big chunk of code.

Piper

adpboss 10-26-2003 03:59 PM

Piper,

I just went back and checked. Yes, I have the names and the dates. Great job!

I am just finishing modifying the product listings, and will post my code as I complete.

Thanks, this is really excellent.

adpboss 10-26-2003 04:31 PM

Could use some help with this code

Code:

{* $Id: products_colors.tpl,v 1.0 2003/10/26 13:07:50 ADPBoss Exp $ *}
{if $products[cat_num].forsale eq "N"} bgcolor="#00CCCC"}
{else}
{if $products[cat_num].avail eq "0"} bgcolor="#CCCCCC"}
{if $products[cat_num].avail eq "1"} bgcolor="#FFFF99"}
{/if}


What I want it to do is

1. Check if the product is active or disabled "forsale"
2. Check if the product has an availability of 0 or 1.

I was able to make this work with just checking the avail (inventory) number but cannot seem to combine the two checks. It's probably because I am not very smart at this stuff.

I am sure someone who knows what they are doing could fix this in a minute.

dealsondeals 10-27-2003 07:32 AM

:wink: Nicely Done!

Now that's what I call some value-added programming!

Regards,

G;en

adpboss 10-28-2003 02:13 PM

Could really use some help with my code

It's so close

pipercub 10-28-2003 02:51 PM

Quote:

Originally Posted by adpboss
Could really use some help with my code

It's so close


I do believe that you can use 'and' in your 'if' statements. So, you code might look something like this:

Code:

{* $Id: products_colors.tpl,v 1.0 2003/10/26 13:07:50 ADPBoss Exp $ *} 
{if $products[cat_num].forsale eq "N"} bgcolor="#00CCCC"}
{else}
{if $products[cat_num].forsale eq "N" and $products[cat_num].avail eq "0"} bgcolor="#CCCCCC"} 
{if $products[cat_num].forsale eq "N" and $products[cat_num].avail eq "1"} bgcolor="#FFFF99"}
{/if}


I'm not a master programmer either, so this may be a shot in the dark. Maybe Shan, Boomer or Funky could shed some light on this if thay happen to stroll through here.

Piper

P.S. Let me know what happens!

adpboss 10-28-2003 03:00 PM

Nah that don't work but thanks for trying.

I have another idea....

pipercub 10-28-2003 04:34 PM

How 'bout this...

Code:

{* $Id: products_colors.tpl,v 1.0 2003/10/26 13:07:50 ADPBoss Exp $ *}б═ 
{if $products[cat_num].forsale eq "N"} bgcolor="#00CCCC"} 
{else} 
{if $products[cat_num].forsale eq "N" and $products[cat_num].avail eq "0"} bgcolor="#CCCCCC"}
{else} 
{if $products[cat_num].forsale eq "N" and $products[cat_num].avail eq "1"} bgcolor="#FFFF99"} 
{/if}


It's the blind leading the blind! 8O

Piper

adpboss 10-28-2003 04:39 PM

LOL!

We are blind!

This didn't work either. I wish I knew more about this stuff.

pipercub 10-28-2003 05:40 PM

One more before I go to bed...

Code:

{* $Id: products_colors.tpl,v 1.0 2003/10/26 13:07:50 ADPBoss Exp $ *}б═б═ 
 {if $products[cat_num].forsale eq "N" bgcolor="#00CCCC"}
 
 {elseif $products[cat_num].forsale eq "N" and $products[cat_num].avail eq "0" bgcolor="#CCCCCC"}
 
 {elseif $products[cat_num].forsale eq "N" and $products[cat_num].avail eq "1" bgcolor="#FFFF99"}
 {/if}


I used the 'elseif' to separate the options. Also, there was an extra } in there.

Believe it or not, this is exactly how I teach myself. I try everything using slightly different code until I find the solution. It may take me hours, but I eventually solve the problem as well as learning by trail and error (mostly error).

When all else fails, check other templates to see if you can find similar code and use it as a reference.

Good luck, and good night.

Piper

adpboss 10-28-2003 06:04 PM

Yay! Go to bed Piper, you dunnit! Only thing is you had the forsale condition set to "n" in all instances but it should be as below! :)

Grey - Disabled product, Red - Out of stock, Yellow - Inventory level of 1

http://www.adpmods.com/graphics/x-ample1.gif

Create a file in skin1/main called products_colors.tpl

Code:

{* $Id: products_colors.tpl,v 1.0 2003/10/26 13:07:50 ADPBoss Exp $ *}   
{if $products[cat_num].forsale eq "N"} bgcolor="#CCCCCC" 
{elseif $products[cat_num].forsale eq "Y" and $products[cat_num].avail eq "0"} bgcolor="#FF3333"
{elseif $products[cat_num].forsale eq "Y" and $products[cat_num].avail eq "1"} bgcolor="#FFFF99"
{/if}


Next you need to add the color formatting tags to your skin1/main/products.tpl file

Code:

{* $Id: products.tpl,v 1.22 2002/11/13 07:17:54 alfiya Exp $ *}
{section name=cat_num loop=$products}
{ if %cat_num.first% }
<table border=0>
<tr class=TableHead>
<td>ID</td>
<td>Product</td>
{if $usertype eq "A" or $active_modules.Simple_Mode ne ""}
<TD>Pos.</TD>
{/if}
<TD>Quantity</TD>
<td colspan=2>Shop price</td>
<td nowrap>Your price</td>
</tr>
{/if}
<tr>
{* START COLOR CODE MOD *}
<td width=1% {include file="main/products_colors.tpl"}>#{$products[cat_num].productid}</td>
<td width=99% {include file="main/products_colors.tpl"}>
<input type=radio name=productid value="{ $products[cat_num].productid }" { if %cat_num.first% }checked{/if}>
<a href="product_modify.php?productid={ $products[cat_num].productid }">
<font class=ItemsList>{ $products[cat_num].product|escape|truncate:35:"...":false}</font>
</a>
</td>
{if $usertype eq "A" or $active_modules.Simple_Mode ne ""}
<TD nowrap align=right {include file="main/products_colors.tpl"}><INPUT type=text size=4 maxlength=4 value="{$products[cat_num].orderby}" name="product_orderby[{$products[cat_num].productid}]"></TD>
{/if}
<TD nowrap align=right {include file="main/products_colors.tpl"}><INPUT type=text size=6 maxlength=6 value="{$products[cat_num].avail}" name="product_avail[{$products[cat_num].productid}]"></TD>
<td nowrap align=right {include file="main/products_colors.tpl"}>
<font class=ProductPriceConverting>{math equation="price/(1-(discount/100))" price=$products[cat_num].price discount=$products[cat_num].discount format="%.1f" assign=unformatted}{include file="currency.tpl" value=$unformatted}</font>
</td>
<td nowrap align=right {include file="main/products_colors.tpl"}>
<font class=AdvancedDiscount> -{$products[cat_num].discount}%</font>
</td>
<td nowrap align=right {include file="main/products_colors.tpl"}>
{* END COLOR CODE MOD *}
<input type="text" size="7" value="{$products[cat_num].price}" name="product_price[{$products[cat_num].productid}]">
</td>
</tr>
{ if %cat_num.last% }
</table>
{/if} {/section}


You will see that I commented where the code change starts and ends. Basically we are adding

Code:

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

inside all of the TD tags that are on the product information lines.

Now, last change. Because we are using red to mark zero stock products, then we had to change the default admin small message css being used on the Advanced Discount display. I created a new CSS style in skin1.css called "AdvancedDiscount". I used a blue colour for the NEW advanced discount display on this page.

You will see the code on the line that produces the discount % display.

Code:

font class=AdvancedDiscount

That's it. Thank Piper for coming up with a really great idea that all of you developers should be incorporating into your cart builds. To the average Joe E-Commerce merchant, this kind of added UI friendliness is a very cool feature.

** One more note, I have changed the hyperlinking on the product name display in main/products.tpl to link to the modify page rather than the details page. I product modify constantly and this is a nice feature for someone like me. Again, thank Piper for the inspiration.

enge919 11-07-2003 11:07 PM

I appended the products.tpl as stated but now the list price does not show and the percentage discount shows as -%.

I've been looking at the code but am still a little new, could you please help?

enge919 11-07-2003 11:38 PM

OK, I got the list price to show but still not the discount. only shows -%

Heres the code I have

Code:

{* $Id: products.tpl,v 1.22 2002/11/13 07:17:54 alfiya Exp $ *}
{section name=cat_num loop=$products}
{ if %cat_num.first% }
<table border=0>
<tr class=TableHead>
<td>ID</td>
<td>Product</td>
{if $usertype eq "A" or $active_modules.Simple_Mode ne ""}
<TD>Pos.</TD>
{/if}
<TD>Quantity</TD>
<td colspan=2>List price</td>
<td nowrap>Your price</td>
</tr>
{/if}
<tr>
{* START COLOR CODE MOD *}
<td width=1% {include file="main/products_colors.tpl"}>#{$products[cat_num].productid}</td>
<td width=99% {include file="main/products_colors.tpl"}>
<input type=radio name=productid value="{ $products[cat_num].productid }" { if %cat_num.first% }checked{/if}>
<a href="product_modify.php?productid={ $products[cat_num].productid }">
<font class=ItemsList>{ $products[cat_num].product|escape|truncate:35:"...":false}</font>
</a>
</td>
{if $usertype eq "A" or $active_modules.Simple_Mode ne ""}
<TD nowrap align=right {include file="main/products_colors.tpl"}><INPUT type=text size=4 maxlength=4 value="{$products[cat_num].orderby}" name="product_orderby[{$products[cat_num].productid}]"></TD>
{/if}
<TD nowrap align=right {include file="main/products_colors.tpl"}><INPUT type=text size=6 maxlength=6 value="{$products[cat_num].avail}" name="product_avail[{$products[cat_num].productid}]"></TD>
<td nowrap align=right {include file="main/products_colors.tpl"}>
{if $products[cat_num].list_price gt 0}
{math equation="100-(price/lprice)*100" price=$products[cat_num].price lprice=$products[cat_num].list_price format="%d" assign=discount}
<font class=ProductPriceConverting>{include file="currency.tpl" value=$products[cat_num].list_price}</font>
{else}
<font class=ProductPriceConverting>{include file="currency.tpl" value=$products[cat_num].price}</font>
{/if}
</td>
<td nowrap align=right {include file="main/products_colors.tpl"}>
<font class=AdvancedDiscount> -{$products[cat_num].discount}%</font>
</td>
<td nowrap align=right {include file="main/products_colors.tpl"}>
{* END COLOR CODE MOD *}
<input type="text" size="7" value="{$products[cat_num].price}" name="product_price[{$products[cat_num].productid}]">
</td>
</tr>
{ if %cat_num.last% }
</table>
{/if} {/section}


This is what I actually changed (or added) in the code supplied for this mod:

Code:

{if $products[cat_num].list_price gt 0}
{math equation="100-(price/lprice)*100" price=$products[cat_num].price lprice=$products[cat_num].list_price format="%d" assign=discount}
<font class=ProductPriceConverting>{include file="currency.tpl" value=$products[cat_num].list_price}</font>
{else}
<font class=ProductPriceConverting>{include file="currency.tpl" value=$products[cat_num].price}</font>
{/if}


Again, thanks in advance!

adpboss 11-08-2003 02:33 AM

What version are you running? You need to put your version and server type in your forum signature. It's tough to help someone if we don't know what they are running.

Did you copy the whole products.tpl verbatim or just change the tags?

I don't understand the code you posted that you changed. It has nothing to do with this mod. We are adding smarty tags to the cell formatting by inserting the smarty include in the TD tags. That and adding the NEW AdvancedDiscount CSS.

enge919 11-08-2003 09:48 AM

I cipied the whole thing verbatim and then noticed the list price (or shop price as it showed after the change) was 0.00 and the discount was -%, being the kinda guy I am, I backed everytinhg up first and then started tearing apart code. Afterall how else do I learn?

So after copying the code verbatim and seeing the list price and discount not working, I started analyzing the original code vs. the modified code and came up with the chunk of code I included, that was in the original code.

In short, using the supplied code in 3.4.8, the list price and discount no longer came up.....hmmmmm

adpboss 11-08-2003 09:53 AM

Do you think it could be that you copied my 3.3.8 code and used it for your version?

If you want to implement this mod, I would recommend going into your original products file and manually adding the tags. If you were using 3.3.8 you may be able to shortcut by copying the code but across release versions it is bound to have issues.

I only provided my products code to show all of the instances where I had to add the tags.

Good Luck!

enge919 11-08-2003 10:07 AM

Nevermind......

ADVICE FOR NEWBIES that are really trying to learn how to manipulate the code in X-Cart and think it seems impossible and when you think it makes absolutely no sense do this:

Step back a minute
Take a deep breath


and...............READ THE CODE!


adpBoss, forget everything I said and did in this post. I'm getting better! I just read the code and made a couple changes and everything works just fine. Thanks to all for this mod (and the orders.tpl mod)..They make x-cart a better experience..

adpboss 11-08-2003 10:12 AM

No problem.

We all have to start somewhere and trust me, staring at your cart code for hours on end will make everything seem difficult and confusing.

Sometimes going for a walk and coming back to a problem can work miracles.

Good Luck with your store! :D

nfc5382 11-10-2003 02:57 PM

love it!!!!

BoomBoomBap 11-10-2003 10:15 PM

Custom order date format
 
Not really wanting to create a new topic for this so Im posting it in the forum that inspired me. Sweet mod in this forum I might add!

Anyhow, here's my mod:

Code:

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

This will display your orders in the following format:
Nov. 10, 2003 - 06:33:21 PM

Here's a useful page for further date customizations:
http://unix.about.com/library/weekly/aa042301a.htm

magnumkp 11-11-2003 03:47 AM

Shame I missed this thread earlier. Some good mods here, makes life much easier. \:D/

wild boar 12-10-2003 09:09 PM

Thanks pipercub.. this makes life easier..

pipercub 12-16-2003 11:16 AM

Trying to further mod this mod....
 
Well ,this mod has been working very well for me. However, I wanted to improve it but I'm having some troubles. What I would like to do is the following:

We have obviuosly had success color coding this table. However, I want to be able to display some order data within that table.

Example:
Lets say your color coded table shows two orders. One is complete (green) the other is pending (yellow). On the pending order, I want to be able to see a list of the products associated with that order.

http://www.stargatecinema.com/new_table.gif


Basically, I need to pull info from the "history_order.tpl" and place it into the "order.tpl". Seems pretty simple, but I think these two tpl's call different php files.

*The toggle triangle would be a bonus, but it's above the scope of what I'm trying to do.

Any help would be great!

Pipercub

Gibberish 12-18-2003 02:24 PM

I think you would have to find where the history_order.tpl posts its data in the sql db. My site isnt live yet so I have no orders but im guessing you would ahve to take that persons order number and search the order_details table and pull all the info you want for each order that matches that # in the table.

I might write something but It would be useless on my site since some of my orders are going to be 1000 items +

adpboss 12-18-2003 02:31 PM

Do you expect many customers will spend the time to add over 1,000 items to their cart one by one?

Not being sarcastic, but quite serious. Do you have something special planned so they can purchase faster?

nfc5382 12-20-2003 11:55 AM

Re: Trying to further mod this mod....
 
Quote:

Originally Posted by pipercub
Well ,this mod has been working very well for me. However, I wanted to improve it but I'm having some troubles. What I would like to do is the following:

We have obviuosly had success color coding this table. However, I want to be able to display some order data within that table.

Example:
Lets say your color coded table shows two orders. One is complete (green) the other is pending (yellow). On the pending order, I want to be able to see a list of the products associated with that order.

http://www.stargatecinema.com/new_table.gif


Basically, I need to pull info from the "history_order.tpl" and place it into the "order.tpl". Seems pretty simple, but I think these two tpl's call different php files.

*The toggle triangle would be a bonus, but it's above the scope of what I'm trying to do.

Any help would be great!

Pipercub


This would be useful... any ideas?

nfc5382 06-25-2004 08:45 AM

is there a way to highlight orders that are shipped 2nd day so those stand out more?

adpboss 06-25-2004 10:04 PM

You need to modify this code in the orders_colors.tpl

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}


Something like this (this is only a starting point, I'm too busy to develop your mod for you, it's easy you can do it.)

Code:

{* $Id: orders_colors.tpl,v 1.0 2003/10/26 13:07:50 pipercub Exp $ *}
{if $orders[cat_num].shippingid eq "2" and $orders[cat_num].status ne "C"} bgcolor="#FF0000"}
{else}
{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} {/if}


Hope this helps. Good luck.

nfc5382 06-26-2004 06:43 AM

hey thanks! I couldnt figure out the fields that were in the orders struct. Is there a place where they are defined?

i did something like this in orders.tpl (only support ups):
Code:

<td width=90% class=Text {include file="main/order_colors.tpl"}>

{if $orders[cat_num].shippingid == 0 &&
    $orders[cat_num].shipping_cost == "0.00"}
  FREE
{elseif $orders[cat_num].shippingid == 1}
  UPS Ground
{elseif $orders[cat_num].shippingid == 2}
  UPS World
{elseif $orders[cat_num].shippingid == 23}
  UPS 3 Day
{elseif $orders[cat_num].shippingid == 75}
  UPS Canada
{else}
  ???
{/if}
</td>


works good!!! thanks man!
[/code]

doersam@hotmail.com 09-22-2004 05:18 PM

FYI -- These mods worked fine in 3.5.10 -- Thanks everyone!

adpboss 09-22-2004 05:23 PM

No problem. I can't live without this mod. I do a modest # of orders, I have no idea how people who pump 100's a day through their site keep track visually.

adpboss 10-30-2004 09:29 PM

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.


All times are GMT -8. The time now is 01:24 AM.

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