If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Globally add manufacturer to products?

Globally add manufacturer to products?

Locked

Started by coucho on 13 Jan 2008, 9:29 PM · Views: 1,484

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
13 Jan 2008, 9:29 PM
#1
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Globally add manufacturer to products?

Hi,

I have two manufacturers set up in my store so people can search by manufacturer. Is there a way to globally assign a manufacturer to each product within a category?

If not, does this mean I manually have to go to each product and individually assign a manufacturer to each?

Thanks in advance for any input.

Coucho

https://www.internationalcoffeeandbeverage.com

13 Jan 2008, 11:26 PM
#2
kuroi avatar

kuroi

Totally Zenned

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

Re: Globally add manufacturer to products?

There's a much quicker way using SQL.

  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 it.
  4. Similarly, find out your categories' IDs from Admin > Catalog > Categories/Products. This is a bit easier because they're displayed in the listings left column, but also trickier if you have subcategories, as it's the subcategories with the products in that you need.
  5. Go to Admin > Tools > Insert SQL Patches and run the following request in the big box for each manufacturer.

update products set manufacturers_id=nnn where master_categories_id in (mmm,mmm,mmm);where nnn is replaced by the mID and mmm,mmm,mmm is replaced by a comma-separated list of the category IDs for that manufacturer.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

13 Jan 2008, 11:49 PM
#3
coucho avatar

coucho

Zen Follower

Join Date:
Jan 2008
Location:
Memphis, USA
Posts:
298
Plugin Contributions:
0

Re: Globally add manufacturer to products?

Thanks for your help. Your solution worked like a charm.:smile:

20 Apr 2008, 3:54 AM
#4
pokerdis avatar

pokerdis

New Zenner

Join Date:
Apr 2007
Posts:
20
Plugin Contributions:
0

Re: Globally add manufacturer to products?

Hello,

I did this and it seemed to work perfectly.....but today I noticed that many different manufacturers and catagories (nothing to do with specific manufacturer) are showing when I filter by manufacturer. Is there a way to globally remove the manufacturer from specific categories.

Thanks in advance.

Tom

20 Apr 2008, 4:14 AM
#5
kuroi avatar

kuroi

Totally Zenned

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

Re: Globally add manufacturer to products?

That's very similar to what's used to to add them ... update products set manufacturers_id=NULL where master_categories_id in (mmm,mmm,mmm);

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

20 Apr 2008, 5:41 AM
#6
pokerdis avatar

pokerdis

New Zenner

Join Date:
Apr 2007
Posts:
20
Plugin Contributions:
0

Re: Globally add manufacturer to products?

Thank You!!! How about to remove all manufacturers?

update products set manufacturers_id=NULL where master_categories_id < 1;

Please let me know if that will do it.

Regards,
Tom

20 Apr 2008, 5:47 PM
#7
pokerdis avatar

pokerdis

New Zenner

Join Date:
Apr 2007
Posts:
20
Plugin Contributions:
0

Re: Globally add manufacturer to products?

pokerdis:

Thank You!!! How about to remove all manufacturers?

update products set manufacturers_id=NULL where master_categories_id < 1;

Please let me know if that will do it.

Regards,
Tom

Sorry it was late, meant to write

update products set manufacturers_id=NULL where master_categories_id >0;

22 Apr 2008, 4:23 PM
#8
kuroi avatar

kuroi

Totally Zenned

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

Re: Globally add manufacturer to products?

The effects of the SQL that you propose would depend upon how you have allocated products to categories, so I can't comment on the likely results.

But if your objective is now to simply to remove all references to manufacturers, why not just use "update products set manufacturers_id=NULL"

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)