function hook_uc_order_pane in Ubercart 7.3
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
http://www.ubercart.org/docs/developer/245/checkout
4 functions implement hook_uc_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_uc_order_pane in uc_order/
uc_order.module - Implements hook_uc_order_pane().
- uc_payment_uc_order_pane in payment/
uc_payment/ uc_payment.module - Implements hook_uc_order_pane().
- uc_quote_uc_order_pane in shipping/
uc_quote/ uc_quote.module - Implements hook_uc_order_pane().
- uc_shipping_uc_order_pane in shipping/
uc_shipping/ uc_shipping.module - Implements hook_uc_order_pane().
2 invocations of hook_uc_order_pane()
- uc_order_field_extra_fields in uc_order/
uc_order.module - Implements hook_field_extra_fields().
- _uc_order_pane_list in uc_order/
uc_order.order_pane.inc - Builds a list of order panes defined in the enabled modules.
File
- uc_order/
uc_order.api.php, line 302 - Hooks provided by the Order module.
Code
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;
}