You are here

function hook_uc_checkout_pane in Ubercart 7.3

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

http://www.ubercart.org/docs/developer/245/checkout

3 functions implement hook_uc_checkout_pane()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

uc_cart_uc_checkout_pane in uc_cart/uc_cart.module
Implements hook_uc_checkout_pane().
uc_payment_uc_checkout_pane in payment/uc_payment/uc_payment.module
Implements hook_uc_checkout_pane().
uc_quote_uc_checkout_pane in shipping/uc_quote/uc_quote.module
Defines the shipping quote checkout pane.
1 invocation of hook_uc_checkout_pane()
_uc_checkout_pane_list in uc_cart/uc_cart_checkout_pane.inc
Builds a list of checkout panes defined in the enabled modules.

File

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

Code

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;
}