SHARE
TWEET

Order User Count

MrJoshMiller Mar 8th, 2013 170 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $view = new view();
  2. $view->name = 'order_user_count';
  3. $view->description = '';
  4. $view->tag = 'default';
  5. $view->base_table = 'commerce_order';
  6. $view->human_name = 'Order User Count';
  7. $view->core = 7;
  8. $view->api_version = '3.0';
  9. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  10.  
  11. /* Display: Master */
  12. $handler = $view->new_display('default', 'Master', 'default');
  13. $handler->display->display_options['title'] = 'Order User Count';
  14. $handler->display->display_options['use_more_always'] = FALSE;
  15. $handler->display->display_options['group_by'] = TRUE;
  16. $handler->display->display_options['access']['type'] = 'none';
  17. $handler->display->display_options['cache']['type'] = 'none';
  18. $handler->display->display_options['query']['type'] = 'views_query';
  19. $handler->display->display_options['exposed_form']['type'] = 'basic';
  20. $handler->display->display_options['pager']['type'] = 'full';
  21. $handler->display->display_options['pager']['options']['items_per_page'] = '10';
  22. $handler->display->display_options['style_plugin'] = 'default';
  23. $handler->display->display_options['row_plugin'] = 'fields';
  24. /* Field: COUNT(Commerce Order: Order ID) */
  25. $handler->display->display_options['fields']['order_id']['id'] = 'order_id';
  26. $handler->display->display_options['fields']['order_id']['table'] = 'commerce_order';
  27. $handler->display->display_options['fields']['order_id']['field'] = 'order_id';
  28. $handler->display->display_options['fields']['order_id']['group_type'] = 'count';
  29. $handler->display->display_options['fields']['order_id']['label'] = 'Orders';
  30. /* Field: Commerce Order: Uid */
  31. $handler->display->display_options['fields']['uid']['id'] = 'uid';
  32. $handler->display->display_options['fields']['uid']['table'] = 'commerce_order';
  33. $handler->display->display_options['fields']['uid']['field'] = 'uid';
  34. $handler->display->display_options['fields']['uid']['label'] = 'User';
  35.  
  36. /* Display: Page */
  37. $handler = $view->new_display('page', 'Page', 'page');
  38. $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  39. $handler->display->display_options['path'] = 'order-user-count';
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top