You are here

function uc_cart_menu in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart.module \uc_cart_menu()
  2. 7.3 uc_cart/uc_cart.module \uc_cart_menu()

Implementation of hook_menu().

File

uc_cart/uc_cart.module, line 23

Code

function uc_cart_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/store/settings/cart',
      'title' => t('Cart settings'),
      'description' => t('Configure the cart settings.'),
      'callback' => 'uc_cart_cart_settings_overview',
      'access' => user_access('administer store'),
    );
    $items[] = array(
      'path' => 'admin/store/settings/cart/overview',
      'title' => t('Overview'),
      'description' => t('View the cart settings.'),
      'access' => user_access('administer store'),
      'weight' => -10,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/cart/edit',
      'title' => t('Edit'),
      'description' => t('Edit the cart settings.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_cart_cart_settings_form',
      ),
      'access' => user_access('administer store'),
      'weight' => -5,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/cart/edit/basic',
      'title' => t('Cart settings'),
      'access' => user_access('administer store'),
      'description' => t('Edit the basic cart settings.'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/store/settings/cart/edit/panes',
      'title' => t('Cart panes'),
      'description' => t('Edit the pane settings for the cart view page.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_cart_cart_panes_form',
      ),
      'access' => user_access('administer store'),
      'weight' => -5,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/cart/edit/block',
      'title' => t('Cart block'),
      'callback' => 'uc_cart_block_edit_info',
      'description' => t('Edit the settings for the shopping cart block.'),
      'access' => user_access('administer store'),
      'weight' => 0,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/checkout',
      'title' => t('Checkout settings'),
      'description' => t('Configure the checkout settings.'),
      'callback' => 'uc_cart_checkout_settings_overview',
      'access' => user_access('administer store'),
    );
    $items[] = array(
      'path' => 'admin/store/settings/checkout/overview',
      'title' => t('Overview'),
      'description' => t('View the checkout settings.'),
      'access' => user_access('administer store'),
      'weight' => -10,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/checkout/edit',
      'title' => t('Edit'),
      'description' => t('Edit the cart settings.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_cart_checkout_settings_form',
      ),
      'access' => user_access('administer store'),
      'weight' => -5,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/checkout/edit/basic',
      'title' => t('Checkout settings'),
      'description' => t('Edit the basic checkout settings.'),
      'access' => user_access('administer store'),
      'weight' => -10,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/checkout/edit/panes',
      'title' => t('Checkout panes'),
      'description' => t('Edit the pane settings for the checkout page.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_cart_checkout_panes_form',
      ),
      'access' => user_access('administer store'),
      'weight' => -5,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/checkout/edit/messages',
      'title' => t('Checkout messages'),
      'description' => t('Edit the messages for the checkout completion page.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_cart_checkout_messages_form',
      ),
      'access' => user_access('administer store'),
      'weight' => 0,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/store/settings/checkout/edit/fields',
      'title' => t('Address fields'),
      'description' => t('Edit the address field settings.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'uc_store_address_fields_form',
      ),
      'access' => user_access('administer store'),
      'weight' => 5,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'cart',
      'title' => t('Shopping cart'),
      'description' => t('View/modify the contents of your shopping cart or proceed to checkout.'),
      'callback' => 'uc_cart_view',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'cart/checkout',
      'title' => t('Checkout'),
      'description' => t('Purchase the items in your shopping cart.'),
      'callback' => 'uc_cart_checkout',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'cart/checkout/review',
      'title' => t('Review order'),
      'description' => t('Review an order before final submission.'),
      'callback' => 'uc_cart_checkout_review',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'cart/checkout/complete',
      'title' => t('Order complete'),
      'description' => t('Display information upon completion of an order.'),
      'callback' => 'uc_cart_checkout_complete',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}