Created
November 13, 2014 08:18
-
-
Save sandermangel/46d14df8f4ebf06acfee to your computer and use it in GitHub Desktop.
[Magento] Save product data in a loop without loading the whole object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$collection = Mage::getModel('catalog/product')->getCollection() | |
->addAttributeToSelect('name'); | |
foreach ($collectio as $product) | |
{ | |
$product->setName("Here goes the name"); | |
$product->getResource()->saveAttribute($product, 'name'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment