How to remove all catalog products in Magento

前端 未结 6 1503
一个人的身影
一个人的身影 2021-02-04 17:42

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 impor

6条回答
  •  长情又很酷
    2021-02-04 18:24

    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:

    SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(magento_store.q.items_count - 1)'

    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:

    DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY);
    

提交回复
热议问题