HasteDesign / Registrations-for-WooCommerce

Add a registration product type to your WooCommerce installation.
GNU General Public License v2.0
38 stars 16 forks source link

Added reports functionality #10

Closed Shirkit closed 7 years ago

Shirkit commented 7 years ago

Actually just fixed for grabbing the correct data in the new format

Should resolve #8

allysonsouza commented 7 years ago

Hi @Shirkit,

Great job! Just two things I think are little bugs, maybe they're easy to solve (if I have time I'll gave a look).

  1. In the first screen of the reports is showing repeated event dates. image

  2. At the two screens pagination is displayed without necessity.

Shirkit commented 7 years ago

Oppps, good thing you tested as well, I'll look into it. My tests didn't reveal that.

Shirkit commented 7 years ago

Ok, that should do it.

Just wanted to clarify that the pagination was never implemented. To properly use Pagination while using a WP_List_Table it's required to 1. save the found items somewhere that survives between requests, or to 2. make a query that actually returns exactly what I accomplished with regular OOP PHP.

  1. I think this could be accomplished by storing as a transitional value somewhere in the DB, and load that instead of the current way I've done. Also, it would need to flatten out the objects, and would make sense then to remove the unecessary data. Also, would need to change how I'm redirecting to the proper selected report, and how to display both pages. In the end, the work needed would extrapolate by a power factor over the 2 hours I've quickly spent doing this. And then, if the user wants to print, it would be needed remove pagination anyways.
  2. This is just beyond my SQL knowledge, I tried to tackle the problem from this perspective, but that's impossible for me.

Maybe should leave as a future issue for implementing the pagination, as if a store with 10k-100k orders with 500+ events, this could actually be an issue.