I've run into an interesting situation problem with Magento EE 1.13.1
We have a custom module to sync product data between Magento and an external ERP system. Most of the time it works without an issue, but, on rare occasions, our customer reports that products are disappearing from the front end. The products display correctly after executing a command line reindex of the catalog_product_price index.
In this implementation, we are using the Magento product API model to create and update products by calling the API methods directly.
For example, when creating a product, first an array is created with all the product data -
$productData['sku'] = $sku; $productData['name'] = $productName; $productData['description'] = $productName; (etc)
then the stock data is added -
$productData['stock_data']['qty'] = $available; $productData['stock_data']['is_in_stock'] = true;
Finally the array is passed to the API create method -
$magentoApi = Mage::getModel('catalog/product_api'); $productId = $magentoApi->create('simple', '4', $sku, $productData, null);
So the result is that the product is created properly, but occasionally the indexes are not being updated. Do you think we should modify the code to force a reindex after creating or updating a product? I thought Magento was doing this automatically in 1.13 onward or am I mistaken?
Thanks for any pointers or suggestions.