Magento - Programmatically added products don't show up
Posted
by
Lucasmus
on Stack Overflow
See other posts from Stack Overflow
or by Lucasmus
Published on 2010-12-29T15:29:24Z
Indexed on
2010/12/29
15:53 UTC
Read the original article
Hit count: 249
magento
|magento-1.4
I am trying to import products using a custom made import profile. Here I set some values on the product and then save it, like this:
$product = Mage::getModel('catalog/product');
$data = array();
// Inbetween I fill $data with some values
$product->addData($data);
$product->save();
However, the products do show up in the admin, but do not show up on the frontend (I did add them to categories).
The odd thing is, they do appear on the frontend once I open them in the admin and save them again (without modifying anything). Am I forgetting something, or some value that is somehow set by that action?
I tried to rebuild all indices in the backend and to clear the cache, but this does not work, contrary to Magento API: Rebuild Indexes after adding new products.
© Stack Overflow or respective owner