"Listing Option" is provided by the field commerce_node_checkout but this field only appears on the "Manage Fields" tab, it does not appear on the "Manage Display" tab. The only way to alter its display position seems to be to move it up/down on the "Manage Fields" tab.

Also, there doesn't seem to be any obvious way of altering the title ("Listing Option") and description for this field.

Comments

Infoloko’s picture

Issue summary: View changes
ppblaauw’s picture

You can alter the label and helptext using a custom module

Change [custom_module_name] with your own module name

/**
 * Hook_info_alter()
 * 
 * Change call back function
 */       
function [custom_module_name]_element_info_alter(&$type) {
  // change the call_back function
  if (isset($type['commerce_node_checkout']['#type']) && $type['commerce_node_checkout']['#type'] == 'commerce_node_checkout') {
    $type['commerce_node_checkout']['#process'][0] ='[custom_module_name]_process_element';
  }
}

In the changed call back function change the values (see title and description)

/**
 * Element process callback to build the product selection form widget
 * for a node.
 * Change label and helptext
 */
function [custom_module_name]_process_element($element) {
  // Get the available products for this node
  $products = commerce_node_checkout_get_node_type_product_list($element['#node_type']);

  // Add a selection for the product
  $element['commerce_node_checkout_product'] = array(
    '#type' => (count($products) > 1) ? 'select' : 'radios',
    '#title' => t('Changed Listing option title'),
    '#options' => $products,
    '#description' => t('Changed Select your desired listing option.'),
    '#default_value' => key($products),
    '#required' => TRUE,
    '#access' => !empty($products),
  );

  return $element;
}
frazras’s picture

Worked like a charm

spacemuon’s picture

Works for me. Thanks.