If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Categories, Products, Attributes / how to delete all catagories in one operation?

how to delete all catagories in one operation?

Locked

Started by minshop_no on 30 May 2009, 11:59 PM · Views: 1,277

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:

http://www.minshop.no
Zen Cart 1.3.8a | Easy Populate Mod 1.2.5.4 | Newsletter Subscribe v 2.1.0 | Image Handler 2 |

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.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

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:

http://www.minshop.no
Zen Cart 1.3.8a | Easy Populate Mod 1.2.5.4 | Newsletter Subscribe v 2.1.0 | Image Handler 2 |

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 :)

http://www.minshop.no
Zen Cart 1.3.8a | Easy Populate Mod 1.2.5.4 | Newsletter Subscribe v 2.1.0 | Image Handler 2 |

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.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

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,512
Plugin Contributions:
176

Re: how to delete all catagories in one operation?

Deleting a category also deletes the products in that category.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.