Forums / Setting Up Categories, Products, Attributes / Selecting moving Multiple Products into different category

Selecting moving Multiple Products into different category

Locked

Views: 3,940

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
13 Oct 2008, 1:09 PM
#1
namsingh avatar

namsingh

Zen Follower

Join Date:
Sep 2006
Location:
Leeds, UK
Posts:
165
Plugin Contributions:
0

Selecting moving Multiple Products into different category

Hi,

After updating a large number of products I want the ability to select say the 10 updated products and then quickly move them all into another category. Instaed of using the move button in the category list and going back and forth 10 times.

Is there a mod already doing this? Thanks in advance

8 Apr 2009, 7:48 PM
#2
tvhawk avatar

tvhawk

New Zenner

Join Date:
Apr 2008
Posts:
2
Plugin Contributions:
0

Re: Selecting moving Multiple Products into different category

I'm also highly interested in something like this. Have you had any luck?

10 Jun 2009, 2:32 PM
#3
hardwiredtemplates avatar

hardwiredtemplates

Zen Follower

Join Date:
Sep 2008
Posts:
211
Plugin Contributions:
0

Re: Selecting moving Multiple Products into different category

I am also interested in this, i know going back and forth to the move button is unproductive. Perhaps we can use an sql query to move as many products as we want, But how would we write sql statements.:cool:

31 Jul 2009, 5:26 PM
#4
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: Selecting moving Multiple Products into different category

hardwiredtemplates:

I am also interested in this, i know going back and forth to the move button is unproductive. Perhaps we can use an sql query to move as many products as we want, But how would we write sql statements.:cool:

are there any dependencies in terms of productID.. if i just run a simple query like below (i want to move all my products into category id 71. 71 and 72 are 2 new categories)

UPDATE products
SET master_categories_id = '71'
WHERE master_categories_id NOT IN (71, 72);

will this mess anything up in terms of table dependencies?

31 Jul 2009, 5:48 PM
#5
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: Selecting moving Multiple Products into different category

there must be dependencies somewhere... i ran this query and my products are still under the old categories even though the master_categories_id changed to 71... :) good thing i did a backup of the db prior to the update

any insight on what else i need to update? what other tables

31 Jul 2009, 6:03 PM
#6
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: Selecting moving Multiple Products into different category

jazznuts699:

there must be dependencies somewhere... i ran this query and my products are still under the old categories even though the master_categories_id changed to 71... :) good thing i did a backup of the db prior to the update

any insight on what else i need to update? what other tables

answered my own question... here is the other table you need to modify :) 'products_to_categories'

here is what i ran for my scenario

UPDATE products_to_categories
SET categories_id = '71'
WHERE categories_id NOT IN (71, 72)

so if you wanted to move your 10 products from CAT 1 to CAT 30 do it like this

UPDATE products
SET master_categories_id = '30'
WHERE master_categories_id = '1';

then you update the products_to_categories table

UPDATE products_to_categories
SET categories_id = '30'
WHERE categories_id = '1';

your category id is listed in the admin page under products/categories

i would run a couple select statements before you run the update to ensure you are grabbing the correct products

for example in phpmyadmin (in zencart database, select sql tab)

SELECT *
FROM products
WHERE master_categories_id = '1'; --write down result (# of rows)

this will show you what products you want to move

then check the caterogy_id's in

SELECT *
FROM products_to_categories
WHERE categories_id = '1'; --write down result (# of rows)

when you run the update statement for each table the # of rows or affected rows should be the same.

RUN A DATABASE BACKUP before hand :)

31 Jul 2009, 9:01 PM
#7
namsingh avatar

namsingh

Zen Follower

Join Date:
Sep 2006
Location:
Leeds, UK
Posts:
165
Plugin Contributions:
0

Re: Selecting moving Multiple Products into different category

**this mod Quick Updates allows you to move multiple products very easily. Don't forget to go to Tools > Store Manager in your admin to reset the master categories if you use EasyPopulate.

Reset ALL Products Master Categories ID

Quick Updates

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=101
**

4 Aug 2009, 8:02 PM
#8
jazznuts699 avatar

jazznuts699

New Zenner

Join Date:
Jul 2009
Posts:
72
Plugin Contributions:
0

Re: Selecting moving Multiple Products into different category

NamSingh:

**this mod Quick Updates allows you to move multiple products very easily. Don't forget to go to Tools > Store Manager in your admin to reset the master categories if you use EasyPopulate.

Reset ALL Products Master Categories ID

Quick Updates

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=101
**

thanks :)