You are here

function commerce_cart_views_data_alter in Commerce Core 8.2

Same name and namespace in other branches
  1. 7 modules/cart/includes/views/commerce_cart.views.inc \commerce_cart_views_data_alter()

Implements hook_views_data_alter().

File

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

Code

function commerce_cart_views_data_alter(array &$data) {
  $data['commerce_order_item']['edit_quantity']['field'] = [
    'title' => t('Quantity text field'),
    'help' => t('Adds a text field for editing the quantity.'),
    'id' => 'commerce_order_item_edit_quantity',
  ];
  $data['commerce_order_item']['remove_button']['field'] = [
    'title' => t('Remove button'),
    'help' => t('Adds a button for removing the order item.'),
    'id' => 'commerce_order_item_remove_button',
  ];
  $data['commerce_order']['empty_cart_button'] = [
    'title' => t('Empty cart button'),
    'help' => t('Adds a button for emptying the cart.'),
    'area' => [
      'id' => 'commerce_order_empty_cart_button',
    ],
  ];
}