You are here

function commerce_cart_field_formatter_info in Commerce Core 7

Implements hook_field_formatter_info().

File

modules/cart/commerce_cart.module, line 2602
Implements the shopping cart system and add to cart features.

Code

function commerce_cart_field_formatter_info() {
  return array(
    'commerce_cart_add_to_cart_form' => array(
      'label' => t('Add to Cart form'),
      'description' => t('Display an Add to Cart form for the referenced product.'),
      'field types' => array(
        'commerce_product_reference',
        'entityreference',
      ),
      'settings' => array(
        'button_text' => t('Add to cart'),
        'show_quantity' => FALSE,
        'default_quantity' => 1,
        'combine' => TRUE,
        'show_single_product_attributes' => FALSE,
        'line_item_type' => 'product',
      ),
    ),
  );
}