Skip navigation


7 uc_order.api.php hook_uc_order_pane()

Registers callbacks for an order pane.

This hook is used to add panes to the order viewing and administration screens. The default panes include areas to display and edit addresses, products, comments, etc. Developers should use this hook when they need to display or modify any custom data pertaining to an order. For example, a store that uses a custom checkout pane to find out a customer's desired delivery date would then create a corresponding order pane to show the data on the order screens.

hook_uc_order_pane() works by defining new order panes and providing a little bit of information about them. View the return value section below for information about what parts of an order pane are defined by the hook.

The real meat of an order pane is its callback function (which is specified in the hook). The callback function handles what gets displayed on which screen and what data can be manipulated. That is all somewhat out of the scope of this API page, so you'll have to click here to read more about what a callback function should contain.

Return value

An array of order pane arrays, keyed by the internal ID of the pane, with the following members:

  • callback:

    • type: string
    • value: The name of the callback function for this pane.
  • title:
    • type: string
    • value: The name of the pane.
  • (optional) display title:
    • type: string
    • value: The title of the pane as it will be displayed.
  • desc:
    • type: string
    • value: A short description of the pane for the admin pages.
  • class:
    • type: string
    • value: A CSS class that determines the relative position of the pane's div. Choose "pos-left" to float left against the previous pane or "abs-left" to start a new line of panes.
  • weight:
    • type: integer
    • value: Default weight of the pane, defining its order on the checkout form.
  • show:
    • type: array
    • value: The list of op values which will show the pane. "view", "edit", "invoice", and "customer" are possible values.

See also


Related topics

4 functions implement hook_uc_order_pane()

2 invocations of hook_uc_order_pane()


ubercart/uc_order/uc_order.api.php, line 302
Hooks provided by the Order module.


function hook_uc_order_pane() {
  $panes['admin_comments'] = array(
    'callback' => 'uc_order_pane_admin_comments', 
    'title' => t('Admin comments'), 
    'desc' => t('View the admin comments, used for administrative notes and instructions.'), 
    'class' => 'abs-left', 
    'weight' => 9, 
    'show' => array('view', 'edit'),
  return $panes;