Heyhey,
I'm trying to make a script that will load all products from one category and add them to another category (so, basically, just link all products to an additional category). What I'm trying is:
$category = Mage::getModel('catalog/category');
$category->load($id); // Preset category id
$collection = $category->getProductCollection();
$collection->addAttributeToSelect('*');
foreach ($collection as $product) {
$result[] = $product->getProductId();
// Now get category ids and add a specific category to them and save?
}
$result comes up empty, and I have no idea how to proceed. Any ideas?