Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / restoring "Products Ordered" list anr therefore best sellers box

restoring "Products Ordered" list anr therefore best sellers box

16 Jun 2012, 1:58 PM
#1
freedude avatar

freedude

New Zenner

Join Date:
Mar 2011
Posts:
20
Plugin Contributions:
0

Post #1 by freedude

Hello everyone

I have accidentally clicked on "RESET ALL Products Ordered".
I cannot restore it with a previously saved Phpadmin MYSQL since I would loose important new datas.
Is there a way to restore just this database using phpadmin and an older saved Mysql ?
Even if it will not be up to date, it'll be better than nothing and my bestsellers sidebox will not be empty anymore.
Thanks in advance for a quick answer, best regards, Freedude.

17 Jun 2012, 5:00 PM
#2
davowave avatar

davowave

New Zenner

Join Date:
Mar 2009
Posts:
90
Plugin Contributions:
0

Post #2 by davowave

Hey there,

yes :)

But you'll need to write code for it. If you have an sql file with your old(ish) database in it then you just need to set it up in phpmyadmin so you can query it and select the id and products_ordered column, then loop through the results and update your real database.

all that happened when you clicked the button was that all the values in the products_ordered column in the products table were set to 0. You're old database will have the appropriate data.

Alternatively in phpmyadmin you could go in and manually change the values in the appropriate column for your most important products, just so there's something for you best sellers sidebox untill some new info comes in :)