protected function UCXF_Pane::order_view in Extra Fields Checkout Pane 6.2
View the order data @access protected
Return value
string
3 calls to UCXF_Pane::order_view()
- UCXF_AddressPane::order_customer in class/
UCXF_AddressPane.class.php - View the order data for the customer @access protected
- UCXF_AddressPane::order_view in class/
UCXF_AddressPane.class.php - View the order data @access protected
- UCXF_Pane::order_customer in class/
UCXF_Pane.class.php - View the order data for the customer @access protected
1 method overrides UCXF_Pane::order_view()
- UCXF_AddressPane::order_view in class/
UCXF_AddressPane.class.php - View the order data @access protected
File
- class/
UCXF_Pane.class.php, line 237 - Contains the UCXF_Pane class.
Class
- UCXF_Pane
- Base class for checkout panes and order panes implemented by Extra Fields Pane.
Code
protected function order_view() {
$fields = $this
->loadFields();
$output = '';
// Load values (depends on pane type)
switch ($this->pane_id) {
case 'delivery':
$values = uc_extra_fields_pane_value_list_load($this->order->order_id, UCXF_VALUE_ORDER_DELIVERY);
break;
case 'billing':
$values = uc_extra_fields_pane_value_list_load($this->order->order_id, UCXF_VALUE_ORDER_BILLING);
break;
default:
$values = uc_extra_fields_pane_value_list_load($this->order->order_id, UCXF_VALUE_ORDER_INFO);
break;
}
$custom_order_fields = array();
if (count($fields)) {
foreach ($fields as $field) {
if (isset($values[$field->field_id])) {
// Only display if it may be displayed
if ($field
->may_display('order')) {
$field_contents = $field
->output_value($values[$field->field_id]
->getValue());
$custom_order_fields[] = '<strong>' . $field
->output('label') . '</strong>: ' . $field_contents;
}
}
}
}
if (count($custom_order_fields)) {
$output .= '<br />' . implode('<br />', $custom_order_fields);
}
return $output;
}