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 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:17 AM.

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