Drupal Commerce Blog

What's happening in the world of Drupal Commerce.

Commerce Module Tuesday: Commerce Reporting

Drupal Commerce Reporting

Welcome to another Commerce Module Tuesday! Today we are looking at Commerce Reporting, maintained by Christophe Van Gysel who interned at Commerce Guys last year and is now interning at Google in the United States (yes, we’re all jealous of Christophe). Get ready for a high impact and extremely useful module, folks. It not only “just works” it takes all of it’s data from the existing database and displays fancy graphs and filterable reports using Views and Blocks. In other words, even if your store was built on a pre-beta Commerce from 2011, this module would still be able to read your store history and give you all kinds of new insights.

Christophe had to really jump a number of hurdles to get this module launched last year, not the least of which was a lack of community consensus on how to display graphs from Views 3.x on Drupal 7. So he built the Visualization API which has now eclipsed commerce_reports in terms of active installs. So, as a part of another Commerce Module Tuesday, I invite you to sit back and take a look at another awesome community contributed module that fills a vital role: data mining.

In the video, we have gone over the following features:

  • Reports Dashboard - The first screen you see (if you can't find it, refer to enabling instructions below) is a great overview of the data you have in your store.
  • Custom Reports - Additional reports that allow filtering, grouping, and tweaking to help you get to the data you need.
  • Taxes Reports - A very useful submodule is the ability to pull reports on taxes.
  • Pattern Mining - An experimental feature is the ability to analyze buying history to help you see if people buy product "X" they are most likely going to buy product "Y." Note that this deserves some more exploration by the community in terms of being able to act on this information. How hard would it be to make a view that takes this data and shows those products to users a-la-"Customers who bought this also look at that" Amazon style.
  • Drupal Dashboard - An undocumented feature is the ability to pull in all the Commerce Reports blocks into your Drupal Dashboard. Any block can go here and it makes for a powerful way to track your community, content, and commerce.

Setting up the module can be accomplished with the following drush commands:

drush dl commerce_reports visualization
drush en commerce_reports date_api date visualization date_views
  1. Download the modules - Pretty simple, just download the following three modules to your sites/all/modules folder: Commerce Reporting, Visualization API, Date
  2. Enable the modules - For this demo, I simply enabled Commerce Reporting. The drush commands above will enable all the required modules for tax reporting that are undocumented
  3. View the dashboard - For standard Drupal Commerce, navigate to "Store" then to "Reports." For Commerce Kickstart 2, there isn't a menu item generated for Reporting. Go to this url: /admin/commerce/ and click on "Reports"

Comments or thoughts on what Commerce Module we should feature in next week’s Commerce Module Tuesday? Let us know in the comments!

Josh Miller
Posted: May 7, 2013