Building a report and I don't want it to crash...

  • Posts: 62
  • Thank you received: 1
7 years 2 months ago #277178

-- HikaShop version -- : 3.1.1`
-- Joomla version -- : 3.7.5

Hello,
So here is the situation:
We are going to sell raffle tickets and to do so we are going to create a product called "raffle ticket" to sell along with our other products, with a total amount to sell being 2500.

Once the raffle is concluded, I want to run a report showing all the customers that have purchased a raffle ticket. From there I will export the list as a CSV and open it in excel. We then randomly pick a number 1 through 2500 and the customer on that line wins.

I have set up a report with the following criteria:
- type: customers
- filters/ product: raffle ticket
- display: Listing
- options: limit 2500

When I put in the 2500 on the limit I get a pop up warning me that I could "broke the dashboard". If I unpublish the report so that it doesn't show up on the main dashboard, and only go into it to export it, will it still have a chance of breaking something?

Also, is there a way to run the report to show if any of the orders purchased multiple tickets? I ran the report and did an export using a random item that we sell. On the dashboard the "Products" report shows the item with 11 units sold. When I run my report on the same item, I only have 7 lines of data coming over, and none of the columns indicate that more than one product was purchased on that given order.

Thoughts?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #277208

Hi,

1. The more data the MySQL query has to process, and the more likely it is to crash when running. A solution is to increase the memory limit setting of your PHP.ini when that happens, but at some point, even that won't be enough and it will hit the limits of the server. That's why we have that warning because when the report is published on the dashboard, when you display the dashboard, if the query crashes, the dashboard page will crash together with it. If the report is unpublished, then it might still crash, but only when you edit the report in the menu Orders>Reports.

2. What you can also do is to run a mass action like that via the menu System>Mass actions:
monosnap.com/file/VhQwLT3ATjtfhFTmWa0mg2dU2i7Iuh
That way, you can export a CSV of the users along with the product quantity purchased for the purchases containing a specific product.
I would say that the mass action is more adapted to what you want to do here.

Please Log in or Create an account to join the conversation.

  • Posts: 62
  • Thank you received: 1
7 years 2 months ago #277237

Nicolas,
That's terrific and just what I need!
I ran one fine and did it to display the results and all is showing fine. I then made a copy of the report and switched to export as CSV; created a folder and put in the path but nothing is being produced when I process. I looked through the documentation and searched the forum and couldn't find anything on exporting... can you shed some light please? I pretty much just put in the path mydomain.com/reports (with and without a slash at the end)

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #277239

Hi,

The text

https://mydomain.com/reports
is not a path but a URL. When we say path, we mean the path of the file on the hard drive of the server. Something like that: /var/www/mydomain/web/mycsv.csv

Please Log in or Create an account to join the conversation.

  • Posts: 62
  • Thank you received: 1
7 years 2 months ago #277340

Gotcha... working now! :)

Another question, actually 2, regarding this has come up...

1) The report prints all the products sold on the order, and not just the item in question. I have the order_product_column set to order_product_code = the exact code, but it seams to pull up all the other items in the order as well.
2) If multiple quantities of the item are order, it is listing them in the qty column, naturally. For this scenario, since we are using this to pick a winning raffle ticket, I would need there to be a line item for each one sold. So if client A buys 3, there will be three duplicate lines with his info. Any chance of this?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
7 years 2 months ago #277396

Hi,

1. Well, It's actually an export of orders, not an export of order products. So yes, you'll see the other products purchased together with it for each order, after they've been filtered to only have the orders with that product in it.
2. The system is not meant to work like that.
If you want to do both points, I don't see a way of doing it, unless you add custom coding to the system. It could potentially be done by adding your own plugin implement the mass action triggers to create a specific action that would output exactly what you want.
So I guess you'll have to contact a developer to help you with that if you want that.

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum