-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommerce_product_discount.views.inc
44 lines (37 loc) · 1.06 KB
/
commerce_product_discount.views.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* @file
* Contains commerce_product_discount\commerce_product_discount.views.inc..
* Provide a custom views field data that isn't tied to any other module. */
/**
* Implements hook_views_data().
*/
function commerce_product_discount_views_data() {
$data['views']['table']['group'] = t('Custom Global');
$data['views']['table']['join'] = [
// #global is a special flag which allows a table to appear all the time.
'#global' => [],
];
$data['views']['product_discount_status'] = [
'title' => t('Product discount status'),
'help' => t('Gives the discount status of the product.'),
'field' => [
'id' => 'product_discount_status',
],
];
$data['views']['discount_amount'] = [
'title' => t('Discount amount'),
'help' => t('Provides field for entering discount percentage.'),
'field' => [
'id' => 'discount_amount',
],
];
$data['views']['save_discount'] = [
'title' => t('Save Discount'),
'help' => t('Save Discount'),
'field' => [
'id' => 'save_discount',
],
];
return $data;
}