Zen Cart Logo
Forums / General Questions / Delete unused manufacturers?

Delete unused manufacturers?

Locked

Views: 1,011

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
14 Nov 2007, 6:36 PM
#1
benn600 avatar

benn600

Zen Follower

Join Date:
Nov 2007
Posts:
124
Plugin Contributions:
0

Delete unused manufacturers?

How can I delete the manufacturers where no products exist? I know it can be scanned on the fly but it really slows everything down so I'd like to just delete them. Or can I hide them? I'd rather delete them.

14 Nov 2007, 7:12 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Delete unused manufacturers?

Admin > Catalog > Manufacturers

Click on the "i" icon next to each one to see whether they have any products, and if not hit the delete button.

19 Nov 2007, 5:59 PM
#3
benn600 avatar

benn600

Zen Follower

Join Date:
Nov 2007
Posts:
124
Plugin Contributions:
0

Re: Delete unused manufacturers?

Is there a query I can run? We have over a thousand manufacturers.

19 Nov 2007, 10:44 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Delete unused manufacturers?

Backup your database first, then (assuming that you are not using a database prefix) run this query> delete manufacturers as m

from manufacturers as m
left join products as p
on m.manufacturers_id = p.manufacturers_id
where p.manufacturers_id is null;This will delete all manufacturers with no products in your database.