Contributions

Features (Category Index)
Search: 

Admin Summary Info

The "Admin Summary Info" contribution is designed to display usefull shop information directly in the header of your admin page. With the "Admin Summary Info" contribution you can quickly monitor how many orders you have received along with their status, number of customers, Reviews, and even how many users are currently online exploring and shopping at your oscommerce store. This contribution was developed to put some of the most commonly needed day to day data within a single clicks reach to save time while adminstrating your site.

Expand All / Collapse All

Admin Summary Bugfix 25 Dec 2008

There was a problem with the order total summary, the field value in the table orders_total is shown the shop default value, not the foreign currency value.

That means the output, Total USD 1000.-, Total EUR 500.- was not true, in fact it is 1500.- USD.

So this new code is much smaller, and the annoying long output is now shorten to the default shop currency.

Change the whole order total summary section in admin/icludes/header.php to this:

// order total summary
if(!is_object($currencies)){include_once(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies();}
$sum_query = tep_db_query("select sum(ot.value) as sum from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) where ot.class = 'ot_total'");
$sum = tep_db_fetch_array($sum_query);

$today_sum_query = tep_db_query("select sum(ot.value) as sum from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) where to_days(o.date_purchased) = to_days(now()) and ot.class = 'ot_total'");
$today_sum = tep_db_fetch_array($today_sum_query);

echo '<tr><td align="right" class="smallText">' . sprintf(TEXT_SUMMARY_INFO_ORDERS_TOTAL, $currencies->format($sum['sum']), $currencies->format($today_sum['sum'])) . '</td><td align="center" width="40"><a href="' . tep_href_link(FILENAME_STATS_SALES_REPORT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'icons/summary_totals.gif', HEADER_TITLE_SUPPORT_SITE) . '</a></td></tr>';
echo '</table></td>';

Thats it, have fun!

File contains only this bugfix.

Admin Summary Info v1.1 improvement 31 Oct 2008
Admin Summary V1.2 31 Oct 2008
Admin Summary Info v1.1 28 May 2007
Admin Summary Info v1.0 18 May 2007

Note: Contributions are used at own risk.