I have a script which reads a text file which contains sku information.
Then in a loop the script loads each product's ID then creates the product object:
$id = Mage::getModel('catalog/product')->getIdBySku($isbn); $product = Mage::getModel('catalog/product')->load($id);
Then the stock data is updated:
$product->setStockData(array( 'manage_stock' => 1, 'use_config_manage_stock' => 0, 'is_in_stock' => 1, 'qty' => $qty )); $product->save();
This works however on larger amount of products to loop through the script just suddenly stops. For example one text file had 14,000 lines and on approximately the 7,000th loop the script just stops with no error message.
If we change the text file the same thing occurs.
I have checked the max_execution_time on the server and it looks fine.
I'm unsure if there's a Magento reason why the script breaks or anything else.
Any help is much appreciated.