function uc_cart_cart_settings_overview in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_cart/uc_cart.admin.inc \uc_cart_cart_settings_overview()
1 string reference to 'uc_cart_cart_settings_overview'
- uc_cart_menu in uc_cart/
uc_cart.module - Implementation of hook_menu().
File
- uc_cart/
uc_cart.module, line 604
Code
function uc_cart_cart_settings_overview() {
$sections[] = array(
'edit' => 'admin/store/settings/cart/edit',
'title' => t('Cart settings'),
'items' => array(
t('Add item URL redirect is:<br />!url', array(
'!url' => url(variable_get('uc_add_item_redirect', 'cart'), NULL, NULL, TRUE),
)),
t('Minimum order subtotal is !min.', array(
'!min' => uc_currency_format(variable_get('uc_minimum_subtotal', 0)),
)),
t('Anonymous cart duration is !duration.', array(
'!duration' => variable_get('uc_cart_anon_duration', '4') . ' ' . variable_get('uc_cart_anon_unit', 'hours'),
)),
t('Authenticated cart duration is !duration.', array(
'!duration' => variable_get('uc_cart_auth_duration', '1') . ' ' . variable_get('uc_cart_auth_unit', 'years'),
)),
t('Continue shopping !type is:<br />!link', array(
'!type' => variable_get('uc_continue_shopping_type', 'link') == 'link' ? t('link') : t('button'),
'!link' => l(variable_get('uc_continue_shopping_text', t('Continue shopping')), variable_get('uc_cart_continue_shopping', '')),
)),
t('Default cart breadcrumb is:<br />!link', array(
'!link' => l(variable_get('uc_cart_breadcrumb_text', t('Home')), variable_get('uc_cart_breadcrumb_url', '')),
)),
),
);
$panes = uc_cart_cart_pane_list(NULL);
foreach ($panes as $pane) {
$items[] = t('!title is !enabled.', array(
'!title' => $pane['title'],
'!enabled' => $pane['enabled'] ? t('enabled') : t('disabled'),
));
}
$sections[] = array(
'edit' => 'admin/store/settings/cart/edit/panes',
'title' => t('Cart panes (in display order)'),
'items' => $items,
);
if (variable_get('uc_cart_show_help_text', FALSE)) {
$help_text = t('Help text is shown in block:') . '<br /><i>' . variable_get('uc_cart_help_text', t('Click title to display cart contents.')) . '</i>';
}
else {
$help_text = t('Help text is not shown in block.');
}
$sections[] = array(
'edit' => 'admin/store/settings/cart/edit/block',
'title' => t('Cart block'),
'items' => array(
t('Cart block is !option when empty.', array(
'!option' => variable_get('uc_cart_empty_hide', FALSE) ? t('hidden') : t('shown'),
)),
t('Cart block is !option by default.', array(
'!option' => variable_get('uc_cart_expanded', FALSE) ? t('expanded') : t('collapsed'),
)),
$help_text,
),
);
$output = theme('uc_settings_overview', $sections);
return $output;
}