function uc_order_settings_overview in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_order/uc_order.admin.inc \uc_order_settings_overview()
Display the order settings overview.
1 string reference to 'uc_order_settings_overview'
- uc_order_menu in uc_order/
uc_order.module - Implementation of hook_menu().
File
- uc_order/
uc_order.module, line 648
Code
function uc_order_settings_overview() {
$items = array(
t('Displaying !number orders at a time on the order admin overview.', array(
'!number' => variable_get('uc_order_number_displayed', 30),
)),
t('Order logging is !status.', array(
'!status' => variable_get('uc_order_logging', TRUE) ? t('enabled') : t('disabled'),
)),
t('Addresses on order view pages are !status.', array(
'!status' => variable_get('uc_order_capitalize_addresses', TRUE) ? t('capitalized') : t('displayed as entered'),
)),
);
if (module_exists('ubrowser') && module_exists('uc_catalog')) {
$items[] = t('You are !status the uBrowser to add products to orders.', array(
'!status' => variable_get('uc_ubrowser_product_select', TRUE) ? t('using') : t('not using'),
));
}
$cust_template = variable_get('uc_cust_order_invoice_template', 'customer');
$items[] = t('Order invoice template: !template', array(
'!template' => $cust_template == '0' ? t('custom') : $cust_template,
));
$sections[] = array(
'edit' => 'admin/store/settings/orders/edit',
'title' => t('Order settings'),
'items' => $items,
);
foreach (uc_order_status_list() as $status) {
$statuses[] = $status['title'];
}
$items = array();
$items[] = t('The following order statuses have been defined:') . theme('item_list', $statuses);
$sections[] = array(
'edit' => 'admin/store/settings/orders/edit/workflow',
'title' => t('Order workflow'),
'items' => $items,
);
$items = array();
$panes = _order_pane_list();
foreach ($panes as $pane) {
foreach ($pane['show'] as $view) {
$lists[$view][$pane['id']]['title'] = $pane['title'];
$lists[$view][$pane['id']]['enabled'] = variable_get('uc_order_pane_' . $pane['id'] . '_show_' . $view, TRUE);
$lists[$view][$pane['id']]['weight'] = variable_get('uc_order_pane_' . $pane['id'] . '_weight_' . $view, $pane['weight']);
}
}
$titles = _get_order_screen_titles();
foreach ($lists as $view => $data) {
uasort($lists[$view], 'uc_weight_sort');
}
foreach ($lists as $view => $data) {
$title = t('Order panes on !screen screen', array(
'!screen' => $titles[$view],
));
$pitems = array();
foreach ($data as $id => $pane_data) {
$pitems[] = t('!title is !status.', array(
'!title' => $pane_data['title'],
'!status' => $pane_data['enabled'] ? t('enabled') : t('disabled'),
));
}
$items[] = $title . theme('item_list', $pitems);
}
$sections[] = array(
'edit' => 'admin/store/settings/orders/edit/panes',
'title' => t('Order panes'),
'items' => $items,
);
$output = theme('uc_settings_overview', $sections);
return $output;
}