function uc_reports_help in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_reports/uc_reports.module \uc_reports_help()
- 7.3 uc_reports/uc_reports.module \uc_reports_help()
Implementation of hook_help().
File
- uc_reports/
uc_reports.module, line 24 - Displays reports on sales, customers, and products to store admin
Code
function uc_reports_help($section) {
if (!strncmp($section, 'admin/store/reports/', 20)) {
$statuses = array();
foreach (variable_get('uc_reports_reported_statuses', array(
'completed',
)) as $status) {
$statuses[] = db_result(db_query("SELECT title FROM {uc_order_statuses} WHERE order_status_id = '%s'", $status));
}
$order_statuses = t('<b>Order statuses used:</b> @statuses', array(
'@statuses' => implode(', ', $statuses),
));
switch ($section) {
case 'admin/store/reports/customers':
return '<p>' . t("The following are total orders, products, sales, and average order totals for each store customer. Clicking on the header links will toggle a descending or ascending order for that column. Clicking on a customer's name will take you to a detailed list of orders that customer has made. Clicking on a customers username will take you to their account page.") . '</p><p>' . $order_statuses . '</p>';
case 'admin/store/reports/products':
return '<p>' . t('The table lists each product listed in the store, its amount sold, how many times it has been viewed, revenue it has produced, and gross profit it has generated. If you do not see the number of views you must enable the Statistics module on the <a href="!url">module administration page</a>.', array(
'!url' => url('admin/build/modules'),
)) . '</p><p>' . $order_statuses . '</p>';
case 'admin/store/reports/products/custom':
return t('Expand the fieldset below to customize the date range of this report, and the statuses of orders displayed.');
case 'admin/store/reports/sales':
return '<p>' . t('These are the sales for the last two days, average sales for the month, and the projected sales for the rest of the month. Further down the list you will see other sales statistics.') . '</p><p>' . $order_statuses . '</p>';
case 'admin/store/reports/sales/custom':
return t('Expand the fieldset below to customize the date range of this report, the statuses of orders displayed, and product display options.');
}
if (strpos($section, 'admin/store/reports/sales/year') === 0) {
$year = $arg[5] ? $arg[5] : format_date(time(), 'custom', "Y");
return '<p>' . t('This is the monthly break down of sales for the year @year. Clicking on each link will take you to a list of orders during that month.', array(
'@year' => $year,
)) . '</p><p>' . $order_statuses . '</p>';
}
}
}