You are here

function commerce_avatax_menu in Drupal Commerce Connector for AvaTax 7.5

Implements hook_menu().

File

./commerce_avatax.module, line 72
AvaTax service integration from Avalara, Inc.

Code

function commerce_avatax_menu() {
  $items['admin/commerce/config/avatax'] = array(
    'title' => 'Avatax ',
    'description' => 'Avatax Configuration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_avatax_credentials_settings_form',
    ),
    'file' => 'includes/commerce_avatax.admin.inc',
    'access arguments' => array(
      'administer avatax',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/commerce/config/avatax/credentials'] = array(
    'title' => 'Credentials',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'access arguments' => array(
      'administer avatax',
    ),
    'weight' => -10,
  );
  $items['admin/commerce/config/avatax/shipping-settings'] = array(
    'title' => 'Shipping settings',
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer avatax',
    ),
    'page arguments' => array(
      'commerce_avatax_shipping_settings_form',
    ),
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'weight' => -1,
  );
  $items['admin/commerce/config/avatax/address-validation'] = array(
    'title' => 'Address validation',
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer avatax',
    ),
    'page arguments' => array(
      'commerce_avatax_address_settings_form',
    ),
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  $items['admin/commerce/config/avatax/general-settings'] = array(
    'title' => 'General settings',
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer avatax',
    ),
    'page arguments' => array(
      'commerce_avatax_general_settings_form',
    ),
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  $items['admin/commerce/config/avatax/global-vat'] = array(
    'title' => 'Global VAT',
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer avatax',
    ),
    'page arguments' => array(
      'commerce_avatax_global_vat_settings_form',
    ),
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'weight' => 10,
  );
  $items['admin/commerce/orders/%commerce_order/edit/calculate-tax'] = array(
    'title' => 'Calculate Taxes',
    'description' => 'Call the AvaTax service in order to calculate & apply the Tax amount.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'commerce_avatax_order_admin_calculate_tax_form',
      3,
    ),
    'access callback' => 'commerce_avatax_order_admin_form_access',
    'access arguments' => array(
      3,
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'includes/commerce_avatax.admin.inc',
  );
  return $items;
}