I've trying to import a products list to magento. In the firsts test, I got success, but the products were not showing up in back or front office.
After redo the import process few times, I found out that I have the imported products on database, but, still not showing.
If I access de Catalog > Manage Categories > Default Category -> Category Products I may see the imported products.
Later on, I found a error in my import file ... and I may correctly import products
instead .... I have found conflicts in the 'sku' field ...
those first products are not showing up yet, but they are still on database...
Question: How do I remove those products if I can't access them ???? May I do that direct on database ? deleting the rows can generate other issues ?
any clue will be appreciated !
Magento ver. 1.7.0.1
With your SQL-Sql Script i broke my price index. This happens because we use group prices in the shop. Following error occurred every timewhen i tried to reindex the index "catalog_product_price":
Please add following line:
Delete products with a SQL query is not the Magento way and I recommend not doing it. It may cause database corruption or problems with the foreign key indexes/constraints as stated here.
Everybody interested in using a correct, safe and also fast way to alter things in Magento should ALWAYS use Magento's ORM functions.
In this case this would be in a php script.
This is the only safe way in Magento.
The answer given by Kalpesh Mehta works flawlessly.
But after you remove all products, import bunch of new prodcuts and try to delete it using admin UI you could an error like this:
So, this article helped me a lot: Magento deleting product BIGINT UNSIGNED value is out of range
It provides several options to solve problem and the first one worked in my case:
Reset all product tables. Beware, below script will delete ALL your product data so do it carefully.
You may require re-indexing all your indexes after running above query.
System > Index Management > Reindex all
http://ka.lpe.sh/2012/08/09/magento-how-to-delete-remove-all-products-from-all-categories/
Have fun!
You can delete all the product using Direct Sql.
Please take backup your database, and run the following sql queries.
Reset all product tables. Beware, below script will delete ALL your product data so do it carefully.
You also need to add:
Otherwise you will get integrity constraint errors.