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
  #181  
Old 09-08-2010, 12:24 PM
 
Rob Barclay Rob Barclay is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 38
 

Default Re: Color coded order status...

i found it better effect to add the colouring to the checkbox was easy to impliment and should work with all version from 4.2+

I also added colour scheme at the top so client could see quick guide to what each means.

in skin1/main/orders_list.tpl added:

Code:
<tr{cycle values=", class='TableSubHead'"}> <td width="5" {include file="main/orders_colors.tpl"}><input type="checkbox" name="orderids[{$orders[oid].orderid}]" /></td>

and contents of the orders_colors.tpl:

Code:
{if $orders[oid].status eq "B"} bgcolor="#2D3F6D" {/if} {if $orders[oid].status eq "C"} bgcolor="#00CCFF" {/if} {if $orders[oid].status eq "D"} bgcolor="#C0A4E6" {/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} {if $orders[oid].status eq "G"} bgcolor="#668d21" {/if} {if $orders[oid].status eq "H"} bgcolor="#A10000" {/if} {if $orders[oid].status eq "J"} bgcolor="#EF5400" {/if} {if $orders[oid].status eq "Z"} bgcolor="#000000" {/if}
Attached Thumbnails
Click image for larger version

Name:	order-colours.jpg
Views:	309
Size:	214.7 KB
ID:	2070  
__________________
Version 4.6.1
Reply With Quote
  #182  
Old 02-14-2011, 08:54 PM
 
merscham merscham is offline
 

Member
  
Join Date: Jul 2006
Posts: 17
 

Default Re: Color coded order status...

Any updates for this for version 4.4.2?
Can't seem to get it going.
__________________
merscham
Running XCART 4.4.2
PHP 5.3.8
Reply With Quote
  #183  
Old 03-31-2011, 04:28 PM
  bullfrog's Avatar 
bullfrog bullfrog is offline
 

eXpert
  
Join Date: Oct 2004
Location: Oregon, USA
Posts: 366
 

Default Color coded order status and shipping method, 4.4.2

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.
__________________
Bullfrog ~~~ X-Cart Gold v4.7.2 (2) v4.7.8. ⌠If the road is easy, you're likely going the wrong way.■ ― Terry Goodkind
Reply With Quote

The following 4 users thank bullfrog for this useful post:
cherkes (08-22-2012), elmirage001 (09-20-2014), GreatLakesVacuum (08-28-2012), Raptor (08-21-2012)
  #184  
Old 08-21-2012, 06:51 PM
  Raptor's Avatar 
Raptor Raptor is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 131
 

Default Re: Color coded order status...

Confirmed instructions in #183 works with 4.5.1

Thanks

Update: Works with 4.6.0 too

Update 2: Works with 4.7.6 too
__________________
X-Cart Gold Plus v4.7.12
ReBOOT ReDUX Theme
Reply With Quote

The following user thanks Raptor for this useful post:
ADDISON (09-19-2012)
  #185  
Old 06-08-2013, 02:01 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Color coded order status...

Works in 4.5.5 as well.
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #186  
Old 06-08-2013, 02:27 PM
 
Rob Barclay Rob Barclay is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 38
 

Default Re: Color coded order status...

Forgot I posted this.

I have done a lot more over the last 2 years on this on my own site.

I have added a php script via include that I wrote that shows the girls how many orders they have to complete before we close each evening at 5pm (the screenshot does not show this as I set it to only show these stats after 1pm because if they didnt think there was a lot to do they went slower and then we ended up getting caught short at end of the night.

My screenshot also shows the extra status drop downs as I integrated a dropdown of "Staff" so I can see at a glance who packed the order. I integrated a php script so they set the service of the parcel (interlink or fedex) and then choose the weight and it sends the customers data straight to our label printer and prints off the fedex or interlink label.

Also on left you can see confirmed failed/abort I set this so any failed or not finished transactions I check payment did fail then change the status to confirmed failed and it emails the customer to let them know the order was not completed and gives them options to pay it if they still want the order (most customers go back online and re-order after this email).

I added a column to see how many orders each customer has placed with us as well as adding a section under the order id and used kayako api to check if customer has any open tickets with us so the girls spot it before processing the orders. Nothing worse than completing all orders to then see a ticket saying "Cancel my order" and we then have to find it amongst many orders etc.

Shared a few images to give you some ideas that you might want to impliment too.
Attached Thumbnails
Click image for larger version

Name:	order-views.jpg
Views:	190
Size:	229.7 KB
ID:	3467  Click image for larger version

Name:	customer-notes.jpg
Views:	178
Size:	226.9 KB
ID:	3468  Click image for larger version

Name:	first-order.jpg
Views:	170
Size:	269.4 KB
ID:	3469  
__________________
Version 4.6.1
Reply With Quote
  #187  
Old 06-08-2013, 02:43 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Color coded order status...

Thanks for sharing Rob. Looks nice!

I like a couple of the ideas - especially the the # of orders the customer has placed. It looks like you can click on those to see those orders as well.

I would be interested in seeing that snippet - I know I am being lazy - lol.
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #188  
Old 06-08-2013, 02:50 PM
 
Rob Barclay Rob Barclay is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 38
 

Default Re: Color coded order status...

no problem, I remember it was bigger than I expected it to be when I done it. I will post the code tomorrow when I am in work as I dont have FTP access outside of my works address. I secured the server to only allow FTP from my static IP address at work (meant to create a secure connection to work but never got it working lol).
__________________
Version 4.6.1
Reply With Quote
  #189  
Old 06-08-2013, 05:09 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Color coded order status...

OK - Thanks!
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #190  
Old 06-09-2013, 02:55 AM
 
Rob Barclay Rob Barclay is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 38
 

Default Re: Color coded order status...

They maybe more to it than this I will check for you if it does not work but I think it could:

In skin1/main/orders_list.tpl

Code:
<td style="text-align: center;"><a href="orders.php?username={$orders[oid].login}" title="View orders from this client">{$orders[oid].total_orders}</a></td>

You will need to add a header column etc to match or all your columns will be out. Give it a try and let me know if you need more help with it.

Rob
__________________
Version 4.6.1
Reply With Quote

The following user thanks Rob Barclay for this useful post:
Raptor (07-22-2013)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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

   

 
X-Cart forums © 2001-2020