You are here

function commerce_multicurrency_commerce_price_field_calculation_options in Commerce Multicurrency 7

Implements hook_commerce_price_field_calculation_options().

See also

commerce_multicurrency_commerce_price_field_formatter_prepare_view()

File

./commerce_multicurrency.module, line 525
Enhancements for the commerce currency support.

Code

function commerce_multicurrency_commerce_price_field_calculation_options($field, $instance, $view_mode) {

  // If this is a single value custom price field attached to a product.
  if (($instance['entity_type'] == 'commerce_product' || $field['entity_types'] == array(
    'commerce_product',
  )) && $field['field_name'] != 'commerce_price' && $field['cardinality'] == 1) {
    return array(
      'currency_specific_price' => t('Commerce Multicurrency: Display the price in a specific currency.'),
    );
  }
}