You are here

function uc_cart_menu in Ubercart 7.3

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

Implements hook_menu().

File

uc_cart/uc_cart.module, line 28

Code

function uc_cart_menu() {
  $items = array();
  $items['admin/store/settings/cart'] = array(
    'title' => 'Cart',
    'description' => 'Configure the cart page display and settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_cart_cart_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'file' => 'uc_cart.admin.inc',
  );
  $items['admin/store/settings/checkout'] = array(
    'title' => 'Checkout',
    'description' => 'Configure the checkout page display and completion rules.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_cart_checkout_settings_form',
    ),
    'access arguments' => array(
      'administer store',
    ),
    'file' => 'uc_cart.admin.inc',
  );
  $items['admin/store/settings/checkout/settings'] = array(
    'title' => 'Settings',
    'description' => 'Edit the basic checkout settings.',
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/store/settings/checkout/rules'] = array(
    'title' => 'Rules',
    'description' => 'Edit the checkout rules.',
    'page callback' => 'uc_cart_checkout_rules',
    'access arguments' => array(
      'administer store',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'uc_cart.admin.inc',
  );
  $items += rules_ui()
    ->config_menu('admin/store/settings/checkout/rules');
  $items['cart'] = array(
    'title' => 'Shopping cart',
    'description' => 'View/modify the contents of your shopping cart or proceed to checkout.',
    'page callback' => 'uc_cart_view',
    'access arguments' => array(
      'access content',
    ),
    'file' => 'uc_cart.pages.inc',
  );
  $items['cart/empty'] = array(
    'title' => 'Empty cart',
    'description' => 'Confirm that the cart should be emptied.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_cart_empty_confirm',
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_cart.pages.inc',
  );
  $items['cart/checkout'] = array(
    'title' => 'Checkout',
    'description' => 'Purchase the items in your shopping cart.',
    'page callback' => 'uc_cart_checkout',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_cart.pages.inc',
  );
  $items['cart/checkout/review'] = array(
    'title' => 'Review order',
    'description' => 'Review an order before final submission.',
    'page callback' => 'uc_cart_checkout_review',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_cart.pages.inc',
  );
  $items['cart/checkout/complete'] = array(
    'title' => 'Order complete',
    'description' => 'Display information upon completion of an order.',
    'page callback' => 'uc_cart_checkout_complete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_cart.pages.inc',
  );
  return $items;
}