zeeshop Posted January 26, 2008 Posted January 26, 2008 Hi ALL, I have more than 8000 products in store, now I want to delete whole lot and want to enter the same and new stock using easy populate. But if I delete all products and enter new products, Products Ids start from "8001" not from " 1 " even if store was empty. I want to keep same Categories structure so categories will remain same. I got suggestion that I may need to delete and reinstall product table in PHP my admin. I will appreciate if someone can advise me procedure and steps to do this as I am not YET that much capable to take big risk. Regards Zee
edschaum Posted January 26, 2008 Posted January 26, 2008 Hi ALL, I have more than 8000 products in store, now I want to delete whole lot and want to enter the same and new stock using easy populate. But if I delete all products and enter new products, Products Ids start from "8001" not from " 1 " even if store was empty. I want to keep same Categories structure so categories will remain same. I got suggestion that I may need to delete and reinstall product table in PHP my admin. I will appreciate if someone can advise me procedure and steps to do this as I am not YET that much capable to take big risk. Regards Zee If you want to delete all the products, I think you can just delete the category that they are in to make them all go away at once. I'm not certain this works though. If your products table is already empty, you should be able to use a command like this: ALTER TABLE products AUTO_INCREMENT=0 to get your products_id back to 1. Back up first before trusting my advice just in case. No guarantees :) Ed
germ Posted January 26, 2008 Posted January 26, 2008 If you want to delete all the products, I think you can just delete the category that they are in to make them all go away at once. I'm not certain this works though. If you do that, you can end up with "ghost" products in the catalog. I know it's a pain to do thru the admin interface, but it's safer (IMHO) to delete all the products in a category, then delete the category (after it's empty). If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
edschaum Posted January 26, 2008 Posted January 26, 2008 If you do that, you can end up with "ghost" products in the catalog. I know it's a pain to do thru the admin interface, but it's safer (IMHO) to delete all the products in a category, then delete the category (after it's empty). Yeah, I had a feeling that there might be side effects to that. I guess he's going to have fun deleting them one at a time.
♥geoffreywalton Posted January 26, 2008 Posted January 26, 2008 You need something like this DROP TABLE IF EXISTS `products`; CREATE TABLE IF NOT EXISTS `products` ( `products_id` int(11) NOT NULL auto_increment, `products_quantity` int(4) NOT NULL, `products_model` varchar(12) collate latin1_general_ci default NULL, `products_image` varchar(64) collate latin1_general_ci default NULL, `products_price` decimal(15,4) NOT NULL, `products_date_added` datetime NOT NULL, `products_last_modified` datetime default NULL, `products_date_available` datetime default NULL, `products_weight` decimal(5,2) NOT NULL, `products_status` tinyint(1) NOT NULL, `products_tax_class_id` int(11) NOT NULL, `manufacturers_id` int(11) default NULL, `products_ordered` int(11) NOT NULL default '0', PRIMARY KEY (`products_id`), KEY `idx_products_date_added` (`products_date_added`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5805 ; Delete the products using EP Go into phpmyadmin and select the products table. Select export Check these under structure Add DROP TABLE Add IF NOT EXISTS Add AUTO_INCREMENT value uncheck data Export to a file, this will give you the correct sql for your db structure Change the auto inc to 1. Upload your data using EP. Repeat using 0 if no does not start from 1 Sometimes you need to replace the slanted quotes with ' Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
zeeshop Posted January 28, 2008 Author Posted January 28, 2008 Hi, Thanks for this help and support. All gone well after following this suggestion. Regards Zee
Recommended Posts
Archived
This topic is now archived and is closed to further replies.