You are here

function uc_store_menu in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_store/uc_store.module \uc_store_menu()
  2. 7.3 uc_store/uc_store.module \uc_store_menu()

Implements hook_menu().

File

uc_store/uc_store.module, line 68
Contains global Ubercart functions and store administration functionality.

Code

function uc_store_menu() {
  $items = array();
  $items['admin/store'] = array(
    'title' => 'Store administration',
    'description' => 'Administer store settings, products, orders, and more.',
    'page callback' => 'uc_store_admin',
    'access callback' => 'uc_store_admin_access',
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/customers'] = array(
    'title' => 'Customers',
    'description' => 'View and modify customer information and orders.',
    'page callback' => 'uc_store_customers',
    'access arguments' => array(
      'view customers',
    ),
    'weight' => -6,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/customers/view'] = array(
    'title' => 'View customers',
    'description' => 'View and modify customer information and orders.',
    'page arguments' => array(
      NULL,
      NULL,
      NULL,
      '25',
    ),
    'access arguments' => array(
      'view customers',
    ),
    'weight' => -10,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/customers/search'] = array(
    'title' => 'Search customers',
    'description' => 'Search through your customer list.',
    'page callback' => 'uc_store_customer_search',
    'access arguments' => array(
      'view customers',
    ),
    'weight' => -5,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/reports'] = array(
    'title' => 'Reports',
    'description' => 'Browse various store reports.',
    'page callback' => 'uc_store_reports',
    'access arguments' => array(
      'view store reports',
    ),
    'weight' => 2,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings'] = array(
    'title' => 'Configuration',
    'description' => 'Adjust configuration settings for Ubercart.',
    'page callback' => 'uc_store_configuration_page',
    'access arguments' => array(
      'administer store',
    ),
    'weight' => 6,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/help'] = array(
    'title' => 'Help',
    'description' => 'Links to get help!',
    'page callback' => 'uc_store_ubercart_help',
    'access arguments' => array(
      'administer store',
    ),
    'weight' => 10,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/help/tokens'] = array(
    'title' => 'Using tokens',
    'description' => 'Understand what tokens are and how to use them.',
    'page callback' => 'uc_store_ubercart_help_tokens',
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries'] = array(
    'title' => 'Country settings',
    'description' => 'Configure country specific settings.',
    'page callback' => 'uc_country_settings_overview',
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/overview'] = array(
    'title' => 'Overview',
    'description' => 'View the country settings.',
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/edit'] = array(
    'title' => 'Edit',
    'description' => 'Edit the country settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_country_import_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -5,
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/edit/import'] = array(
    'title' => 'Import countries',
    'description' => 'Import and manage countries.',
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/edit/formats'] = array(
    'title' => 'Country formats',
    'description' => 'Edit the country specific format settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_country_formats_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -5,
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/store'] = array(
    'title' => 'Store settings',
    'description' => 'Configure the main store settings.',
    'page callback' => 'uc_store_store_settings_overview',
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/store/overview'] = array(
    'title' => 'Overview',
    'description' => 'View the store settings.',
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/store/edit'] = array(
    'title' => 'Edit',
    'description' => 'Edit the store settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_store_store_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -5,
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/store/edit/contact'] = array(
    'title' => 'Contact settings',
    'description' => 'Edit the contact settings.',
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/store/edit/display'] = array(
    'title' => 'Display settings',
    'description' => 'Edit the display settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_store_display_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'weight' => -5,
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/store/edit/format'] = array(
    'title' => 'Format settings',
    'description' => 'Edit the format settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_store_format_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'weight' => 0,
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/store/initials'] = array(
    'title' => 'User initials',
    'description' => 'Assign initials to user accounts.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_store_initials',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );

  /*$items['admin/store/settings/tables'] = array(
      'title' => 'Table display settings',
      'description' => 'Configure the display of tables in your store.',
      'page callback' => 'uc_store_tables',
      'access arguments' => array('administer store'),
      'type' => MENU_NORMAL_ITEM,
    );*/
  $items['uc_js_util/%'] = array(
    'title' => 'JS utilities',
    'page callback' => 'uc_store_js_util',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/store/customers/orders/%'] = array(
    'title' => 'Customer orders',
    'description' => 'View a list of orders placed by this customer.',
    'page callback' => 'uc_store_customer_orders',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'view all orders',
    ),
    'weight' => -5,
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/%/disable'] = array(
    'title' => 'Disable a country',
    'description' => 'Disable a country from use.',
    'page callback' => '_uc_country_perform_country_action',
    'page arguments' => array(
      'uc_country_disable',
      4,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/%/enable'] = array(
    'title' => 'Enable a country',
    'description' => 'Enable a disabled country.',
    'page callback' => '_uc_country_perform_country_action',
    'page arguments' => array(
      'uc_country_enable',
      4,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/%/remove'] = array(
    'title' => 'Remove a country',
    'description' => 'Remove an installed country.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_country_remove_form',
      4,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/countries/%/update/%'] = array(
    'title' => 'Update a country',
    'description' => 'Update an installed country.',
    'page callback' => '_uc_country_perform_country_action',
    'page arguments' => array(
      'uc_country_update',
      4,
      6,
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_store.admin.inc',
  );
  $items['admin/store/settings/price-handlers'] = array(
    'title' => 'Price handler settings',
    'description' => 'Select which price handlers to use for your store.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_price_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'uc_store.admin.inc',
  );
  return $items;
}