Using CE 1.8.1, I've just categorized a number of products using code like this:
$product = mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
$product->setCategoryIds($cats);
$product->save();
I can't get the products to show up in their new categories on the front end. I see the results in the catalog_category_product table
- the information is in the database. I also see it when I edit individual products in the admin. From the admin, I've reindexed everything and flushed all cache storage.
What can I do to see these new product categorizations?
$product->setStoreId(0)
before to save ?