Skip navigation


7 uc_cart.api.php hook_uc_checkout_pane()

Registers callbacks for a checkout pane.

The checkout screen for Ubercart is a compilation of enabled checkout panes. A checkout pane can be used to display order information, collect data from the customer, or interact with other panes. Panes are defined in enabled modules with hook_uc_checkout_pane() and displayed and processed through specified callback functions. Some of the settings for each pane are configurable from the checkout settings page with defaults being specified in the hooks.

The default panes are defined in uc_cart.module in the function uc_cart_checkout_pane(). These include panes to display the contents of the shopping cart and to collect essential site user information, a shipping address, a payment address, and order comments. Other included modules offer panes for shipping and payment purposes as well.

Return value

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

  • title:

    • type: string
    • value: The name of the pane as it appears on the checkout form.
  • desc:
    • type: string
    • value: A short description of the pane for the admin pages.
  • callback:
    • type: string
    • value: The name of the callback function for this pane.
  • weight:
    • type: integer
    • value: Default weight of the pane, defining its order on the checkout form.
  • enabled:
    • type: boolean
    • value: Optional. Whether or not the pane is enabled by default. Defaults to TRUE.
  • process:
    • type: boolean
    • value: Optional. Whether or not this pane needs to be processed when the checkout form is submitted. Defaults to TRUE.
  • collapsible:
    • type: boolean
    • value: Optional. Whether or not this pane is displayed as a collapsible fieldset. Defaults to TRUE.
  • shippable:
    • type: boolean
    • value: Optional. If TRUE, the pane is only shown if the cart is shippable. Defaults to NULL.

See also

Related topics

3 functions implement hook_uc_checkout_pane()

1 invocation of hook_uc_checkout_pane()


ubercart/uc_cart/uc_cart.api.php, line 354
Hooks provided by the Cart module.


function hook_uc_checkout_pane() {
  $panes['cart'] = array(
    'callback' => 'uc_checkout_pane_cart', 
    'title' => t('Cart contents'), 
    'desc' => t("Display the contents of a customer's shopping cart."), 
    'weight' => 1, 
    'process' => FALSE, 
    'collapsible' => FALSE,
  return $panes;