Commerce Reports 4.x is available. It separates the module from the non-maintained Visualization API for the maintained Charts module.
This version also removes the granularity filter we've all come to know and love with using Views Date Format SQL module. This cuts back on module code to maintain for this module and better usage of the SQL query.
The Sales reports (Monthly, Weekly, Yearly) have been broken into their own displays and are secondary menu itmes when on the Sales tab. Sales defaults to monthly, as it always did. The Weekly report has one issue. The granularity defaults on date fields does not include weekly, so the module will have to provide a hook and create one.
I've made date_popup a dependency of the module to provide easier date filtering, similar to Commerce Backoffice Orders.
Addressed in 4.x are:
- #1853500: Customer map is limited to billing profiles
- #1895916: Payment method report not showing the correct amounts
- #2125813: Visualization to Charts Module Migration
- #2124577: Cleanup & Rewrite of JavaScript
- #1781572: The sales overview is off by a month
I also did a quick screencast about the updates: http://www.youtube.com/watch?v=PkX3dns-g4o
Things I can think of to do:
Expose a weekly granularity to date sortingSee commit 97a2f4b..97f4beb- Add CSS to module to clean up date filter (like Backoffice does.)
- Add CSS to remove Monthly reports highlight when on Weekly or Daily.
- Test views data export
Comments
Comment #1
haggins CreditAttribution: haggins commentedI did a quick test and it looks good so far.
Just 2 points:
- add views_date_format_sql dependency
- section switching doesn't work
Comment #2
mglamanThanks for pointing that out, haggins.
Just pushed a commit that adds dependency for views_date_format_sql and fixes path to JS/CSS files in "theme/" folder.
Comment #3
haggins CreditAttribution: haggins commentedThanks for the quick update.
However, to make it work you need to replace '/themes/css/commerce_reports_dashboard.css' with the one from root folder.
There are 2 further minor issues:
- charts don't get resized when switching section
- in your default views I needed to recreate all aggregated fields based on order-total to get any data.
Comment #4
mglamanThanks haggins, I fixed the CSS. I know the Charts do not resize..Charts module doesn't provide way to re-size charts until a patch can be written.
Can you elaborate on "in your default views I needed to recreate all aggregated fields based on order-total to get any data."
Comment #5
haggins CreditAttribution: haggins commentedIt happend with a fresh module installation and 'drush cc all' did not solve it. Sorry, I haven't more details in mind anymore.
Comment #6
TheoRichel CreditAttribution: TheoRichel commentedThanks very much for the effort. My experiences with the former version were that it was not accurate (it added some sales to the wrong month).
Do I understand correctly that I can now ditch the Visualization module and replace it with Charts? And there is also a dependency on the Date Popup module. Plus the Views Date Format SQL module. That's it?
I have uninstalled the former version and installed the new one, but even after running Cron and clearing the cache no 'Reports' option appears below store.
Comment #7
TheoRichel CreditAttribution: TheoRichel commentedWell, I have it running now.
1. The fact that the 'Reports' option did not appear below 'Store' had to do with the fact that the Views were still oriented on Visulization, and since that module is now absent the Reports module apparently felt things weren't ready.
2. The problems with 'the wrong month' had to do with the date that order was created. When an order was set on the first of the month, the time rules detracted some hours, which positioned the whole thing in the month before. I just have to remember to postdate my orders on the second of the month instead of on the first (or change that time rule).
Comment #8
mglaman@haggins
Could you open a new issue in regards to "in your default views I needed to recreate all aggregated fields based on order-total to get any data." I did a fresh Commerce install and enabled the module and the views were implemented correctly. That way it can be investigated in depth & not get lost in this thread.
@TheoRichel
Comment #9
mglamanComment #10
mglamanComment #11
haggins CreditAttribution: haggins commented@mglaman
Sadly our backend opimization process has been postponed to 'undefined'. I will come back to this later.
Comment #12
TheoRichel CreditAttribution: TheoRichel commented1. I understand your question wrt the recent changing of Views, but I am affraid I cannot definitely answer it.
2. I am currently working away a backlog of orders so I am manually editing the created date to get a better overview what happened in the past months.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedHi,
Error: Call to undefined function dpm() in /public_html/sites/all/modules/commerce_reports/includes/views/commerce_reports.views.inc, line 29
I found this because I test my code on production. :)
Comment #14
mglamanWhoops, mpoplin, thanks. Just made commit to remove that.
haggins, sorry to hear. I've had that happen.
TheoRichel, gotcha, I'll poke around and see if I can still get it to replicate
Comment #15
kvoltz CreditAttribution: kvoltz commentedAbsolutely love this set of tools mglaman!
I've upgraded to the 4.x dev to see what these new features are all about. On a whole, things seem to be working much smoother this go around, which is great.
I am, however, getting a long run of error messages that look like the following:
Notice: Undefined index: thoroughfare in _addressfield_render_address() (line 223 of /home1/jointheu/public_html/profiles/commerce_kickstart/modules/contrib/addressfield/addressfield.module).
Notice: Undefined index: premise in _addressfield_render_address() (line 223 of /home1/jointheu/public_html/profiles/commerce_kickstart/modules/contrib/addressfield/addressfield.module).
Notice: Undefined index: locality in _addressfield_render_address() (line 223 of /home1/jointheu/public_html/profiles/commerce_kickstart/modules/contrib/addressfield/addressfield.module).
Notice: Undefined index: administrative_area in _addressfield_render_address() (line 223 of /home1/jointheu/public_html/profiles/commerce_kickstart/modules/contrib/addressfield/addressfield.module).
Notice: Undefined index: postal_code in _addressfield_render_address() (line 223 of /home1/jointheu/public_html/profiles/commerce_kickstart/modules/contrib/addressfield/addressfield.module).
this repeats over and over.
Hopefully, seeing this error message helps you flush out the bug (or perhaps tell me how and where I've screwed something up).
Comment #16
torgosPizza@#15: I don't think that error is related to Commerce Reports.
Comment #17
kvoltz CreditAttribution: kvoltz commentedit is only displaying on the reports dashboard. My thought is that it is tied to the mapping at the bottom of the reports dashboard.
I could be wrong though...
Comment #18
mglaman@kvoltz what version of commerce kick start? Or better, what version of address field.
I'm not sure what could be causing it - refresh your reports dashboad twice to make sure it isn't carrying over from a different page. The customer map uses views, and the two coded blocks do not reference those parts of address field, but it'd still like to check it out
Comment #19
kvoltz CreditAttribution: kvoltz commentedI'm on 7.x-1.0-beta4
should I install the dev version?
Thanks for the quick response.
Comment #20
mglaman@kvoltz, I just found this issue #1997572: Undefined index in _addressfield_render_address() line 223 which looks to be the same problem. Sounds like updating to Address Field 7.x-1.x-dev will resolve the issue.
Comment #21
kvoltz CreditAttribution: kvoltz commentedNice find @mglaman, I'm sorry to have hijacked the page. Upgrading to the dev version of address field and clearing the cache solved the problem.
Thanks again.
Comment #22
mglamanalpha1 released.