ditadmin Posted March 31, 2008 Posted March 31, 2008 How can I reset all my costumers/orders without messing up the rest of the shop including the products. There fine. :thumbsup: Somewhere along the way of creating my shop I probable messed up the DB. Therefor eventhough I thought I cleaned up my DB by deleting all test custumers and test orders, when i make a new custumer he still get number 13 or 14 and so on instead of 1. The same goes for my orders. A new order made by a new costumer gets a follow up number lik 8 ornine instead of 1. I also can not see these new orders. cotumer receives confirmation e-mail with order number as do I, but when I go to orders I can't see them.but when I fill in the order number in "order ID" and press enter I can see the order. Is therea reset button somewhere foor just these 2 parts? :'(
shooter-boy Posted March 31, 2008 Posted March 31, 2008 Order numbers etc are generated by the MySQL database using what is called "Auto Increment". This ensures that numbers are not duplicated, since this would mess around with operations and break queries. It is possible to reset the auto-increment value using phpMyAdmin, but if you don't know what you are doing, i would not recommend it. Is it really that important to you? Rob Rob Bell - Inspired Graphix Customising osCommerce in Australia, and the world! View my profile for web and email links. I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture. However viewing my profile may provide links to my website or something like that which you may find useful.
ditadmin Posted April 1, 2008 Author Posted April 1, 2008 Order numbers etc are generated by the MySQL database using what is called "Auto Increment". This ensures that numbers are not duplicated, since this would mess around with operations and break queries. It is possible to reset the auto-increment value using phpMyAdmin, but if you don't know what you are doing, i would not recommend it. Is it really that important to you? Rob Yes it is. I think this is the reason why my new orders are not displayed. (regardless how they are payed) so it is imperrable that I at least try this option. It all wordked fine untill someone place an order and I just deleted it. same goes for costumers. Please explain to me, as clearly as possible, how to reset this. thx.
ditadmin Posted April 1, 2008 Author Posted April 1, 2008 Or is it possible to reinstate a part of my DB? forinstance : can I go back with back-up to 19-12-07. Copy the files containing orders an customer info. reinstate the current back-up of my DB. then paste the copied files from the old DB over the current files/data? is this possible and if so how should i do this?
shooter-boy Posted April 2, 2008 Posted April 2, 2008 If you still have orders in the system at all, you cannot reset the numbers. Can you go back to no orders, or you have some in there that you need to keep? Thanks, Rob Rob Bell - Inspired Graphix Customising osCommerce in Australia, and the world! View my profile for web and email links. I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture. However viewing my profile may provide links to my website or something like that which you may find useful.
ditadmin Posted April 2, 2008 Author Posted April 2, 2008 If you still have orders in the system at all, you cannot reset the numbers. Can you go back to no orders, or you have some in there that you need to keep? Thanks, Rob Lets clear the orders and Costumers.!
shooter-boy Posted April 2, 2008 Posted April 2, 2008 If you are happy to clear all customers and orders, simply extract the following tables from a FRESH (ie empty) osCommerce install and allow them to overwrite your existing store. Some of these are not really required, but you might as well... address_book customers customers_basket customers_basket_attributes customers_info orders orders_ (everything that starts with orders_) That should sort it. Make sure you backup before just in case though. Rob Rob Bell - Inspired Graphix Customising osCommerce in Australia, and the world! View my profile for web and email links. I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture. However viewing my profile may provide links to my website or something like that which you may find useful.
ditadmin Posted April 2, 2008 Author Posted April 2, 2008 I found the solution look at link: http://www.oscommerce.com/forums/index.php?sho...ic=45037&hl
shooter-boy Posted April 2, 2008 Posted April 2, 2008 That will work, but that is also resetting your products/categories etc to zero also! If you want to use that code, only use the ones i specified: DELETE FROM `address_book`; DELETE FROM `customers`; DELETE FROM `customers_basket`; DELETE FROM `customers_basket_attributes`; DELETE FROM `customers_info`; DELETE FROM `orders`; DELETE FROM `orders_products`; DELETE FROM `orders_status_history`; DELETE FROM `orders_total`; ALTER TABLE customers AUTO_INCREMENT = 1; ALTER TABLE customers_basket AUTO_INCREMENT = 1; ALTER TABLE customers_basket_attributes AUTO_INCREMENT = 1; ALTER TABLE orders AUTO_INCREMENT = 1; ALTER TABLE orders_products AUTO_INCREMENT = 1; ALTER TABLE orders_status_history AUTO_INCREMENT = 1; ALTER TABLE orders_total AUTO_INCREMENT = 1; Rob Rob Bell - Inspired Graphix Customising osCommerce in Australia, and the world! View my profile for web and email links. I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture. However viewing my profile may provide links to my website or something like that which you may find useful.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.