Jump to content


Photo

Mass Delete


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1 Nick

Nick

    Member

  • Members
  • 15 posts

Posted 04 September 2010 - 02:38 AM

Hi, it would be nice to be able to delete all the categories and the products at once.

Edited by Nick, 04 September 2010 - 02:39 AM.


#2 Aleksey

Aleksey

    Co-Founder

  • +Administrators
  • 4168 posts

Posted 05 September 2010 - 02:10 AM

Hi, Nick!

It looks like a "Store reset" function. A very dangerous :-) OK, added to the do-to list. Thanks. Meanwhile you can use PHP My Admin for deleting products and categories. Please remember to delete all orders as well.

#3 Nick

Nick

    Member

  • Members
  • 15 posts

Posted 05 September 2010 - 02:51 AM

Cool!
It doesn't need to be a huge red button with the words do not press on it. A simple select all + delete, could be enough :)

A sort of Mass Delete for each kind of element (categories, products, manufacturers, orders... you name it).

I just find it time consuming to delete each element one by one, especially since clients usually change their mind way too often. I want them to be self-sufficient in managing their store. And if I had clients used to tools like phpMyAdmin, I'd be the luckiest and happiest developer on earth :D

Keep it up! ;)

#4 Aleksey

Aleksey

    Co-Founder

  • +Administrators
  • 4168 posts

Posted 05 September 2010 - 01:55 PM

Nick, as a temporary solution you can create a CMS page with PHP code which will call MySQL queries for deleting all products and categories:

<?
  Db_DbHelper::query('delete from shop_products');
  Db_DbHelper::query('delete from shop_categories');
  Db_DbHelper::query('delete from shop_products_categories');
  Db_DbHelper::query('delete from shop_related_products');
  Db_DbHelper::query('delete from shop_product_properties');
?>

Any time when you access the page, it will delete all products. It is better to comment out query calls in the page code when you do not use the page, and delete the page as soon as you can.

Thanks

#5 Nick

Nick

    Member

  • Members
  • 15 posts

Posted 05 September 2010 - 11:25 PM

Quite a nice temporary solution indeed. Thanks.