You are here

function uc_cart_links_menu in Ubercart 7.3

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

Implements hook_menu().

File

uc_cart_links/uc_cart_links.module, line 31
Allows store owners to create links to add products to carts and send customers on to checkout.

Code

function uc_cart_links_menu() {
  $items['admin/store/settings/cart-links'] = array(
    'title' => 'Cart links',
    'description' => 'Configure and craft special links to add products directly to the cart.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_cart_links_settings_form',
    ),
    'access arguments' => array(
      'administer cart links',
    ),
    'file' => 'uc_cart_links.admin.inc',
  );
  $items['admin/store/reports/cart-links'] = array(
    'title' => 'Cart links',
    'description' => 'Track clicks through Cart Links.',
    'page callback' => 'uc_cart_links_report',
    'access arguments' => array(
      'view cart links report',
    ),
    'file' => 'uc_cart_links.admin.inc',
  );
  $items['cart/add/%'] = array(
    'title' => 'Add to cart',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'uc_cart_links_form',
      2,
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'uc_cart_links.pages.inc',
  );
  return $items;
}