Admin Dashboard - Add Year to Top "Compare" Statistics 2.2.3

I believe there is/was a little confusion as to what statistics the Admin Dashboard Order Statistics thread was referring to so I have created this thread to show how to add the Year to the top statistic which compares order totals from the previous day, week, month and now year.



In /skins/basic/admin/views/index/index.tpl replace:





with:


{include file="common_templates/price.tpl" value=$orders_stats.daily_orders.totals.total_paid} {$lang.today} {$lang.prev} {include file="common_templates/price.tpl" value=$orders_stats.daily_orders.prev_totals.total_paid} {if $orders_stats.daily_orders.totals.profit}({if $orders_stats.daily_orders.totals.profit >= 0}+{/if}{$orders_stats.daily_orders.totals.profit}%){/if}

{include file="common_templates/price.tpl" value=$orders_stats.weekly_orders.totals.total_paid} {$lang.week} {$lang.prev} {include file="common_templates/price.tpl" value=$orders_stats.weekly_orders.prev_totals.total_paid} {if $orders_stats.weekly_orders.totals.profit}({if $orders_stats.weekly_orders.totals.profit >= 0}+{/if}{$orders_stats.weekly_orders.totals.profit}%){/if}

{include file="common_templates/price.tpl" value=$orders_stats.monthly_orders.totals.total_paid} {$lang.month} {$lang.prev} {include file="common_templates/price.tpl" value=$orders_stats.monthly_orders.prev_totals.total_paid} {if $orders_stats.monthly_orders.totals.profit}({if $orders_stats.monthly_orders.totals.profit >= 0}+{/if}{$orders_stats.monthly_orders.totals.profit}%){/if}

{include file="common_templates/price.tpl" value=$orders_stats.yearly_orders.totals.total_paid} {$lang.year} {$lang.prev} {include file="common_templates/price.tpl" value=$orders_stats.yearly_orders.prev_totals.total_paid} {if $orders_stats.yearly_orders.totals.profit}({if $orders_stats.yearly_orders.totals.profit >= 0}+{/if}{$orders_stats.yearly_orders.totals.profit}%){/if}




You will also need to edit /skins/basic/admin/styles.css and change the width from 31 to 23 so the data will fit properly:

.statistics-box.overall .statistics-body .section {
display: inline-block;
width: 23%;
margin: 0 6px;
white-space: normal;
border-right: 1px dotted #ccc;
text-decoration: none;
}




[attachment=4634:Administration panel_1319362178622.png]

Administration panel_1319362178622.png

After applying this to my live store, the yearly data is not being pulled. Now the discussion can continue to figure out how to pull the data. I am not interested enough in this so I will more than likely not be participating.