Jump to content

"Best customers" statistics doesn't load prestashop 1.7

Recommended Posts


I have a pretty serious problem with this, since the client uses this data a lot. The problem comes after migrating my prestashop 1.6 to 1.7, I made an installation from scratch and migrate all customer data and orders through a module.

All the info is fine, the store is working finet, but I can not get in the statistics of "best customers" to show me data prior to migration. I see the data os customers after the migration, but nothing before, ans there is information about 3 years.

I have looked at the tables of BBDD corresponding to clients and orders and I do not see differences between old and new data.

Does anyone out there have faced this problem?

Any ideas to solve it?

Share this post

Link to post
Share on other sites
  • 1 year later...
  • 5 months later...

Any solution to this.  Same thing here after migrating to version


Share this post

Link to post
Share on other sites

The problem is that the module looks in the table connections and doesn't find data in the period you are looking for.
It expects a recorded user connection for every order made, but after migration all connections data are lost

Share this post

Link to post
Share on other sites
Posted (edited)

try this solution, instead of searching for connection date, search for invoice date

find in file statsbestcustomers.php and comment this line

//Roby    WHERE co.date_add BETWEEN '.$this->getDate()

add these 2 lines

        LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_customer` = c.`id_customer`
        WHERE o.invoice_date BETWEEN '.$this->getDate()

Edited by robysoldtamiya (see edit history)

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More