You are here

function uc_catalog_settings_overview in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_catalog/uc_catalog.admin.inc \uc_catalog_settings_overview()

Display an overview of all catalog settings.

1 string reference to 'uc_catalog_settings_overview'
uc_catalog_menu in uc_catalog/uc_catalog.module
Implementation of hook_menu().

File

uc_catalog/uc_catalog.module, line 553
Übercart Catalog module.

Code

function uc_catalog_settings_overview() {
  $sections = array();
  $sections[] = array(
    'edit' => 'admin/store/settings/catalog/edit',
    'title' => t('Catalog settings'),
    'items' => array(
      t('The catalog vocabulary id is !vid.', array(
        '!vid' => variable_get('uc_catalog_vid', 0),
      )),
      t('The base URL pointing to the catalog is !url.', array(
        '!url' => 'catalog',
      )),
      variable_get('uc_catalog_breadcrumb', true) ? t('The catalog breadcrumb will be shown.') : t('The catalog breadcrumb will not be shown.'),
      variable_get('uc_catalog_breadcrumb_nodecount', false) ? t('The number of nodes in a category will be shown in the catalog breadcrumb.') : t('The number of nodes in a category will not be shown in the catalog breadcrumb.'),
      format_plural(variable_get('uc_catalog_category_columns', 3), 'Subcategories will be displayed in @count column.', 'Subcategories will be displayed in @count columns.'),
    ),
  );
  $sections[] = array(
    'edit' => 'admin/store/settings/catalog/edit/grid',
    'title' => t('Products grid settings'),
    'items' => array(
      variable_get('uc_catalog_grid_display', false) ? t('The catalog will be displayed on a grid.') : t('The catalog will be displayed on a table list.'),
      format_plural(variable_get('uc_catalog_grid_display_width', 3), 'The grid will be displayed in @count column.', 'The grid will be displayed in @count columns.'),
      variable_get('uc_catalog_grid_display_title', true) ? t('Every cell on the grid will display the Product Title.') : t('Cells on the grid will not display Product Titles.'),
      variable_get('uc_catalog_grid_display_model', true) ? t('Every cell on the grid will display the Product SKU.') : t('Cells on the grid will not display Product SKU.'),
      variable_get('uc_catalog_grid_display_sell_price', true) ? t('Every cell on the grid will display the Product Selling Price.') : t('Cells on the grid will not display Product Selling Prices.'),
      variable_get('uc_catalog_grid_display_add_to_cart', true) ? t('Every cell on the grid will display the Add to Cart button.') : t('Cells on the grid will not display Add to Cart buttons.'),
      variable_get('uc_catalog_grid_display_attributes', true) ? t('Every cell on the grid will display Product Attibutes.') : t('Cells on the grid will not display Product Attibutes.'),
    ),
  );
  $sections[] = array(
    'edit' => 'admin/store/settings/catalog/edit/blocks',
    'title' => t('Catalog block settings'),
    'items' => array(
      variable_get('uc_catalog_block_nodecount', true) ? t('The number of nodes in a category will be shown in the catalog block.') : t('The number of nodes in a category will not be shown in the catalog block.'),
      variable_get('uc_catalog_show_subcategories', true) ? t('Subcategories with no products to display will be shown on category pages.') : t('Subcategories with no products to display will not be shown on category pages.'),
      variable_get('uc_catalog_expand_categories', false) ? t('Categories in the catalog block will always be expanded.') : t('Categories in the catalog block will be expanded only when selected.'),
    ),
  );
  $output = theme('uc_settings_overview', $sections);
  return $output;
}