Skip to content

Commit

Permalink
Add a state filter to the Orders view.
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanz committed Jan 12, 2016
1 parent e945877 commit 9b29e62
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/order/commerce_order.module
Expand Up @@ -164,4 +164,5 @@ function commerce_order_add_line_items_field($order_type) {
*/
function commerce_order_views_data_alter(array &$data) {
$data['commerce_order']['store_id']['field']['id'] = 'store';
$data['commerce_order']['state']['filter']['id'] = 'state_machine_state';
}
46 changes: 46 additions & 0 deletions modules/order/config/install/views.view.commerce_orders.yml
Expand Up @@ -7,6 +7,7 @@ dependencies:
- commerce_price
- commerce_store
- options
- state_machine
- user
id: commerce_orders
label: Orders
Expand Down Expand Up @@ -816,6 +817,47 @@ display:
entity_type: commerce_order
entity_field: type
plugin_id: entity_bundle
state:
id: state
table: commerce_order
field: state
relationship: none
group_type: group
admin_label: ''
operator: in
value: { }
group: 1
exposed: true
expose:
operator_id: state_op
label: State
description: ''
use_operator: false
operator: state_op
identifier: state
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
reduce: false
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
entity_type: commerce_order
entity_field: state
plugin_id: state_machine_state
sorts: { }
title: Orders
header: { }
Expand All @@ -836,6 +878,10 @@ display:
arguments: { }
display_extenders: { }
use_ajax: false
filter_groups:
operator: AND
groups:
1: AND
cache_metadata:
contexts:
- 'languages:language_content'
Expand Down

0 comments on commit 9b29e62

Please sign in to comment.