Magento: Rebuilding Flat Catalog Programmatically
Posted
by karnage
on Stack Overflow
See other posts from Stack Overflow
or by karnage
Published on 2010-03-18T17:17:53Z
Indexed on
2010/03/18
17:21 UTC
Read the original article
Hit count: 549
magento
I am using a cron to import inventory changes nightly. When I try to change a product's information (price, etc) I get the following error:
Column not found: 1054 Unknown column 'e.display_price_group_0' in 'field list'
I can fix this by clicking "Rebuild Flat Catalog Product" in the Cache Management panel. I setup a cron to do this programmatically using the following code:
Mage :: getResourceModel( 'catalog/product_flat_indexer' ) -> rebuild();
I don't get any errors when I run the script, but the "Column not found" error persists.
Does anyone know how I can rebuild the flat catalog other than through the admin interface?
© Stack Overflow or respective owner