You are here

function commerce_price_field_info in Commerce Core 7

Implements hook_field_info().

File

modules/price/commerce_price.module, line 49
Defines the Price field with widgets and formatters used to add prices with currency codes to various Commerce entities.

Code

function commerce_price_field_info() {
  return array(
    'commerce_price' => array(
      'label' => t('Price'),
      'description' => t('This field stores prices for products consisting of an amount and a currency.'),
      'settings' => array(),
      'instance_settings' => array(),
      'default_widget' => 'commerce_price_simple',
      'default_formatter' => 'commerce_price_formatted_amount',
      'property_type' => 'commerce_price',
      'property_callbacks' => array(
        'commerce_price_property_info_callback',
      ),
      'default_token_formatter' => 'commerce_price_formatted_amount',
    ),
  );
}