Jump to content

moving products in current category to another category


Recommended Posts

Hello all..
Is there someone help me out?
The problem is that I put products in wrong category..I need to move up all products in worng category to another category. I don't want to put them in one by one again.
Please help me out.
Thanks.

Link to comment
Share on other sites

The easiest way to move all products in one category to another category is to run an SQL query like the following on your database using phpMyAdmin:

UPDATE `ps_category_product` SET `id_category` = 3 WHERE `id_category` = 2



This query will move all products in category 2 to category 3. Change ps_ to your database prefix. Remember to back up the table first in case anything goes wrong.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...
  • 2 years later...

How can I move more than two categories

INSERT INTO ps_category_product

(id_category, id_product, position)

 

select 38, id_product, id_product

from ps_category_product as c

where

id_category in (30,31,32,33,34,35,36);

 

 

where 38 is category you want to add to a product

and (30,31,32,33,34,35,36, etc..) are the categories where actually products are!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...