Zen Cart Logo
Forums / General Questions / Delete All Products By Manufacturer

Delete All Products By Manufacturer

Locked

Views: 1,532

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
15 Jan 2008, 1:35 PM
#1
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Delete All Products By Manufacturer

Can I Delete All Products By Manufacturer?

Just thought I would do a clean sweep of one of my drop shippers.

If not. That would be a good Idea of a mod...

I can close fast with Quick Updates, However I thought a feature like this would be better.

15 Jan 2008, 1:47 PM
#2
kuroi avatar

kuroi

Totally Zenned

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

Re: Delete All Products By Manufacturer

Milo

I'm not sure what the implications of deleting a product would be for customers' order histories, so here's what I would recommend:

  1. Backup your database
  2. Double check that you have backed up your database
  3. Go to Admin > Catalog > Manufacturers and hove over the icons towards the right for each manufacturer. In the bottom left of your screen will appear a URL. And in that URL will be a parameter called mID. This is each manufacturer's ID. Make a note of the one you want to drop.
  4. Go to Admin > Tools > Insert SQL Patches and run the following request in the big box.

update products set products_status=0 where manufacturers_id=nnn;
where nnn is replaced by the mID.

If you're really sure that you want to delete them, I can cook up some SQL to clear them out of the products and products descriptions tables.

15 Jan 2008, 5:51 PM
#3
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Delete All Products By Manufacturer

I have the Database Backup Mod in.
So there really is no risk. I can always roll back in less then a minute.

If you can put that SQL up. That would be great.

15 Jan 2008, 6:07 PM
#4
kuroi avatar

kuroi

Totally Zenned

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

Re: Delete All Products By Manufacturer

Backup, double check, deep breath ... submit> delete from products_description where products_id in (select products_id from products where manufacturers_id = nnn);

delete from products where manufacturers_id = nnn;
Please let me know how you get on.