MOD: See Order Status in Recent Orders on Admin Home

  1. In ‘/include/admin/home.php’



    ADD (Part in [COLOR=red]RED[/COLOR])



$latest_orders = db_get_array("SELECT order_id, timestamp, firstname, lastname, total, user_id[COLOR=red], status[/COLOR] FROM $db_tables[orders] ORDER BY timestamp DESC LIMIT 10");
2. In ‘/skins/ADMIN_SKIN/admin/statistics_pages/statistics.tpl’



ADD (Part in [COLOR=red]RED[/COLOR])


```php

{$lang.order} #{$order.order_id} {$lang.by} {if $order.user_id}{/if}{$order.firstname} {$order.lastname}{if $order.user_id}{/if} {$lang.for} {include file="common_templates/price.tpl" value=$order.total}
{$lang.on} {$order.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"}[COLOR=red]
[/COLOR][COLOR=Red]{$lang.status}: {include file="orders_pages/order_status.tpl" status=$order.status display="view"}[/COLOR]

```

[quote name=‘mdekok3000’]

```php

{$lang.order} #{$order.order_id} {$lang.by} {if $order.user_id}{/if}{$order.firstname} {$order.lastname}{if $order.user_id}{/if} {$lang.for} {include file="common_templates/price.tpl" value=$order.total}
{$lang.on} {$order.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"}[COLOR=red]
Status: {if $order.status == "P"}Processed{elseif $order.status == "F"}Failed{elseif $order.status == "O"}Open{elseif $order.status == "B"}Backordered{elseif $order.status == "I"}Cancelled{elseif $order.status == "C"}Completed{elseif $order.status == "D"}Declined{else}{$order.status}{/if}[/COLOR]

```[/QUOTE]

It will be better if you replace with this one to allow the new modified order statuses to be available to show. :idea:

```php
{$lang.order} #{$order.order_id} {$lang.by} {if $order.user_id}{/if}{$order.firstname} {$order.lastname}{if $order.user_id}{/if} {$lang.for} {include file="common_templates/price.tpl" value=$order.total}
{$lang.on} {$order.timestamp|date_format:"`$settings.Appearance.date_format`, `$settings.Appearance.time_format`"}
[COLOR="Red"]{$lang.status}: {include file="orders_pages/order_status.tpl" status=$order.status display="view"}
[/COLOR] ```

Thank you barabry! :stuck_out_tongue:

You are more than welcome :wink:

Thank you, nice MOD!

You’re welcome from barabry and me.

Very nice!



Gives the quick glance at what is going on without having to hit “view orders” every time.

Guys,



Nice mod, makes it much easier to know whats going on with just a glance at the page.



Thanks,

Aleks

Great mod, its the simple things that work best.

admin.php?target=orders



I see :



Order id, status, customer name, email, date and total.





How could I have a link to customer profile in “customer name” section. Currently name and surname are displayed just as text. Thank you.

Here is what I have that creates a link on the first/last name:




[quote name=‘WebGuy’]Here is what I have that creates a link on the first/last name:[/QUOTE]



Hi,



Thanks but this does not work for me.



Do you add it to admin/orders_pages/orders.tpl ?



What does [/color] do?

Darius, in /skins//admin/orders_pages/orders.tpl



Look for:


{$o.firstname} {$o.lastname}

[quote name=‘whiplash13’]Darius, in /skins//admin/orders_pages/orders.tpl



Look for:


{$o.firstname} {$o.lastname}[/QUOTE]



Many thanks! Works perfect!

Is there a way to modify this code so if customer is not registered so just his name and surname would be displayed with no link.



Thanks!


[quote name=‘whiplash13’]Darius, in /skins//admin/orders_pages/orders.tpl



Look for:


{$o.firstname} {$o.lastname}

sure. Use code below to replace the code i originally posted:


	{if $o.user_id}{$o.firstname} {$o.lastname}{else}{$o.firstname} {$o.lastname}{/if}

Works like charm! Many thanks


[quote name=‘whiplash13’]sure. Use code below to replace the code i originally posted:


	{if $o.user_id}{$o.firstname} {$o.lastname}{else}{$o.firstname} {$o.lastname}{/if}

Does anybody know how to get the sum of totally paid items in admin frontpage?



Right now what you get is the total for orders made, which does not tell you exactly what you have really earned dayily, weekly or monthly. I have many cancelled orders and other orders I know for sure they won’t be paid so that sum does not really tell me how the store is doing.