Jump to content

Dashboard Statistics: Date changed after status change


Torrentus

Recommended Posts

Hi Prestashop Community, 

 

I hope you can help me out with the following: 

 

For the last 1½ year I have been using Prestashop happily, processing orders and leaving them at the 'Sent' status when, well.., the product was sent.

 

However, due to a new version of my shipping module (MyParcel) now supporting feedback on the delivery status of orders, I decided to batch-edit all existing orders with status 'Sent' to new status 'Delivered'. This worked flawlessly and all is well, but..:

 

I have been a happy user of the graph in the dashboard (comparing this years performance to last years). But since I have mass-edited the status on the previously 'Sent' orders, all turnover is now accounted on the day that I made the status change instead of the date the order was validated. 

 

This means that I have a huge spike with the total turnover of last 1½ year and that I cannot use the graph anymore since any other values are too small to display in comparison to this huge spike now.

 

Is there any way to reverse this, and how did it happen?

 

I have attached a screenshot of the status (Delivered). It is Dutch. The checked checkboxes are the same checkboxes as in the 'Sent' status, and as far as I know, they have not been altered after Prestashop installation.

post-1344943-0-36723500-1506342174_thumb.png

Link to comment
Share on other sites

  • 1 month later...

I found the solution for this issue and wanted to share it with you:

 

In /controllers/admin/AdminStatsController.php, in some version they changed the determining factor for where an order is placed in statistics from the invoice date to the last update date. This does not make any sense at all since it will mingle your statistics if you (bulk-)update orders. 

 

The solution is to find all occurences of parameter

date_upd

in this file replace them with

invoice_date

 

Edited by Torrentus (see edit history)
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...