MarshalT Posted May 2, 2011 Share Posted May 2, 2011 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? Link to comment Share on other sites More sharing options...
jacky75 Posted May 2, 2011 Share Posted May 2, 2011 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 backupTRUNCATE 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 More sharing options...
MarshalT Posted May 2, 2011 Author Share Posted May 2, 2011 I did not understand. What i need to do? Can you tell me more? This is just about what you say. I removed the client from the presta, but again he can not register. Writes that it already exists. Link to comment Share on other sites More sharing options...
jacky75 Posted May 2, 2011 Share Posted May 2, 2011 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 More sharing options...
MarshalT Posted May 2, 2011 Author Share Posted May 2, 2011 if i reset my db i afraid to lose everything. I have presta 1.3.1 and it doesn`t ask anything when i delete. Link to comment Share on other sites More sharing options...
jacky75 Posted May 2, 2011 Share Posted May 2, 2011 ok, 1.3.1: I think you should look in the db the table "ps_customer". Link to comment Share on other sites More sharing options...
MarshalT Posted May 2, 2011 Author Share Posted May 2, 2011 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 More sharing options...
jacky75 Posted May 3, 2011 Share Posted May 3, 2011 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 queryTRUNCATE 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 More sharing options...
MarshalT Posted May 8, 2011 Author Share Posted May 8, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now