function uc_store_store_settings_overview in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_store/uc_store.admin.inc \uc_store_store_settings_overview()
Display the store settings overview page.
1 string reference to 'uc_store_store_settings_overview'
- uc_store_menu in uc_store/
uc_store.module - Implementation of hook_menu().
File
- uc_store/
uc_store.module, line 1294 - Contains global Ubercart functions and store administration functionality.
Code
function uc_store_store_settings_overview() {
$name = variable_get('uc_store_name', NULL);
$owner = variable_get('uc_store_owner', NULL);
$email = variable_get('uc_store_email', NULL);
$phone = variable_get('uc_store_phone', NULL);
$fax = variable_get('uc_store_fax', NULL);
$sections[] = array(
'edit' => 'admin/store/settings/store/edit',
'title' => t('Name and contact information'),
'items' => array(
t('Store name is %name.', array(
'%name' => !empty($name) ? $name : t('not set'),
)),
t('Store owner is %owner.', array(
'%owner' => !empty($owner) ? $owner : t('not set'),
)),
t('Store e-mail is %email.', array(
'%email' => !empty($email) ? $email : t('not set'),
)),
t('Store phone number is !phone.', array(
'!phone' => !empty($phone) ? $phone : t('not set'),
)),
t('Store fax number is !fax.', array(
'!fax' => !empty($fax) ? $fax : t('not set'),
)),
t('Store address is:<p>!address', array(
'!address' => uc_store_address(),
)),
),
);
switch (variable_get('uc_store_admin_page_display', 1)) {
case 1:
$type = t('Dashboard with collapsed submenu links');
break;
case 2:
$type = t('Dashboard with expanded submenu links');
break;
case 3:
$type = t('Dashboard with no submenu links');
break;
case 4:
$type = t('Normal Drupal submenu listing');
break;
}
$sections[] = array(
'edit' => 'admin/store/settings/store/edit/display',
'title' => t('Display settings'),
'items' => array(
t('Store admin page display type:<br />!type', array(
'!type' => $type,
)),
t('Customer !type address used in lists.', array(
'!type' => variable_get('uc_customer_list_address', 'billing') == 'billing' ? t('billing') : t('shipping'),
)),
t('Footer using !type message.', array(
'!type' => variable_get('uc_footer_message', 0) == 0 ? t('random') : t('specified'),
)),
),
);
$sections[] = array(
'edit' => 'admin/store/settings/store/edit/format',
'title' => t('Format settings'),
'items' => array(
t('Default currency: !code', array(
'!code' => variable_get('uc_currency_code', 'USD'),
)),
t('Currency format: !value', array(
'!value' => uc_currency_format(1234.56),
)),
t('Weight format: !value', array(
'!value' => uc_weight_format(36),
)),
t('Date format: !value', array(
'!value' => uc_date_format(8, 18, 2007),
)),
),
);
$items = array();
if (variable_get('uc_store_report', TRUE)) {
$items[] = t('Version information is being reported to Ubercart.org.');
}
else {
$items[] = t('Your site is not reporting to Ubercart.org.');
}
$sections[] = array(
'edit' => 'admin/store/settings/store/edit/report',
'title' => t('Reporting settings'),
'items' => $items,
);
$output = theme('uc_settings_overview', $sections);
return $output;
}