I have a script that updates stock and price but it seems to save all attributes with a default value back to the default.
The collection is loaded like this:
$productsCollection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect(array('visibility','name','price','plu'))
->addAttributeToFilter('sku', array('in' => $this->skuArray));
foreach ($productsCollection as $product)
{
//update stuff here
$product->save();
}
I have read somewhere that using load()
is needed to save only those attributes specifically selected but if I do that I get a memory exhausted error.
Can someone give me some pointers on how to modify what I have in order to only save the attributes I have selected?