Jump to content

How to delete loyalty points for test orders?


Recommended Posts

So my PS 1.4.7.3 shop is now live.

 

I ran the SQL query described in this thread to delete all the test orders from the live site.

http://www.prestashop.com/forums/topic/151575-help-looking-to-delete-all-orders-and-start-again/page__fromsearch__1

 

So far so good.

 

But I just noticed that customer number 1 (the first customer on the live site) seems to have inherited all the loyalty points from the test orders. i.e. the loyalty points were not removed from the system.

 

How can I remove the loyalty points that were generated from my test orders.

Is there an SQL query I can run to do that?

Link to comment
Share on other sites

Any tips on the problem at hand?

 

How to clear any legacy loyalty program points?

 

There appears to be 2 MySQL tables that that hold the individual records related to the loyalty program.

 

pr_loyalty

pr_loyalty_history

 

Can I clear those tables manually i.e. record by record in PHPmyAdmin?

Edited by TWDesign (see edit history)
Link to comment
Share on other sites

Any tips on the problem at hand?

Yeah, truncating the tables in the the post you linked and the tables you listed is not enough to clear artefacts from tests and default install. There are many more tables you need to take into account.

How would you go about removing test orders then?

I would go though the DB schema to list all tables that are in someway affected by creating a product, customer, order, feature, attribute, voucher, discount, carrier, range, tax, etc etc and the supporting tables of those tables (lang etc) then truncate all.

Edited by phrasespot (see edit history)
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...