function hook_order_pane in Ubercart 5
Same name and namespace in other branches
- 6.2 docs/hooks.php \hook_order_pane()
Register 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_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.
4 functions implement hook_order_pane()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- uc_order_order_pane in uc_order/
uc_order.module - Implementation of hook_order_pane().
- uc_payment_order_pane in payment/
uc_payment/ uc_payment.module - Implementation of hook_order_pane().
- uc_quote_order_pane in shipping/
uc_quote/ uc_quote.module - Defines the shipping quote order pane.
- uc_shipping_order_pane in shipping/
uc_shipping/ uc_shipping.module
1 invocation of hook_order_pane()
- _order_pane_list in uc_order/
uc_order_order_pane.inc - Build a list of order panes defined in the enabled modules.
File
- docs/
hooks.php, line 720 - These are the hooks that are invoked by the Übercart core.
Code
function hook_order_pane() {
$panes[] = array(
'id' => 'payment',
'callback' => 'uc_order_pane_payment',
'title' => t('Payment'),
'desc' => t('Specify and collect payment for an order.'),
'class' => 'pos-left',
'weight' => 4,
'show' => array(
'view',
'edit',
'customer',
),
);
return $panes;
}