isotope / core

Core repository of Isotope eCommerce, an eCommerce extension for Contao Open Source CMS
https://isotopeecommerce.org
136 stars 107 forks source link

new report - member registrations #2492

Closed error08 closed 1 month ago

error08 commented 11 months ago

Add new report member registrations using new apexcharts library.

aschempp commented 10 months ago

Unfortunately, I get an error message when trying this locally:

An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(ORDER BY m.dateAdded) as all_members,
DATE_FORMAT(FROM_UNIXTIME' at line 3

Since I'm running MySQL 5.7 (MAMP on macOS), it could be that ORDER BY inside the SELECT is not supported on older databases?

error08 commented 10 months ago

Yes you are right! The window functions (sum in that case) are new in Version 8. But 5.7 has reached EOL. Should we support that version futhermore? How do you handle the base requirements for Isotope? Can they only be updated with a new major version of Isotope?

aschempp commented 10 months ago

Well we cannot require a minimum version of MySQL (technically, on a Composer level). And Contao perfectly supports MySQL 5.7. So it would be a PITA to have a different dependency. Appart from the fact that my default hoster still has 5.7 (will be changed early next year) 😅

error08 commented 10 months ago

Ok, I see! I will try an alternative query.

error08 commented 9 months ago

I removed the window function and solved it via code. I think it is a good alternative. Now the code compatible to MySQL 5.x.

aschempp commented 9 months ago

I tried this PR locally. But (probably) because I did not have any registration/member data, I got an empty page and an error in apexchart Unhandled Promise Rejection: TypeError: null is not an object (evaluating 't.toString')

I guess there's a problem somewhere if the data/row is empty?

error08 commented 9 months ago

Hi, I tried it without members / member data, but I cannot reproduce the error. I need more information about this.

aschempp commented 7 months ago

Could you add a screenshot what this report is supposed to look like? Here's what I see. I guess the chart error is because some of the months do not have a new registration?

Bildschirmfoto 2024-02-05 um 10 49 44
error08 commented 7 months ago

Hi, here a screenshot

image

I have update the PR, please try it again. I see no such error.

image
error08 commented 6 months ago

@aschempp I think now is fine and ready to merge?

aschempp commented 6 months ago

I'm sorry, I don't know what I'm doing wrong. I tried it again, but nothing changed. As you can see in the previous screenshot, I don't even have the same columns in the HTML table. Are you sure you pushed all changes?

error08 commented 6 months ago

I have found the problem. The language keys in the English file was wrong.

aschempp commented 1 month ago

Thank you @error08! I fixed a minor issue with language collision.