Jump to content

How clear the list?


Recommended Posts

Yet tested the registration, wrote dozen prospective customers. Then naturally, removed them from the list of registration. But the registration of a new client, it appears in the list are not under the number "1"and the number 15. It turns out that somewhere the same names of the clients still stored. How to remove or reset to the first client in the list was listed under number 1?

44370_oME67V1J2WpSDMthGues_t

Link to comment
Share on other sites

I think when you selected to delete "old" customers you chose the wrong option: Prestashop asked you if a new user could or not register again with the email address you were deleting.
Now you could directly delete the old customers from the database. But in the db there are many relationship with the customer ids so, if you can, it could be useful to reset the whole system.

When I want to reset a prestashop 1.4, keeping safe the products and the categories, but deleting all orders, discounts etc etc, I use the following script.
Please be sure it's the correct solution for you before applying it. All listed db tables will be truncated, you'll not be able to recover data if you don't have a backup

TRUNCATE TABLE `ps_customer`;
TRUNCATE TABLE `ps_address`;
TRUNCATE TABLE `ps_orders`;
TRUNCATE TABLE `ps_order_detail`;
TRUNCATE TABLE `ps_order_discount`;
TRUNCATE TABLE `ps_order_history`;
TRUNCATE TABLE `ps_message`;
TRUNCATE TABLE `ps_cart`;
TRUNCATE TABLE `ps_cart_product`;
TRUNCATE TABLE `ps_cart_discount`;
TRUNCATE TABLE `ps_customer_group`;
TRUNCATE TABLE ps_connections;
TRUNCATE TABLE ps_discount;
TRUNCATE TABLE ps_discount_category;
TRUNCATE TABLE ps_discount_lang;
TRUNCATE TABLE ps_message_readed;
TRUNCATE TABLE ps_order_slip;
TRUNCATE TABLE ps_order_slip_detail;
TRUNCATE TABLE ps_stock_mvt;
TRUNCATE TABLE ps_order_return;
TRUNCATE TABLE ps_order_return_detail;

Link to comment
Share on other sites

When you delete a customer from Prestashop 1.4, Prestashop asks you if you want future users can use or not the email addresses you're going to delete. What did you choose?
Then, to completely reset your db, I usually use the SQL commands posted above.

Link to comment
Share on other sites

done as you say, all is clear, all is good. The client, which i deleted, can register again with the same adress, BUT... The counter begin not from 1 and from 16. How to do to counter considered with 1?

P.S. I deleted the customers from files in db, not files.

Link to comment
Share on other sites

Now it's only a db matter. If you're using a tool that allow you to change the next table id you can do it or you can execute the following query


TRUNCATE TABLE `ps_customer`;

No issue because now you've already deleted all customers. Note that executing it you'll delete also new customer created from yesterday afternoon.

Link to comment
Share on other sites


TRUNCATE TABLE `ps_customer`;


It`s all ok. I did not understand at once. My fault was that i delete customers manual one by one. But later i found the button which executes the command "TRUNCATE TABLE" and it`s all ok now. Thanks.
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...