4 replies [Last post]
jimijamesi's picture
Offline
Joined: 08/19/2007
Juice: 75
Was this information Helpful?

Is there a way to switch the class of a product either individually or en mass?? (similar to move product btwn category terms)

I have created a new class of book products (in order to apply special tax rules) but I have many (100+) books already set up as normal products.

Im trying to avoid deleting all the books as normal products and re-entering them as book products.

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Change Product Class

As long as CCK doesn't treat products or book products differently, you can change the node type directly in the database in the {node} table. When you do that, empty out all of the cache tables so that users don't see inconsistent data.

cookiesunshinex's picture
Offline
Joined: 10/14/2009
Juice: 127
Re: Re: Change Product Class

Thanks for this information. I had created a bunch of products before figuring out that I could create a product class and needed to move them from product to the class I created.

Infinitee's picture
Offline
Joined: 02/19/2010
Juice: 78
Mass change products product type

Hey Lyle,

Is there an SQL query to change all products created with the built in UC product type to a new product class. I have a site with over 4,600 products that I would like to change to a new product class so, I can update attributes and options globally.

Thanks,

Ralph

Ralph Manis
Infinitee Web Design
http://www.infiniteewebdesign.com

Infinitee's picture
Offline
Joined: 02/19/2010
Juice: 78
Solved SQL "Update" UC product to UC new product class globally

You must fist create a new product class named "new_product_name". Then login to PHP MyAdmin and run he following SQL query to change all UC default product type items to new_product_name.

UPDATE node
SET type = "new_product_name"
WHERE type = "product";

Nice and easy!

Ralph Manis
Infinitee Web Design
http://www.infiniteewebdesign.com