Zen Cart Logo
Forums / Basic Configuration / Deleting Linked Items

Deleting Linked Items

Locked

Views: 1,777

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
18 Nov 2006, 5:37 PM
#1
Join Date:
Apr 2006
Location:
Cambridge, Ontario, Canada
Posts:
48
Plugin Contributions:
0

Deleting Linked Items

I have linked a whole categiory too run a monthly special, and now I am looking at how I can remove the links from my monthly category but leave them in the Main categroy.

So far I am de;eteing these one at a time but there are ove 1000 items in my monthly special.

David moody

https://www.magneticgems.com

18 Nov 2006, 5:50 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Deleting Linked Items

If you want to remove all 927 Products from Category for Monthly Specials (categories_id 108) and you are Positive all of these products are in other Categories ...

Consider these questions carefully:

1 Is the Monthly Specials categories_id 108 also the master_categories_id on these products?

2 Is this the only group of Products that are Linked Products? Or do you have other Categories that contain Linked Products?

3 How many Categories do the 927 Linked Products come from? As in is this easy to say from "these 3 Categories"? Or would you say from "tons and tons and tons of Categories"

18 Nov 2006, 5:54 PM
#3
Join Date:
Apr 2006
Location:
Cambridge, Ontario, Canada
Posts:
48
Plugin Contributions:
0

Re: Deleting Linked Items

The Monthly Special is not the Master Catogie for these iy=tems the Master is Gift Shop Itilan Charms, and the specials are only from that cat. Yes I do have other linked items as well but not in teh 2 catogiers mentioned.

18 Nov 2006, 5:59 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Deleting Linked Items

Providing none of these Products use the Monthly Special categories_id 108 for your site ...

1 Backup your database

2 See 1

3 Run the following in the Tools ... Insert SQL Patches ...

DELETE from products_to_categories where categories_id=108;

poof all done ... hours and hours and hours of time saved ... and don't forget how much coffee you saved ... :smartass:

NOTE: You did backup your database before running that command ... right? :eek:

18 Nov 2006, 6:14 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Deleting Linked Items

Also ... for the bold and daring ... after making a database backup ...

If you click the C on one of these Products at the bottom is the Multiple Products Link Manager ...

In there is a nice little featuer I added for:

Remove ALL Products in a Category that are LINKED Products to another Category ...
Example: Using 8 and 22 would Unlink ALL Products in Category 8 from Category 22
Select All Products in Category: Remove from being Linked to Category:

IF none of the Products are set with the master_categories_id to the Category you want to remove them from ... you can use this to perform this same task ...

NOTE: backups and test sites are a wonderful thing to learn about new toys and features you know nothing about ... :smartass: