Change a product’s attribute value without loading the entire product model

Magento Collection
Magento Collection

Loading product in a collection and saving them again and again over will take lot of time. To make it quick there is an alternate solution available which uses the same function used by Update attributes action from the product grid:

->updateAttributes(array($productId), array('attribute_code'=>'value'), 0);

You Might Also Like