views:

47

answers:

2

I want to remove all of the cross-sell product links from the store - we have around 22,000 links that was the result of an auto cross sell extension that I have since removed.

I imagine it has something to do with removing records from the table catalog_product_link?

Or is there a way to do this programmatically?

+3  A: 

You are right, removing records is the fastest way to do this. Start by looking at catalog_product_link_type and find the link_type_id for "cross_sell". It's usually "5" but there is no reason to take a chance.
Backup your database.
Delete all records from catalog_product_link with a matching link_type_id. An SQL like this should work:

DELETE FROM `catalog_product_link` WHERE `link_type_id` = 5;
clockworkgeek
Thanks clockworkgeek. I ended up running this query first, and then yours. It worked well: delete FROM `catalog_product_link_attribute_int` WHERE link_id in (select link_id from `catalog_product_link` where link_type_id = 5);
Daniel Alexiuc
+1  A: 

if you would rather not edit the database directly, you could use the free extension from TBT called Mass Product Relater. That will allow you to strip out product relationships from the Manage Products grid.

Jonathan Day