Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Color coded order status...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 12-16-2003, 11:16 AM
 
pipercub pipercub is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 82
 

Default 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
Reply With Quote
  #32  
Old 12-18-2003, 02:24 PM
 
Gibberish Gibberish is offline
 

Senior Member
  
Join Date: Sep 2003
Posts: 182
 

Default

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 +
__________________
Gibberish
[Unix] X-Cart 4.0.12
Reply With Quote
  #33  
Old 12-18-2003, 02:31 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

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?
Reply With Quote
  #34  
Old 12-20-2003, 11:55 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default 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?
Reply With Quote
  #35  
Old 06-25-2004, 08:45 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default

is there a way to highlight orders that are shipped 2nd day so those stand out more?
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #36  
Old 06-25-2004, 10:04 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

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.
Reply With Quote
  #37  
Old 06-26-2004, 06:43 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default

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]
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #38  
Old 09-22-2004, 05:18 PM
 
doersam@hotmail.com doersam@hotmail.com is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Snohomish, WA
Posts: 153
 

Default

FYI -- These mods worked fine in 3.5.10 -- Thanks everyone!
__________________
Thanks,
Phil

X-Cart Gold
Version 4.4.5
Reply With Quote
  #39  
Old 09-22-2004, 05:23 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

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.
Reply With Quote
  #40  
Old 10-30-2004, 09:29 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

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.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:43 AM.

   

 
X-Cart forums © 2001-2020