function uc_quote_overview in Ubercart 5
Same name and namespace in other branches
- 6.2 shipping/uc_quote/uc_quote.admin.inc \uc_quote_overview()
Display a summary of the shipping quote settings.
1 string reference to 'uc_quote_overview'
- uc_quote_menu in shipping/
uc_quote/ uc_quote.module - Implementation of hook_menu().
File
- shipping/
uc_quote/ uc_quote.module, line 570 - The controller module for fulfillment modules that process physical goods.
Code
function uc_quote_overview() {
$sections = array();
$address = variable_get('uc_quote_store_default_address', new stdClass());
$sections[] = array(
'edit' => 'admin/store/settings/quotes/edit',
'title' => t('Quote settings'),
'items' => array(
variable_get('uc_quote_log_errors', false) ? t('Quote errors are submitted to watchdog.') : t('Quote errors are not submitted to watchdog.'),
variable_get('uc_quote_display_debug', false) ? t('Debugging information is displayed to administrators when quotes are generated.') : t('Debugging information is not displayed to administrators when quotes are generated.'),
t('The default store shipping address is:<br />!address', array(
'!address' => uc_address_format($address->first_name, $address->last_name, $address->company, $address->street1, $address->street2, $address->city, $address->zone, $address->postal_code, $address->country),
)),
),
);
$items = array();
$methods = array_filter(module_invoke_all('shipping_method'), '_uc_quote_method_enabled');
uasort($methods, '_uc_quote_type_sort');
foreach ($methods as $method) {
$items[] = l(t('@method is enabled.', array(
'@method' => $method['title'],
)), 'admin/store/settings/quotes/methods/' . $method['id']);
}
$sections[] = array(
'edit' => 'admin/store/settings/quotes/methods',
'title' => t('Quote methods'),
'items' => $items,
);
$types = uc_quote_shipping_type_options();
$default = variable_get('uc_store_shipping_type', 'small_package');
$types[$default] .= theme('item_list', array(
t('Default'),
));
$sections[] = array(
'edit' => 'admin/store/settings/quotes/methods',
'title' => t('Shipping types'),
'items' => $types,
);
return theme('uc_settings_overview', $sections);
}