Skip to main content
1 of 2
Laizer
  • 189
  • 1
  • 6

Can't see products in categories after categorizing programmatically

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 asdmin, I've reindexed everything and flushed all cache storage.

What can I do to see these new product categorizations?

Laizer
  • 189
  • 1
  • 6