Prestashop: Statistics doesn't work

Created on 4 Jan 2019  Â·  20Comments  Â·  Source: PrestaShop/PrestaShop

I'm trying to see statistics in trends module but without any result. As you can see in the screenshot attached, there are orders already paid but the graphic is still without any information

I hope you can help me. Thank you

PrestaShop version: 1.7.5.0
PHP version: 7.0.33

painel de controlo temosonline

1.7.5.0 BO Bug Dashboard Dashtrends No change required

All 20 comments

HI @rafaviana,

During this period "2018-12-03 2020-01-16" did you generated any new invoices?
In my case with PS 1.7.5.0, I did not manage to reproduce the issue.
image
Thanks to check & feedback.

Hi @khouloudbelguith ,

thanks for your feedback. I don't use PS to generate invoices, is it necessary?

@rafaviana, for this module dashtrends, it is necessary to regenerate invoices so the statistics will be displayed.
Thanks!

@khouloudbelguith I tried to regenerate invoices from the last year and it says it's not possible…

screen shot 2019-01-04 at 2 32 26 pm

@rafaviana, that's why you don't have statistics.
Thanks!

@khouloudbelguith is it possible to regenerate invoices?

@rafaviana, you need to navigate to your BO => Orders => Order details => in the "DOCUMENTS" Tab, you can click to "Generate invoice" button => so the invoice will be generated.
image

Thanks!

@khouloudbelguith can I do it automatically for multiple orders? Without emailing the customer…

Thanks

@rafaviana, here's a quick solution to generate invoices for all orders.
You need to:

  1. Navigate to BO => Shop Parameters => Order Settings => Status Tab
  2. Create a new order status( for example "generate invoice")
  3. In this order status created
    3.1 Check "Allow a customer to download and view PDF versions of his/her invoices."
    3.2 Check "Hide this status in all customer orders."
    3.3 Save
    image
  4. In the BO => Orders => Select all orders => Change Order Status with Bulk actions =>
    image
    image
    So, all invoices will be generated for all orders without notifying the customer.
    You can make a test before applying this solution.
    Thanks!

wow nice trick @khouloudbelguith !

the only counterpart is that all orders will stay with the status "generate invoice" and it's not what I want honestly… I think I will forget the idea to regenerate invoices

@rafaviana, thanks for your feedback.
So can I close the issue?
Thanks!

Yes @khouloudbelguith . Thanks for the help!

@rafaviana I know this answer is a little late, but a quick way to solve this (in version 1.7.5.0) would be to edit \controllers\admin\AdminStatsController.php file and replace all instances of 'invoice_date' with 'delivery_date' and now you will see the statistics based on delivery date. Alternatively, you could also try replacing with 'date_add' or 'date_upd'.

Try it first on a test site and remember that if you update Prestashop the problem will return again.

@khouloudbelguith I played around with 1.7.5.2 version and added an option in Order Settings -> General that allows you to choose based on which date to display statistics. I think this would be useful for shops that never generate invoices and maybe don't even deliver (virtual products). What do you think? If you think this would be useful I can open a pull request.

new-option

@hacchus thank you for your help! I tried with both suggestions but it doesn't work… I still do not understand it 😅

Hi @hacchus,

Thanks a lot for your feedback.
Yes, this is could be useful.

Thanks!

@rafaviana I tested on 1.7.5.0 fresh installation and if you replace invoice_date with delivery_date it works. I don't know why it's not working for you.

@khouloudbelguith OK I created the pull request.

@hacchus, thanks!

@hacchus can you show me your store preferences? Maybe I have something in my preferences creating a conflict

After update to 1.7.6.1 i still have this issue.
Trying all methods from this thread but nothing change

Hi @simon12q,

This issue is currently closed, can you open a new one with more information about your configuration.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings