function hook_checkout_pane in Ubercart 5
Same name and namespace in other branches
- 6.2 docs/hooks.php \hook_checkout_pane()
Register 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_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 using the following keys:
- "id"
- type: string
- value: The internal ID of the checkout pane, using a-z, 0-9, and - or _.
- "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. View this page for more documentation and examples of checkout pane callbacks.
- "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.
3 functions implement hook_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_checkout_pane in uc_cart/
uc_cart.module - Implementation of hook_checkout_pane().
- uc_payment_checkout_pane in payment/
uc_payment/ uc_payment.module - Implementation of hook_checkout_pane().
- uc_quote_checkout_pane in shipping/
uc_quote/ uc_quote.module - Defines the shipping quote checkout pane.
1 invocation of hook_checkout_pane()
- _checkout_pane_list in uc_cart/
uc_cart_checkout_pane.inc - Build a list of checkout panes defined in the enabled modules.
File
- docs/
hooks.php, line 330 - These are the hooks that are invoked by the Übercart core.
Code
function hook_checkout_pane() {
$panes[] = array(
'id' => 'cart',
'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;
}