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)

Rob Barclay 06-09-2013 02:57 AM

Re: Color coded order status...
 
that will actually work, I remember now what I was thinking of that was harder and it was to do with outputting onto the packing sheet if it was the customers first order or not :)

Vacman 06-09-2013 07:02 AM

Re: Color coded order status...
 
Yeah, going to have to see if someone with a 4.5.x can figure out the searching by userid part. I have it implemented but it is returning no results. XC version differences I am sure.

Will post back here when I get it figured out.

espresso 05-22-2014 12:24 PM

Re: Color coded order status...
 
Has anyone been able to display total orders for 4.5.x ?

The correct link to display all orders by a registered user is:

Code:

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

But {$orders[oid].total_orders} returns nothing.

Thank you

Rob Barclay 05-22-2014 01:51 PM

Re: Color coded order status...
 
1 Attachment(s)
see below post (next post)

Rob Barclay 05-22-2014 01:54 PM

Re: Color coded order status...
 
sorry I have re-read and see probably made it confusing.

Code:

<a href="?userid={$orders[oid].userid}">{$orders[oid].total_orders}</a>

should do the trick for you.

espresso 05-23-2014 01:21 PM

Re: Color coded order status...
 
Rob, thanks for the supper fast response.

the variable {$orders[oid].total_orders} is empty. Did you populate this in a php file ? I tried on 453 and 463, it's empty.

I searched all xcart files and could not find any php file that defines this variable.

Thanks for your help.

Raptor 07-10-2014 10:30 AM

Re: Color coded order status...
 
I'd love to see Rob's code for the shipping setup he has - its fantastic

Rob Barclay 07-10-2014 12:24 PM

Re: Color coded order status...
 
Hi, which part are you after the order statistics? or the auto label creation for interlink/DPD ?

Vacman 03-02-2015 04:43 PM

Re: Color coded order status...
 
As a followup to this thread, I wanted to have an internal color coding when I look at an order without having to scroll down....

In skin/common_files/main/order_info.tpl right below the file info around line 5

Code:

{if $order.status eq "P"} <table><tr><TD bgcolor="#CCFFFF"><strong><B>PROCESSED</B></strong></TD><tr></table><P>{/if}
{if $order.status eq "C"} <table><tr><TD bgcolor="#CCCCCC"><strong><B>COMPLETED</B></strong></TD><tr></table><P> {/if}
{if $order.status eq "F"} <table><tr><TD bgcolor="#FFBBCC"><strong><B>FAILED</B></strong></TD><tr></table><P> {/if} 


Quick, dirty, but gets the job done.

Rob Barclay 03-02-2015 05:01 PM

Re: Color coded order status...
 
It would be better to create a separate file called say order_colours.tpl and put the contents in that.

I have
Code:

{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="#dddddd" {/if}
{if $orders[oid].status eq "F"} bgcolor="#FF3333" {/if}
{if $orders[oid].status eq "I"} bgcolor="#CCCCCC" {/if}
{if $orders[oid].status eq "M"} bgcolor="#660066" {/if}
{if $orders[oid].status eq "L"} bgcolor="#800080" {/if}
{if $orders[oid].status eq "G"} bgcolor="#668d21" {/if}
{if $orders[oid].status eq "K"} bgcolor="#ADBF0B" {/if}
{if $orders[oid].status eq "H"} bgcolor="#ffffff" {/if}
{if $orders[oid].status eq "J"} bgcolor="#000000" {/if}
{if $orders[oid].status eq "N"} bgcolor="#6FC2DF" {/if}
{if $orders[oid].status eq "T"} bgcolor="#ffff00" {/if}
{if $orders[oid].status eq "R"} bgcolor="#CC3232" {/if}
{if $orders[oid].status eq "E"} bgcolor="#FFFF00" {/if}
{if $orders[oid].status eq "S"} bgcolor="#000077" {/if}
{if $orders[oid].status eq "U"} bgcolor="#444400" {/if}
{if $orders[oid].status eq "V"} bgcolor="#E32A54" {/if}

called in from orders_list.tpl
Code:

{include file="path/order_colours.tpl"}

Once you start playing with orders view you can actually add some really useful features.

I have many extras such as outputting orders to csv to generate shipping labels, to show if order is first time order, to show how many orders customer has had, to log if the order was taken as a phone order, total VAT value of order, shipping method etc. You can create some very useful modifications.


All times are GMT -8. The time now is 10:13 PM.

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