Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / how to delete all catagories in one operation?

how to delete all catagories in one operation?

Locked

Views: 1,273

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
30 May 2009, 11:59 PM
#1
minshop_no avatar

minshop_no

New Zenner

Join Date:
May 2008
Posts:
56
Plugin Contributions:
0

how to delete all catagories in one operation?

is there a way to delete all categories in one operation, i do not want to click the red x, then confirm on many many categories ;)

please advise ;P

:shocking:

31 May 2009, 1:15 AM
#2
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: how to delete all catagories in one operation?

Log into your cPanel, click on phpMyAdmin. Once there, select the database your ZC installation is in, click on it. That will show you all the tables both on the left and more detailed on the right.

Now, click (on the left side) Categories. That will change your view on the right. Now click on "Browse". You will, then see all your categories listed (and man, what a list you have). Go to the bottom of that page, click on "check/uncheck all". Checkmarks will appear in all of the boxes beside each category listing......click on (on the bottom.....right beside "check/unckeck all") the little red "X". It will then ask you if you really want to delete.....it should look something like this (maybe without the 'zen' prefix):

Do you really want to :     DELETE FROM `zen_categories` WHERE `zen_categories`.`categories_id` = 2 LIMIT 1;
DELETE FROM `zen_categories` WHERE `zen_categories`.`categories_id` = 3 LIMIT 1;
DELETE FROM `zen_categories` WHERE `zen_categories`.`categories_id` = 4 LIMIT 1;

Click on "yes". Done.

You will have to do the same for the table "categories_description", also.

You seem to have no products (done delete all of them?), so you shouldn't have to worry about the products tables.

BE VERY CAREFUL NOT TO DELETE THE WHOLE TABLE, JUST THE CATEGORY ENTRIES!! Don't think ZC will rebuild it.

Hope this helps.

31 May 2009, 8:12 AM
#3
minshop_no avatar

minshop_no

New Zenner

Join Date:
May 2008
Posts:
56
Plugin Contributions:
0

Re: how to delete all catagories in one operation?

thanks alot, i will try this.

yes, i deleted my 12k products through EP, just downloaded the complete liste, and used status 9, uploaded and ran it. worked fine.
Could not find a solution for categories in EP.

Thx again ;):clap:

31 May 2009, 8:32 AM
#4
minshop_no avatar

minshop_no

New Zenner

Join Date:
May 2008
Posts:
56
Plugin Contributions:
0

Re: how to delete all catagories in one operation?

worked like a charm :)

31 May 2009, 8:55 AM
#5
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: how to delete all catagories in one operation?

minshop.no:

worked like a charm :)
As I knew it would. Glad I could help.

9 Aug 2009, 3:11 PM
#6
timdwyer42 avatar

timdwyer42

Zen Follower

Join Date:
Apr 2009
Posts:
149
Plugin Contributions:
0

Re: how to delete all catagories in one operation?

Hi if I use this method to delete catagories does it also delete all the productrs in the catagories, and the prices and images ect.?

If not does anyone knowe of a method to delete all the products and catagories off of zencart, other than deleting the individual catagories via the admin panel in zencart?

Thanks.

9 Aug 2009, 8:00 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: how to delete all catagories in one operation?

Deleting a category also deletes the products in that category.