Account created on 15 January 2018, almost 7 years ago
  • Product Lead, Full Stack Developer at Web Bunch 
#

Recent comments

I encountered this issue as well.

In the process of fixing this, I also:
- Updated the order query so that it can be executed just once
- Fixed a loop on getSalesData that would run 14 * 86400 times more than needed
- Refactored getTopProducts so that it can use the new getOrders() function
- Added a few checks to ensure there will be no errors when getting top products
- Ordered top products by revenue and limited the result to top 20 (maybe this should be configurable in the future)
- Added a limit to return the top 40 most recent carts
- Updated the module dependencies
- Fixed an issue where numbers would show up with many decimal points

Here is a proposed patch.

Patch at #2 could not apply in version 2.4, here is an updated version.

Patch at #41 worked for me but caused issues when the view results use groupping.

Here is a modified version, it's most likely not the most performant solution but it can be a good starting point.

Production build 0.71.5 2024